Commit Graph

6730 Commits

Author SHA1 Message Date
Florian Bruhin
8faf4717e5 Make :debug-console toggle the console. 2015-11-24 18:32:18 +01:00
Florian Bruhin
2ef2e3088f bdd: Add tests for :view-source. 2015-11-24 18:24:33 +01:00
Florian Bruhin
d58a5d4d15 bdd: Add "the page source should look like" step. 2015-11-24 18:22:43 +01:00
Florian Bruhin
b7323914b8 tests: Add plain arg to quteprocess.get_contents. 2015-11-24 18:22:20 +01:00
Florian Bruhin
35de87f973 Expand ~ with :dump-page. 2015-11-24 18:04:10 +01:00
Florian Bruhin
b37dac7bfa Handle errors in :dump-page. 2015-11-24 18:03:39 +01:00
Florian Bruhin
e405492667 Ignore errors when removing temp basedir. 2015-11-24 17:50:39 +01:00
Florian Bruhin
7b1e2ab471 Skip some inspector tests on windows.
Those cause trouble because it can't clean up the local storage directory...
2015-11-24 17:48:09 +01:00
Florian Bruhin
3905884a84 Disable all QWebSettings storage when quitting.
This hopefully helps with issues on the Windows buildbot:

    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\shutil.py", line 371, in _rmtree_unsafe
	os.unlink(fullname)
    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\florian\\AppData\\Local\\Temp\\qutebrowser-basedir-ixuexfeu\\data\\local-storage\\qrc__0.localstorage'
2015-11-24 17:24:14 +01:00
Florian Bruhin
43d7b139e8 Ignore another libpng warning.
This happened here:
https://ci.appveyor.com/project/The-Compiler/qutebrowser/build/master-1536/job/k8es4nh719cc27hf
2015-11-24 16:59:35 +01:00
Florian Bruhin
d13ae4c666 tests: Make checks for focus window more forgiving.
It seems on OS X we get this instead of focusing the webview:
"Focus object changed: <qutebrowser.browser.inspector.WebInspector object at ...>"
2015-11-24 16:54:35 +01:00
Florian Bruhin
922fdc0526 Fix :fake-key with no focused webview. 2015-11-24 16:28:56 +01:00
Florian Bruhin
4c1eff625f tests: Make inspector smoke test more reliable.
Before we didn't wait until the inspector window was hidden, which caused the
following tests to fail on our OS X buildbot:

    ==================================== ERRORS ====================================
    _________ ERROR at teardown of test_fakekey_sending_key_to_the_website _________

    [...]

    tests/integration/testprocess.py:186: InvalidLine
    ----------------------------- Captured stdout call -----------------------------
    [...]
    INVALID: Traceback (most recent call last):
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/app.py", line 109, in <lambda>
    IGNORED:     target_arg=target_arg))
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/app.py", line 263, in process_pos_args
    IGNORED:     commandrunner.run_safely_init(cmd[1:])
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/runners.py", line 266, in run_safely_init
    IGNORED:     self.run(text, count)
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/runners.py", line 249, in run
    IGNORED:     result.cmd.run(self._win_id, args)
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/command.py", line 505, in run
    IGNORED:     self.handler(*posargs, **kwargs)
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/browser/commands.py", line 1781, in fake_key
    IGNORED:     tab='current')
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 215, in get
    IGNORED:     reg = _get_registry(scope, window, tab)
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 202, in _get_registry
    IGNORED:     return _get_tab_registry(window, tab)
    IGNORED:   File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 152, in _get_tab_registry
    IGNORED:     raise RegistryUnavailableError('tab')
    INVALID: qutebrowser.utils.objreg.RegistryUnavailableError: tab
    [...]

While this is a real issue, this test shouldn't affect the next one.

Since we have to wait for windows getting focused but Xvfb doesn't do that, we
skip this tests when running via Xvfb.
2015-11-24 16:17:26 +01:00
Florian Bruhin
542d13b70d tests: Add a not_xvfb marker. 2015-11-24 16:17:07 +01:00
Florian Bruhin
75178b0cdc Log when the focus object changed.
This is mainly needed for tests to synchronize things properly.
2015-11-24 15:24:45 +01:00
Florian Bruhin
14f4689998 tests: Fix TestInitLog.
This worked before b0d4ebe because --debug was given and the
"args.loglevel.upper()" part was never executed.

However, loglevel is expected as a string, not as an int.
2015-11-23 21:50:48 +01:00
Florian Bruhin
0becee05e1 Update changelog. 2015-11-23 21:49:34 +01:00
Florian Bruhin
c73de6ea4d Change "Added binding ..." logs to vdebug. 2015-11-23 21:41:31 +01:00
Florian Bruhin
b0d4ebe844 Don't log VDEBUG messages with --debug.
This reduces the log spam quite a bit, which also makes things easier when
dealing with CI output.
2015-11-23 21:40:11 +01:00
Florian Bruhin
9479a50784 bdd: Add a timeout to redirect-later with -1 delay. 2015-11-23 21:37:22 +01:00
Florian Bruhin
196d1e95be tests: Skip test_normal_connection IPC test on OS X.
Seems like it hangs there sometimes.
2015-11-23 20:33:11 +01:00
Florian Bruhin
607ca0f478 tests: Wait until page is dumped for header check.
If we don't do this, it's possible for the test process to delete the temporary
directory before qutebrowser actually writes the file.
2015-11-23 20:12:52 +01:00
Florian Bruhin
d4c24c935c bdd: Compare unordered req's for :reload --force. 2015-11-23 20:00:25 +01:00
Florian Bruhin
79680f505e Fix docstring. 2015-11-23 19:46:50 +01:00
Florian Bruhin
f3b89dba9b tests: Make test_reload/..._with_force more stable.
This waits until the pages have actually been reloaded.
2015-11-23 19:44:53 +01:00
Florian Bruhin
e2da9aa3f8 tests: Make test_stop more stable.
It's now based by the browser opening a second page after :stop is run rather
than timing-based, which hopefully should make it run more stable on Travis.
2015-11-23 19:43:11 +01:00
Florian Bruhin
d324dd5f70 bdd: Add "I open ... in a new tab" step. 2015-11-23 19:42:01 +01:00
Florian Bruhin
39f29e2531 tests: Wait until clipboard actually changed.
Hopefully fixes #1124.
2015-11-23 16:29:37 +01:00
Florian Bruhin
17b5ccde0e tests: Ignore "SelectionRequest too old" message.
See #1124.
2015-11-23 16:25:03 +01:00
Florian Bruhin
162c8b30e6 Remove unused import. 2015-11-23 14:49:37 +01:00
Florian Bruhin
7a82bb55e4 bdd: Add tests for :reload. 2015-11-23 14:37:54 +01:00
Florian Bruhin
1e79aae231 bdd: Add check_header step. 2015-11-23 14:37:40 +01:00
Florian Bruhin
76143574ef tests: Add quteproc.get_content. 2015-11-23 14:37:29 +01:00
Florian Bruhin
31892b437e Add :debug-dump-page command.
This can probably be merged into :download later, when the mess is cleaned up.
2015-11-23 14:35:46 +01:00
Florian Bruhin
52aca30342 tests: Add quteproc.temp_setting. 2015-11-23 13:31:17 +01:00
Florian Bruhin
e6eaa5f140 tests: Add quteproc.get_setting. 2015-11-23 13:30:49 +01:00
Florian Bruhin
b7b4ee1b27 Merge branch 'Kingdread-download-page' 2015-11-23 13:27:59 +01:00
Florian Bruhin
ae00dac0be Update changelog. 2015-11-23 13:27:52 +01:00
Florian Bruhin
0d60ec43ed Regenerate docs. 2015-11-23 13:26:32 +01:00
Florian Bruhin
16e1a65448 Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-23 13:16:16 +01:00
Daniel Schadt
89c9b5959e Don't ask the user twice for a filename
Fixes a bug where the user would be asked twice for a filename when
using :download without a dest-argument.

The problem was that we unconditionally overwrote filename, even if one
was given, thus discarding any "filename-finding-process" that we had
and asking the user again.
2015-11-23 12:32:58 +01:00
Florian Bruhin
d68798a15b Merge branch 'larryhynes-patch-1' 2015-11-23 11:26:24 +01:00
Florian Bruhin
efa745b53f Fix indent. 2015-11-23 11:26:01 +01:00
Florian Bruhin
049102c644 Regenerate authors. 2015-11-23 11:24:40 +01:00
Florian Bruhin
f4cccdf13f Merge branch 'patch-1' of https://github.com/larryhynes/qutebrowser into larryhynes-patch-1 2015-11-23 11:23:10 +01:00
Florian Bruhin
b45b8d57bb Merge branch 'forkbong-argparse-usage' 2015-11-23 11:21:11 +01:00
Florian Bruhin
135dc64de7 Regenerate authors. 2015-11-23 11:20:56 +01:00
Florian Bruhin
ee0627128a Merge branch 'argparse-usage' of https://github.com/forkbong/qutebrowser into forkbong-argparse-usage 2015-11-23 11:20:49 +01:00
Florian Bruhin
ea06c64ed4 Fix typos. 2015-11-23 11:17:26 +01:00
Panagiotis Ktistakis
f3f0ef9841 Remove unnecessary 'usage:' from argument parser. 2015-11-23 01:10:35 +02:00