Commit Graph

802 Commits

Author SHA1 Message Date
Florian Bruhin
7f5e07d7cc bdd: Add some tests for :tab-move. 2015-11-26 18:37:47 +01:00
Florian Bruhin
3bcc80048d bdd: Move yankpaste.html to title.html. 2015-11-26 18:37:33 +01:00
Florian Bruhin
6f1474be71 bdd: Remove trailing dots. 2015-11-26 17:50:39 +01:00
Florian Bruhin
bc28a168cc bdd: Add tests for :tab-prev/:tab-next/tabs->wrap. 2015-11-26 16:19:03 +01:00
Florian Bruhin
102db181c5 Remove unused imports. 2015-11-26 15:55:40 +01:00
Florian Bruhin
7eb6f658eb tests: Use JSON for webserver_sub logging.
This simplifies logging output and parsing.
2015-11-26 14:40:20 +01:00
Florian Bruhin
b8467b8fef tests: Various cleanups. 2015-11-26 14:25:33 +01:00
Florian Bruhin
7baed5f80f tests: Don't start qutebrowser process if unneeded. 2015-11-26 13:56:42 +01:00
Florian Bruhin
fac76576d7 bdd: Add "the following tabs should be open" step.
This simplifies a lot of .feature files because we don't actually need to check
the full session.
2015-11-26 01:33:56 +01:00
Florian Bruhin
c861cf54e6 tests: Make QuteProcess.path_to_url public. 2015-11-26 01:33:27 +01:00
Florian Bruhin
fc328b275a bdd: Add some tests for :tab-focus. 2015-11-26 00:48:39 +01:00
Florian Bruhin
951c2e8eb6 Fix qflags_key comparison. 2015-11-25 18:54:03 +01:00
Florian Bruhin
c755a78518 bdd: Add tests for :tab-close/:tab-only. 2015-11-25 18:48:10 +01:00
Florian Bruhin
67f726c9d4 tests: Add another BOM test for javascript_escape. 2015-11-25 18:47:16 +01:00
Florian Bruhin
73e9fd1118 Handle BOM (\ufeff) for webelem.javascript_escape. 2015-11-25 18:14:52 +01:00
Florian Bruhin
816d62bca5 bdd: Reorganize numbered test files. 2015-11-25 18:02:14 +01:00
Florian Bruhin
eed2584e3f Fixup for last commit. 2015-11-25 17:55:33 +01:00
Florian Bruhin
0a7b552111 bdd: Use 'q' key for forward-unbound-keys test.
It seems ' gives us a 222 keycode with newer Qt versions, but 0 with older
ones. 'q' which is a much lower code should hopefully work better.
2015-11-25 17:52:00 +01:00
Florian Bruhin
21a1f9ca65 bdd: Add various key input tests. 2015-11-25 17:20:53 +01:00
Florian Bruhin
9670ffb78e bdd: Add "the JS message ... should not be logged". 2015-11-25 17:20:05 +01:00
Florian Bruhin
388cc7ae29 bdd: Add "Then ... should be logged" step. 2015-11-25 17:19:49 +01:00
Florian Bruhin
9fe02d55c9 bdd: Add "I press the keys ..." step. 2015-11-25 17:19:16 +01:00
Florian Bruhin
7cfea665ff tests: Strip trailing slash for webserver paths. 2015-11-25 10:40:24 +01:00
Florian Bruhin
24a71e5c2e Fix webelem.javascript_escape with U+2028/U+2029. 2015-11-25 10:32:22 +01:00
Florian Bruhin
027a10c04b bdd: Add some tests for :navigate. 2015-11-24 21:32:45 +01:00
Florian Bruhin
8f2b29a1f9 tests: Make it possible to load httpbin root. 2015-11-24 21:27:20 +01:00
Florian Bruhin
93ef85ff16 tests: Serve index.html files in webserver_sub.py. 2015-11-24 20:43:20 +01:00
Florian Bruhin
f8668ff710 bdd: Add a test for :open with -t and -b. 2015-11-24 20:31:08 +01:00
Florian Bruhin
c22e1df400 Add whitespace. 2015-11-24 19:24:39 +01:00
Florian Bruhin
28b739b9b5 bdd: Add tests for :open. 2015-11-24 19:19:23 +01:00
Florian Bruhin
287b2ba258 bdd: Replace (port) when setting a setting. 2015-11-24 19:19:03 +01:00
Florian Bruhin
925a5ba809 bdd: Add test for :debug-console. 2015-11-24 18:37:34 +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
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
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
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
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