Commit Graph

1287 Commits

Author SHA1 Message Date
Florian Bruhin
28e6158a04 Stabilize some tests with Qt 5.9 QtWebEngine 2017-04-08 20:38:23 +02:00
Florian Bruhin
6051f93c02 Avoid checking for scroll position in macro tests
This makes them simpler and more stable.
2017-04-08 19:54:30 +02:00
Florian Bruhin
e23318fe91 Mark failing test as flaky on QtWebEngine
It consistently fails on Qt 5.9 now while waiting the page to be scrolled to
0/20, but I can't figure out why that is happening.

See #2514, #2410
2017-04-08 19:29:46 +02:00
Florian Bruhin
a081d4184d tests: Adjust percent-encoding tests for Qt 5.9 changes
See #2514
2017-04-08 19:25:55 +02:00
Florian Bruhin
c23e4b1c5f tests: Allow @qt<... marker for BDD tests 2017-04-08 19:20:53 +02:00
Florian Bruhin
4ec5700cbf Redirect qute:foo to qute://foo
Before, we just returned the same data for both, but then we'll run into
same-origin restrictions as qute:history and qute:history/data are not the same
host.
2017-04-06 21:18:58 +02:00
Florian Bruhin
760dca475e Merge commit 'be254be13a61171d4109224450db9e67d1076080' into imransobir/fix-webkit-history 2017-04-06 20:34:49 +02:00
Martin Tournoij
e7755f5d9f
Add :debug-log-filter none
This allows us to clear any filters. Useful for users, and needed for
the tests.
2017-04-04 20:51:14 +01:00
Martin Tournoij
200e439a30
Fix crash of :debug-log-filter when --filter wasn't given
There was no `LogFilter`. The fix is to always initialize a
`LogFilter()` with `None`. as the "filter".

Fixes #2303.
2017-04-04 17:45:23 +01:00
Martin Tournoij
7f13c9a3c3
Relax commandline parsing a bit
Problem 1: Entering a command of `:::save` gives an error.
Problem 2: Entering a command of `:save\n` gives an error.

Both scenarios may seem a bit silly at first, but I encountered both by
copy/pasting a command:

1. Enter `:` in qutebrowser.
2. Copy a full line from a terminal starting with `:`.
3. You will now have both of the above problems.

Solution: Trim all whitespace and `:` of a command. This is also what
Vim does, by the way.
2017-03-31 17:14:11 +01:00
Florian Bruhin
05059b4a5e Merge commit '8af5cfb4ac9e6d928cfeb0522fa729ba616df70a' 2017-03-31 17:47:34 +02:00
Martin Tournoij
8af5cfb4ac
Add a modeline to all the *.feature files
This really tripped me up yesterday, My "Vim default" is to use tabs.

This (where `!···` is a tab) does not work as you'll hope it works:

    Scenario: Retrying a failed download when the directory didn't exist (issue 2445)
        When I download http://localhost:(port)/data/downloads/download.bin to <path>
        And I wait for the error "Download error: No such file or directory: *"
        And I make the directory <mkdir>
        And I run :download-retry
!···!···And I wait until the download is finished
        Then the downloaded file <expected> should exist

        Examples:
        | path                 | mkdir   | expected             |
        | asd/zxc/             | asd/zxc | asd/zxc/download.bin |

Unfortunately, pytest-bdd uses the "Python 2 behaviour" of "expand all
tabs to 8 spaces", and doesn't give any errors on strange/inconsistent
whitespace. It can cause very confusing errors.
2017-03-31 16:16:31 +01:00
Florian Bruhin
189c1721af Don't wait for download.bin in windows downloads 2017-03-31 14:46:29 +02:00
Florian Bruhin
6c3abadb32 Stabilize :repeat-command test 2017-03-31 13:05:34 +02:00
Florian Bruhin
43155b0cc8 Stabilize history.replaceState tests 2017-03-31 13:05:34 +02:00
Florian Bruhin
eb202d761c Stabilize dumping bookmarks test
For some reason, with QtWebEngine on Windows, sometimes the :debug-dump-page
callback does not get called if we try to dump the same page again...
2017-03-31 13:05:34 +02:00
Florian Bruhin
2884277dbd Fix Shift-Insert without it being supported 2017-03-31 13:05:34 +02:00
Florian Bruhin
dc405ec3a8 Skip QtWebEngine SSL tests on Windows 2017-03-31 13:05:34 +02:00
Florian Bruhin
a4619d07db tests: Wait until about:blank is loaded 2017-03-31 13:03:40 +02:00
Florian Bruhin
bf66bb221f Ignore getrlimit error during tests 2017-03-31 13:03:40 +02:00
Florian Bruhin
708b46d6c0 Fix text with empty primary selection 2017-03-31 13:03:40 +02:00
Florian Bruhin
4d49d9da09 Skip renderer process crash test on Windows 2017-03-31 13:03:40 +02:00
Florian Bruhin
c551c62c27 Stabilize JS tests 2017-03-31 13:03:40 +02:00
Florian Bruhin
dc0a782839 Run python in hints tests 2017-03-31 13:03:40 +02:00
Florian Bruhin
2c4e549d80 Close temporary download file for QtWebEngine
Otherwise, Chromium won't be able to write on it on Windows - and we only
need the name anyways.
2017-03-31 13:03:18 +02:00
Florian Bruhin
edb197b028 Make waiting for download prompt more robust 2017-03-31 13:03:18 +02:00
Florian Bruhin
e28eabe5eb Add marker for #2478 2017-03-31 13:03:17 +02:00
Florian Bruhin
5a16133685 Fix prompt with SSL error test 2017-03-31 13:03:17 +02:00
Florian Bruhin
3b351d9066 Run more invocation tests with QtWebEngine 2017-03-31 06:18:43 +02:00
Florian Bruhin
6939f81de7 Merge commit '563a5431e35831cb0a8c418835c54d0264d92c78' into Kingdread/windows-drive-cwd 2017-03-30 10:48:39 +02:00
Florian Bruhin
6a144ef7bd Merge branch 'Kingdread/windows-drive-cwd' 2017-03-30 10:41:58 +02:00
Daniel Schadt
186eab8eb1 use message.error instead of a tooltip 2017-03-29 17:07:53 +02:00
Florian Bruhin
93a12797aa Fix quteprocess tests with Python 3.6 on Windows
Values smaller than 86400 would result in a negative unsupported timestamp and
thus throw ValueError in Python 3.6
2017-03-28 20:53:11 +02:00
Florian Bruhin
fe81f153cf tests: Ignore "Unable to locate theme engine" messages 2017-03-28 20:41:23 +02:00
Imran Sobir
4a4c7b96d1 Add nojs history page. 2017-03-28 18:34:47 +05:00
Florian Bruhin
5a4d11be68 Fix lint 2017-03-27 07:16:10 +02:00
Florian Bruhin
a8bc531eee Add a test for :open with -s 2017-03-27 07:09:55 +02:00
Daniel Schadt
a011034ff7 fix tests 2017-03-24 13:21:09 +01:00
Daniel Schadt
df83f7aa99 also add path transformations to :download 2017-03-24 12:30:29 +01:00
Daniel Schadt
07b3a7db7c add integration tests for reserved filenames 2017-03-24 11:57:05 +01:00
Daniel Schadt
6319363614 add a test for downloading a 500 inline attachment 2017-03-22 13:38:03 +01:00
Florian Bruhin
3fbb9a14e0 Fix continuing a search after clearing it
Fixes #2438
2017-03-20 21:34:33 +01:00
Florian Bruhin
4b6b9c2d21 Add missing file 2017-03-20 11:28:01 +01:00
Florian Bruhin
3e2ba32240 Fix retrying downloads with QtWebEngine
Fixes #2298
2017-03-20 09:35:53 +01:00
Florian Bruhin
7652b6ae03 Merge commit '724e6b29c38a55f722f17997379f1ebe190fa6db' 2017-03-20 09:11:47 +01:00
thuck
20d058741e Merge branch 'pintab' of https://github.com/thuck/qutebrowser into pintab 2017-03-19 14:43:36 +01:00
thuck
650b1de3b6 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2017-03-19 14:26:48 +01:00
Florian Bruhin
0b5838f9fd Fix BDD version check operators 2017-03-08 20:56:30 +01:00
Florian Bruhin
f86f9cd92a Refactor qtutils.version_check API
Fixes #2423
2017-03-08 08:41:18 +01:00
Florian Bruhin
d42dff67f2 Reorder initialization
marcos.init() really belongs into _init_modules, and we need to do _process_args
after everything has been initialized.

Fixes #2408.
2017-03-07 06:46:35 +01:00
Florian Bruhin
5fb6d26465 Stabilize some tests 2017-03-06 06:28:26 +01:00
Florian Bruhin
fa89fff668 Stabilize session tests 2017-03-05 15:15:12 +01:00
Florian Bruhin
5ccafd62d4 Fix initial keyboard focus with QtWebEngine
Fixes #2321.
2017-03-04 18:11:34 +01:00
Florian Bruhin
65a701a180 Stabilize existing text test 2017-03-02 08:38:07 +01:00
Florian Bruhin
d6f47bd3fb Fix lint 2017-03-02 08:29:43 +01:00
Florian Bruhin
81a36ffd7d Strip QtWebEngine download suffixes properly
Fixes #2386
2017-03-01 23:43:04 +01:00
Florian Bruhin
88904864c9 Skip failing tests on Qt < 5.8 2017-03-01 20:24:34 +01:00
Florian Bruhin
b4af966167 Make stubbed methods fail tests again
Only some caret browsing stuff and a few webelement methods are stubbed out now.
Make them fail tests so we notice when we use a stub.
2017-03-01 17:43:33 +01:00
Florian Bruhin
bc0a9cd94d Move cursor to end with input elements on QtWebEngine 2017-03-01 17:30:48 +01:00
Florian Bruhin
1e1ba34b60 Fix selecting text fields with QtWebKit
Using focus() in JS there means that existing text in the field gets selected.
Move the cursor to the end after focusing it to prevent that.

Fixes #2359
2017-03-01 17:13:02 +01:00
Florian Bruhin
67dfbc7e5f Don't create QWebEngine profile at import time
Fixes #2378
2017-02-28 17:24:48 +01:00
Florian Bruhin
4f90fd952d Skip test_qt_arg on Qt 5.2 2017-02-28 08:22:06 +01:00
Florian Bruhin
8d22991d03 Fix test_qt_args 2017-02-27 15:12:38 +01:00
Florian Bruhin
07a20bd1ad Add an end2end test for --qt-arg 2017-02-27 14:02:13 +01:00
Imran Sobir
845f21b275 New qute:history page. 2017-02-26 17:07:30 +05:00
Florian Bruhin
fc2250b3b2 Merge branch 'session-save-only-active-window' of https://github.com/danfis/qutebrowser into danfis-session-save-only-active-window 2017-02-25 17:55:42 +01:00
Florian Bruhin
1eab108323 Merge branch 'upstream-master-jseval-file' of https://github.com/pkill-nine/qutebrowser into pkill-nine-upstream-master-jseval-file 2017-02-25 17:26:12 +01:00
pkill9
6cb48ba2b6 Adds a --file flag to :jseval 2017-02-25 13:11:53 +00:00
Florian Bruhin
3feb4211fe Don't show hints for opacity: 0 elements
Fixes #2347
2017-02-24 09:13:25 +01:00
Florian Bruhin
06c4a100cc Fix QtWebKit-NG private-browsing tests 2017-02-23 08:15:18 +01:00
Florian Bruhin
ce3c0a0f55 Mark more private-browsing tests as xfail with QtWebKit-NG 2017-02-23 08:13:40 +01:00
Daniel Fiser
81a24bdbef Fixed test of :session-save --only-active-window 2017-02-22 17:04:57 +01:00
Daniel Fiser
76bb11c6aa Added test for :session-save --only-active-window 2017-02-22 14:16:46 +01:00
Florian Bruhin
77f475991d tests: Ignore CreatePlatformSocket() errors 2017-02-21 20:52:46 +01:00
Florian Bruhin
389501deb9 Merge branch 'navigate-fix' of https://github.com/EliteTK/qutebrowser into EliteTK-navigate-fix 2017-02-19 20:22:27 +01:00
Tomasz Kramkowski
1fcba72958 tests navigate: Add tests for rel attributes with nofollow
Add two extra tests for checking navigation on pages with rel "next" and
"prev" links which are also rel "nofollow" to test for the correct
functionality of navigating pages with rel "next" and "prev" links with
multiple rel attributes.
2017-02-19 12:32:19 +00:00
Florian Bruhin
01db59ff36 Handle all uerscript errors when hinting with userscript-target 2017-02-19 13:15:15 +01:00
Florian Bruhin
399b02a367 Fix subtle issue in hint bdd tests
- We need to clean open tabs to avoid reusing target=_blank child tabs
- We don't check the active tab with target=_blank anymore
- Remove some weird :tab-close
2017-02-17 22:07:59 +01:00
Florian Bruhin
ac9b0e5c59 bdd: Allow checking open tabs without (active) 2017-02-17 22:07:23 +01:00
Florian Bruhin
6ac7e61e0e Add testcase for #2311 2017-02-17 21:32:40 +01:00
Florian Bruhin
0deb422cfd Remove unused imports 2017-02-17 15:44:25 +01:00
Florian Bruhin
006378923e Skip geolocation tests on Qt 5.8
https://bugreports.qt.io/browse/QTBUG-58985
2017-02-17 14:45:36 +01:00
Florian Bruhin
a86170f45d Drop PyQt < 5.7.1 support for QtWebEngine 2017-02-17 14:42:57 +01:00
Florian Bruhin
f718b66c48 Disable mhtml tests for Qt 5.6 2017-02-17 14:32:38 +01:00
Florian Bruhin
ba21fb3784 webengine: Use _click_href for hinting target=_blank links
Fixes #2311
2017-02-17 06:57:31 +01:00
Florian Bruhin
a4f04db848 Cap scroll count to 5000
Fixes #1694
2017-02-11 22:26:37 +01:00
Florian Bruhin
bd8ead2279 Detect rel-attributes on <a> elements for :navigate 2017-02-11 20:48:48 +01:00
Florian Bruhin
c3153273f5 Merge branch 'master' of https://github.com/imransobir/qutebrowser into imransobir-master 2017-02-11 17:05:57 +01:00
Imran Sobir
37c3b79b9b Add :history command. 2017-02-10 17:47:20 +05:00
Florian Bruhin
85d8d45e19 Ask for confirmation with :history-clear 2017-02-09 13:20:00 +01:00
Florian Bruhin
708c96f3ce Fix handling of @qt>= BDD tags 2017-02-09 00:50:37 +01:00
Florian Bruhin
0d271eba87 Mark tests using special URLs as Qt >= 5.8 2017-02-09 00:50:37 +01:00
Florian Bruhin
a3caba53d5 Allow single-dot version tags in BDD tests 2017-02-09 00:50:37 +01:00
Florian Bruhin
00c743b3e8 Relax complex mhtml check for QtWebEngine
Turns out the output differs between QtWebEngine versions, probably because it
dumps its parsed files. Let's just do a sanity check for the complex file
instead.
2017-02-09 00:50:37 +01:00
Florian Bruhin
ac2fd4a36f Skip special URL tests with QtWebKit 2017-02-08 13:04:38 +01:00
Florian Bruhin
7c08444c37 Refuse to serialize chrome:// and view-source:// tabs
Fixes #2289
2017-02-08 11:40:00 +01:00
Florian Bruhin
580648da32 Allow to open chrome:// URLs in BDD tests 2017-02-08 11:32:14 +01:00
Florian Bruhin
1af951fd62 Work around crashes when opening URL after renderer crash
Fixes #2290
2017-02-08 10:56:44 +01:00
Florian Bruhin
2227c037f0 Log ignored lines in end2end tests 2017-02-08 09:45:12 +01:00
Florian Bruhin
208ee04bdc Add simple tests for QtWebEngine renderer crash/kill 2017-02-08 09:41:55 +01:00
Florian Bruhin
7bb8c854bf tests: Make user-agent download hinting more reliable 2017-02-07 23:33:37 +01:00
Florian Bruhin
4b79280ade tests: Use number hint mode to select download
Other screen sizes will give us other letter hints.
2017-02-07 23:23:59 +01:00
Florian Bruhin
bdcd980572 Fix bdd "Then" collision 2017-02-07 22:27:32 +01:00
Florian Bruhin
3f1433dcf7 Merge branch 'webengine-mhtml' 2017-02-07 22:24:25 +01:00
Florian Bruhin
5981bdbedb Skip test failing on Travis
See #2288
2017-02-07 22:23:55 +01:00
Florian Bruhin
eb7064d083 Fix lint 2017-02-07 22:13:33 +01:00
Florian Bruhin
7aa0e900d7 Add mhtml support for QtWebEngine 2017-02-07 22:13:33 +01:00
Florian Bruhin
bae1f41599 Set user-agent for QtWebKit downloads
See #513
2017-02-07 22:00:03 +01:00
Imran Sobir
216cef8d9f Add basic end-to-end test for qute:history. 2017-02-07 16:18:00 +05:00
Florian Bruhin
91bdc00410 Make tests work with QtWebKit-NG
Fixes #1571
2017-02-06 08:48:08 +01:00
Florian Bruhin
348a50ad69 Fix inserting text with QtWebEngine
The insertText event doesn't seem to be available with newer Chromium releases,
which means this broke (probably with Qt 5.7.1).

Fixes #2183
Fixes #2217
2017-02-06 08:06:58 +01:00
Florian Bruhin
5e58764326 Fix lint 2017-02-05 19:52:59 +01:00
Florian Bruhin
2193551035 Simplify test_insert_mode
We already check whether insert mode was entered by listening for "contents: *",
and the copying part is unstable with QtWebEngine.
2017-02-05 18:44:39 +01:00
Florian Bruhin
bcfa84e9f1 Remove QtWebEngine auth test
This now acts differently depending on whether we have sip.assign or not, so
let's just drop this for simplicity.
2017-02-05 17:20:24 +01:00
Florian Bruhin
288c484cdf Fix mhtml file 2017-02-05 00:29:54 +01:00
Florian Bruhin
4cf974796e Replace remaining mentions of The-Compiler/qutebrowser 2017-02-05 00:14:50 +01:00
Florian Bruhin
de50f30b9b Replace all GitHub links 2017-02-05 00:13:11 +01:00
Florian Bruhin
2c46f8ecdb Fix zoom handling with QtWebKit 2017-02-04 23:30:12 +01:00
Florian Bruhin
385969e05f Fix editor.feature with QtWebEngine 2017-02-04 22:16:22 +01:00
Florian Bruhin
e8bbc1adf8 QtWebEngine: Fix insert mode checks with zoom
Fixes #2169
2017-02-04 22:12:41 +01:00
Florian Bruhin
6f0c8245e0 Fix test_insert_mode with QtWebEngine
We can't pretend to enter caret mode now
2017-02-04 22:06:35 +01:00
Florian Bruhin
e01ac4c41f Merge branch 'issue-2204' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-2204 2017-02-04 18:34:51 +01:00
Florian Bruhin
460389c30d Simplify some utilcmds tests 2017-02-04 18:26:12 +01:00
Florian Bruhin
007065b63c Merge branch 'ignore-invalid-register-keys' of https://github.com/blyxxyz/qutebrowser into blyxxyz-ignore-invalid-register-keys 2017-02-04 17:55:07 +01:00
Florian Bruhin
8cdf2f61c7 Merge branch 'enter-mode-blacklist' of https://github.com/blyxxyz/qutebrowser into blyxxyz-enter-mode-blacklist 2017-02-04 17:52:16 +01:00
Florian Bruhin
c1f2f0ac06 Merge branch 'strip-mailto' of https://github.com/blyxxyz/qutebrowser into blyxxyz-strip-mailto 2017-02-04 17:48:53 +01:00
Florian Bruhin
148b34a50b Fix remaining Qt 5.8 QtWebEngine test failures 2017-02-04 13:28:38 +01:00
Florian Bruhin
66719c5ecc Fix lint 2017-02-03 23:55:14 +01:00
Florian Bruhin
20f83316e0 Fix misc.feature with QtWebEngine
We need to make sure we don't leave any stale prompts open.
2017-02-03 23:41:33 +01:00
Florian Bruhin
1f7e9e6b59 Add a testcase for #1613 2017-02-03 23:32:56 +01:00
Florian Bruhin
545539f28d Do more sophisticated clicking for hints with QtWebEngine
We now use click() or focus() in JS if possible, or manually follow links in a
href attribute.

While this probably introduces some new corner cases, it fixes a handful of
older ones:

- window.open() in JS can now be handled correctly as we don't need hacks in
  createWindow anymore.
- Focusing input fields with images now works - fixes #1613, #1879
- Hinting now works better on QtWebEngine with Qt 5.8 - fixes #2273

Also see #70.
2017-02-03 23:21:57 +01:00
Florian Bruhin
e5176e18bd tests: Fix QtWebEngine focus checking 2017-02-01 12:33:47 +01:00
Florian Bruhin
0863c3277c Revert "Disable WebGL for tests"
This reverts commit 2934ffd4d9.
2017-01-25 08:45:18 +01:00
Florian Bruhin
2934ffd4d9 Disable WebGL for tests
See #2250
2017-01-25 08:04:58 +01:00
Florian Bruhin
d9808aefed Switch from CherryPy to cheroot, take 2
This reverts commit 3584eabd6f.
This reverts commit 37dc99c26f.
2017-01-23 07:38:24 +01:00
Jan Verbeek
2700739a3a Strip mailto: when yanking a hint
Resolves #61.
2017-01-21 14:43:50 +01:00
Jan Verbeek
bd3c2f92fc Blacklist some modes for :enter-mode
This disallows using :enter-mode with modes that don't work properly
when entered that way. Fixes #1137.
2017-01-20 19:32:16 +01:00
Jan Verbeek
7e7cac2d48 Ignore non-register keys
Ignore all keys with an empty .text() return value, not just modifier
keys. You can still use unusual things like ß for registers, but
XF86WakeUp is out. Fixes #2125.
2017-01-20 17:34:33 +01:00
Florian Bruhin
37dc99c26f Revert "Switch from CherryPy to cheroot"
This reverts commit 1ab2b3af83.

See https://github.com/cherrypy/cheroot/pull/2
2017-01-20 09:06:49 +01:00
Florian Bruhin
1ab2b3af83 Switch from CherryPy to cheroot
The WSGIServer got split off from CherryPy in a separate project
2017-01-20 08:07:55 +01:00
Florian Bruhin
b74bae2200 Hopefully fix download test on Windows 2017-01-18 08:51:03 +01:00
Florian Bruhin
cc4a8e53df Prevent using %2F as slash in a Content-Disposition header 2017-01-13 18:04:04 +01:00
Florian Bruhin
2f3e671578 Use a tmpdir subdir for download BDD tests 2017-01-13 17:59:03 +01:00
Daniel Schadt
536c76848e add a test for opening mhtml downloads 2017-01-05 19:02:28 +01:00
Daniel Schadt
bd5274af5a fix tests 2017-01-04 17:59:53 +01:00
Florian Bruhin
473df00ae5 Update ace.js to 1.2.6 2016-12-28 17:39:01 +01:00
Florian Bruhin
2d1d078430 Merge branch 'issue-2173' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-2173 2016-12-22 22:24:19 +01:00
Daniel Schadt
4b7818589d make test independent of previous tests 2016-12-22 14:22:37 +01:00
Florian Bruhin
235326d35e Merge branch 'master' of https://github.com/swalladge/qutebrowser into swalladge-master 2016-12-22 07:01:21 +01:00
Florian Bruhin
c7970eb2ee Xfail tests which fail on Docker/Travis
See #2183
2016-12-20 21:32:46 +01:00
Daniel Schadt
a24bcd4243 add a test for remembering the temp download dir 2016-12-20 15:57:00 +01:00
Samuel Walladge
0afa74a9de
remove cat test 2016-12-20 20:48:56 +10:30
Samuel Walladge
a27d7cddb3
fix tests and add another 2016-12-20 20:13:22 +10:30
Samuel Walladge
3d8dedc48b
add tests for default-open-dispatcher 2016-12-20 12:09:30 +10:30
Florian Bruhin
d0372f1730 Decode percent sequences in QtWebEngine downloads
Fixes #2122.
2016-12-09 07:08:51 +01:00
Florian Bruhin
57adcea587 Fix QTBUG-54419 workaround with tabs-are-windows set
Fixes #2162
2016-12-07 07:01:06 +01:00
Florian Bruhin
caf1950868 Set the default zoom initially with QtWebEngine
This solves a part of #1993, however when the user navigates to a
different page, the zoom is reset.
2016-12-06 20:28:18 +01:00
Florian Bruhin
df5ce12ed8 Make it possible to cancel authentication with QtWebEngine
Fixes #2156
2016-12-06 07:45:03 +01:00
Florian Bruhin
7b8af9ebbf Try to stabilize history tests
Sometimes :history-clear would run before about:blank finished loading,
causing the test for :spawn with a history flag to fail.
2016-12-06 06:32:51 +01:00
Florian Bruhin
61ada6ba32 Merge branch 'tab-move' of https://github.com/Raihid/qutebrowser into Raihid-tab-move 2016-12-01 13:25:03 +01:00
Maciej Wołczyk
e613d01263 Fixed problems with tab completion after moving tabs (#2141) 2016-11-30 14:17:20 +01:00
Maciej Wołczyk
729cc61152 Fixed mhtml quopri encoding with spaces and tabs (see: #2063) 2016-11-29 04:03:35 +01:00
Florian Bruhin
c17bbd47b8 Fix QTBUG-54419 workaround for invalid URLs 2016-11-26 13:32:37 +01:00
Florian Bruhin
73c608dce7 Allow :open without URL with -t/-b/-w 2016-11-26 12:17:23 +01:00
Florian Bruhin
98dc92fe16 Remove unused import 2016-11-24 08:50:54 +01:00
Florian Bruhin
34dd30e984 Fix bad merge 2016-11-24 08:29:31 +01:00
Florian Bruhin
002e30a6ca Remove :set --cycle completion test 2016-11-24 07:34:07 +01:00
Florian Bruhin
8ac16c0c4c Update pattern for completion tests 2016-11-24 07:33:50 +01:00
Niklas Haas
32cc6bea1d Add tests for the completion engine
I tested everything that I thought was interesting enough to warrant a
test: especially the ability to test multiple parameters deep, as well
as testing :set --cycle and some involved example to make sure
completion actually works and updates in realtime
2016-11-24 07:31:26 +01:00
Florian Bruhin
3d140a1353 Get rid of --cycle for :set with multiple values
See https://github.com/The-Compiler/qutebrowser/pull/1840#issuecomment-258714784
2016-11-24 07:23:49 +01:00
Niklas Haas
1b5664b72f Add --cycle flag to :set
Chooses the next value from the provided list of values (string-wise
comparison). Technically, the 'option!' syntax for toggling bools is now
redundant, but a translation from 'option!' to '--cycle option false
true' is kept for backwards compatibility.

The '--cycle' flag could also be technically optionally, since the only
thing that depends on it is preserving the error message for specifying
multiple values. (But I think it's best to keep it explicit, as a
principle-of-least-surprise thing)

Note: The business logic of picking the next value and setting it was
moved out to a separate function to avoid tripping pylint's
too-many-branches detector.

Fixes #47
2016-11-24 07:22:06 +01:00
thuck
a254097558 Using log instead of prompt functions for test 2016-11-24 00:05:17 +01:00
Florian Bruhin
371e779d98 Fix tabs.feature 2016-11-23 13:16:15 +01:00
Florian Bruhin
cc8db65b18 Merge branch 'cancel-register-key' of https://github.com/blyxxyz/qutebrowser into blyxxyz-cancel-register-key 2016-11-23 12:53:50 +01:00
Florian Bruhin
552e0551af Revert zero counts
This initially seemed like a nice feature, but it means 0 can't be bound
as a separate key anymore, and 0<Esc> gives weird error messages...

Reverts #1953.
Fixes #2032.
2016-11-23 08:37:29 +01:00
Florian Bruhin
946e3f93f9 Add --enable-webengine-inspector option
Since the inspector can be a security risk, it's now not linked to
developer-extras anymore until QtWebEngine provides a better way to
access it.

See:

https://bugreports.qt.io/browse/QTBUG-50725
http://bouk.co/blog/hacking-developers/
2016-11-23 08:12:13 +01:00
thuck
05d3631750 Test for accidental url opened in a pinned tab 2016-11-23 08:10:13 +01:00
thuck
9dff4299e8 flake8 fixes 2016-11-23 08:10:13 +01:00
thuck
be980a7268 Including tests for pinned tab prompt
Duplicate function for "I wait for a prompt"
2016-11-23 08:10:13 +01:00
thuck
9547938f79 Fix initial tests 2016-11-23 08:10:13 +01:00
thuck
b920de764f Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-23 08:10:11 +01:00
Florian Bruhin
f0cc1de808 Merge branch 'master' of https://github.com/Raihid/qutebrowser into Raihid-master 2016-11-22 20:32:59 +01:00
Maciej Wołczyk
81cbd4c8a0 Hyphen in variable name fixed 2016-11-22 17:39:13 +01:00
Maciej Wołczyk
9d19c3aee6 Changed add to history option name 2016-11-22 17:27:34 +01:00
Florian Bruhin
caf6b74954 Add missing file 2016-11-22 11:42:01 +01:00
Florian Bruhin
c363982d05 Use per-tab QNAM for QtNetwork downloads again
When starting a download due to unsupportedContent being emitted, we
need to use (and later adopt) the page's QNetworkAccessManager.

Since we need the whole adopting logic for that case anyways, let's keep
things as they were and always run downloads in per-tab QNAMs.

This reverts 53e360ec4b and fixes #2134.
2016-11-22 11:10:37 +01:00
thuck
982e4f46e0 Test for accidental url opened in a pinned tab 2016-11-22 07:24:02 +01:00
thuck
175744761b flake8 fixes 2016-11-22 06:57:00 +01:00
thuck
69c82f8563 Including tests for pinned tab prompt
Duplicate function for "I wait for a prompt"
2016-11-21 20:56:34 +01:00
thuck
41adafdec4 Fix initial tests 2016-11-21 20:56:34 +01:00
thuck
bcb0010fcb Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-21 20:56:31 +01:00
Maciej Wołczyk
918b3e2d12 History flag: test added, short version changed, minor fixes 2016-11-21 15:33:38 +01:00
Florian Bruhin
7c88fe318f Handle cancelled SSL prompts correctly
When the user pressed esc during an SSL prompt, the message.ask call
returned None, which was handled fine by QtWebKit (which simply used an
'if') but failed with QtWebEngine (which returned the value to Qt).

Fixes #2123.
2016-11-16 22:13:57 +01:00
Florian Bruhin
25358bb5fc Clean up webelem.text/set_text
webelem.text() was only used without use_js=True from webelem.__str__.
Now we instead default to the use_js=True behavior and renamed the
method from text() to value().

The old behavior is instead directly implemented in __str__.

This changes how webelem.value (aka text) handles elements for which
is_content_editable() returns True, but I haven't found any cases where
this makes a difference.

This also fixes getting existing text from elements with QtWebEngine,
which closes #1957.
2016-11-16 12:34:27 +01:00
thuck
e2a6f97c07 Initial tests 2016-11-16 07:48:12 +01:00
Florian Bruhin
e1928ad991 Mark javascript BDD test as flaky
For some reason it sometimes fails with an error message coming out of
nowhere...
2016-11-15 20:17:51 +01:00
Florian Bruhin
a09a565aea Improve :click-element error message 2016-11-15 19:43:03 +01:00
Florian Bruhin
456ab18f24 Fix double-When in BDD test 2016-11-15 19:36:32 +01:00
Florian Bruhin
d05918ac0b Add custom user-agent support for QtWebEngine 2016-11-15 11:32:05 +01:00
Florian Bruhin
d04534dc33 Reenable @qtwebengine_createWindow tests
Closes #2121
2016-11-15 07:03:13 +01:00
Jan Verbeek
f0d215e07a Change hard-coded escape to leave-mode binding 2016-11-14 23:28:38 +01:00
Florian Bruhin
81d67f8a2c Remove support for an empty data/config/cachedir
See #2115
2016-11-14 23:13:21 +01:00
thuck
abe3c19646 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-14 19:01:49 +01:00
Florian Bruhin
81e8421f62 Stabilize rapid hinting test more 2016-11-14 10:52:30 +01:00
Florian Bruhin
cd3305b4dd Stabilize :hint --rapid test 2016-11-14 09:42:08 +01:00
Florian Bruhin
69452a9813 Fix hint tests 2016-11-14 09:37:01 +01:00
Florian Bruhin
004d0b7ae5 Add missing rapid.html 2016-11-14 09:14:57 +01:00
Florian Bruhin
30827c1239 Fix rapid hinting with QtWebEngine
There were actually two issues here:

- The override_target was reset too early - now
  acceptNavigationRequest/createWindow is responsible for resetting it.
- The QTBUG-54419 workaround opened any tabs in the background instead
  of preserving their position/focus.

Fixes #2086.
2016-11-14 07:14:44 +01:00
thuck
84c41c964b First test for tab-pin 2016-11-13 09:40:07 +01:00
Jan Verbeek
75c996c13e Cancel register key input with escape 2016-11-11 02:45:59 +01:00
Florian Bruhin
2ded5ef6dd tests: Get rid of flaky_once mark 2016-11-10 22:45:27 +01:00
Florian Bruhin
40c5c75a6c tests: Add a js_prompt marker 2016-11-10 22:45:27 +01:00
Florian Bruhin
8d781c68c9 Fix lint 2016-11-10 22:45:27 +01:00
Florian Bruhin
6b14cda5d0 Re-enable SSL download test on QtWebEngine 2016-11-10 22:45:27 +01:00
Florian Bruhin
bbcbb24cb5 Handle feature permissions with QtWebEngine 2016-11-10 22:45:27 +01:00
Florian Bruhin
8f55725555 Fix lint 2016-11-10 22:45:27 +01:00
Florian Bruhin
8a4ca25b8d Avoid circular import 2016-11-10 22:45:27 +01:00
Florian Bruhin
d93bc8b26b Make prompt tests run 2016-11-10 22:45:27 +01:00
Florian Bruhin
6697d692e1 webengine: Initial SSL error support 2016-11-10 22:45:27 +01:00
Florian Bruhin
65625a9dea webengine: Initial support for authentication and javascript prompts 2016-11-10 22:45:27 +01:00
Florian Bruhin
d8d7b42c43 Stabilize macro tests 2016-11-10 09:03:56 +01:00
Florian Bruhin
2ef85d6c35 Fix macros with a mode-switching command 2016-11-10 07:16:52 +01:00
Florian Bruhin
c7fb99878f Move macro tests to keyinput.feature 2016-11-10 06:51:59 +01:00
Florian Bruhin
5d30105a53 Merge branch 'macros' of https://github.com/blyxxyz/qutebrowser into blyxxyz-macros 2016-11-10 06:50:21 +01:00
Florian Bruhin
ac2df2f253 Merge branch 'webengine-downloads-3' 2016-11-09 19:09:58 +01:00
Florian Bruhin
9bc54ebf97 Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js 2016-11-09 14:52:18 +01:00
Kevin Velghe
c36edfb2ba Wait for text being inserted before testing 2016-11-09 14:36:20 +01:00
Florian Bruhin
d80022f3cd Merge branch 'issue1619' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1619 2016-11-09 12:32:52 +01:00
Jan Verbeek
e5dec949b0 Merge https://github.com/The-Compiler/qutebrowser into macros 2016-11-09 12:17:04 +01:00
Florian Bruhin
970e4d3e03 Fix mhtml overwrite prompts
See #2101
2016-11-08 23:23:53 +01:00
Florian Bruhin
19c7d747dd Fix downloads with unknown size with WebEngine 2016-11-08 09:18:10 +01:00
Florian Bruhin
bc1e4385e0 Fix first bunch of download tests 2016-11-08 09:18:09 +01:00
Florian Bruhin
ce1b675a1e Implement :download/hints via QtNetwork 2016-11-08 09:18:09 +01:00
Florian Bruhin
fc6c6d4998 Fix lint 2016-11-08 09:16:47 +01:00
Florian Bruhin
a39fbc8a07 Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js 2016-11-06 22:41:49 +01:00
Florian Bruhin
7256641288 Prevent questions from being aborted twice
When we abort a question (e.g. by closing a tab with SSL errors) while
another prompt is queued, the right prompt gets closed by the question
being aborted, but that in turn aborts the question again, affecting the
next prompt.
2016-11-04 13:21:22 +01:00
Florian Bruhin
15de465dbe bdd: Add a test for keyboard focus with multiple auth prompts 2016-11-04 08:11:06 +01:00
Florian Bruhin
76728f0f73 tests: Allow more auth paths in end2end.fixtures.webserver 2016-11-04 08:11:06 +01:00
Florian Bruhin
fb9415a809 bdd: Allow multiple "When I open" suffixes 2016-11-04 07:20:48 +01:00
Florian Bruhin
a16d41333b Fix prompts while in command mode 2016-11-04 06:48:32 +01:00
Florian Bruhin
3b7f65d956 Show URL in most questions 2016-11-03 08:40:42 +01:00
Florian Bruhin
fefc8c4eb2 Add more tests for prompts 2016-11-03 08:40:42 +01:00
Florian Bruhin
741ecac9ef More improvements for yesno prompt key hints 2016-11-03 08:40:41 +01:00
Florian Bruhin
67cb3cd23e tests: Fix waiting for questions with a text 2016-11-03 08:40:41 +01:00
Kevin Velghe
7a207f7678 There are no events when javascript is disabled 2016-10-31 19:34:32 +01:00
Kevin Velghe
7a9f80bf9a Use jseval to test insert-text with js disabled 2016-10-31 18:26:50 +01:00
Florian Bruhin
b4872192c3 Merge branch 'more-tests' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-more-tests 2016-10-30 23:24:15 +01:00
Florian Bruhin
428637746a Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js 2016-10-30 19:51:25 +01:00
Florian Bruhin
620b952bb2 Merge branch 'jseval-2' of https://github.com/paretje/qutebrowser into paretje-jseval-2 2016-10-30 18:48:14 +01:00
Kevin Velghe
5982787651 Enable javascript again after the test 2016-10-30 17:46:12 +01:00
Kevin Velghe
18420c6978 Test content of textarea without javascript 2016-10-30 16:11:48 +01:00
Kevin Velghe
2d6c443b1a Add test for insert-text with javascript disabled 2016-10-30 12:20:49 +01:00
Kevin Velghe
c537b901f0 Add test for jseval when javascript is disabled 2016-10-30 11:39:25 +01:00
Daniel Karbach
64cf8fcd39 lineparser/utilcmds test cleanup
* fix date in copyright
* remove redundant class docstrings
* don't rename utilcmds module in unit test
* use `mode_manager` fixture in place of FakeModeMan
* some whitespace
2016-10-27 14:23:01 +02:00
Daniel Karbach
e1c467b3a0 move utilcmds specific tests from misc 2016-10-27 14:20:39 +02:00
Florian Bruhin
ece3f3a2e1 Update to pytest-qt 2.1.0 2016-10-26 07:42:41 +02:00
Daniel Karbach
e0d1fafe43 tests for misc.utilcmds 2016-10-24 17:13:38 +02:00
Jan Verbeek
21289a80ad Catch RegisterKeyParser command errors 2016-10-20 17:38:56 +02:00
Daniel Karbach
ef3968c165 setting values tabs->new-tab-position[-explicit]
left -> prev
right -> next
2016-10-18 17:17:17 +02:00
Daniel Karbach
7eafa30084 :tab-close option names
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
845298ae41 :tab-close option names
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
828b7d744a setting values tabs->select-on-remove
left -> prev
right -> next
previous -> last-used

refs #1619
2016-10-18 15:03:01 +02:00
Jan Verbeek
2a304d7a6b Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into macros
Conflicts:
	qutebrowser/commands/runners.py
2016-10-17 19:14:58 +02:00
Kevin Velghe
97493b71ad Add test for null element 2016-10-17 15:25:31 +02:00
Florian Bruhin
229faac9cb Stabilize :session-delete tests 2016-10-14 07:24:36 +02:00
Ryan Roden-Corrent
fbc084e416 Remove :<count>:cmd syntax support.
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.

The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.

This resolves #1997: Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Florian Bruhin
aba67d0822 Add @qtwebengine_todo 2016-10-10 09:30:05 +02:00
Florian Bruhin
6d6655524c Fix quoting 2016-10-10 08:26:32 +02:00
Florian Bruhin
03c0eb244e Remove whitespace at EOL 2016-10-10 07:34:22 +02:00
Florian Bruhin
40eb875fb6 Add a test for private-browsing mode 2016-10-10 07:33:59 +02:00
Florian Bruhin
f7b5a2c9ff Merge branch 'command-history-tests' of https://github.com/sebastian-frysztak/qutebrowser into sebastian-frysztak-command-history-tests 2016-10-10 07:33:46 +02:00
Jan Verbeek
33ff0ba715 Interactively get macro register 2016-10-08 21:17:47 +02:00
Sebastian Frysztak
a8847eacbe Cover HistoryEndReachedError in command_history_next(). 2016-10-08 18:14:37 +02:00
Florian Bruhin
5eed5eb7f7 commit 5708bb0306fb28549fc47e686790d006398c27fa
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Oct 7 07:44:54 2016 +0200

    Turn off private browsing in misc.feature tests
2016-10-07 20:10:39 +02:00
Jan Verbeek
7aaaadac1a Add keyboard macros 2016-10-06 22:24:04 +02:00
Sebastian Frysztak
b8156a0c32 BDD tests for :command-history-prev/next
ref #999
2016-10-06 21:02:15 +02:00
Florian Bruhin
53ef16e26b Try to stabilize test_insert_mode 2016-10-06 10:40:28 +02:00
Florian Bruhin
24eb27e385 Merge branch 'completer_unicode' of https://github.com/rcorre/qutebrowser into rcorre-completer_unicode 2016-10-05 21:15:28 +02:00
Florian Bruhin
ae5e2839ae Revert accidental changes 2016-10-05 15:45:30 +02:00
Florian Bruhin
6be4b74c59 tests: Fix redirect-later-continue with timeout 2016-10-05 15:36:25 +02:00
Florian Bruhin
f6729d23d2 Skip auto-follow-timeout test on OS X
This takes way too long on Travis...
2016-10-05 14:36:05 +02:00
Florian Bruhin
40052c1030 Add @qtwebengine_skip to some @no_xvfb tests 2016-10-05 14:35:25 +02:00
Florian Bruhin
08361e7034 Increase timeout for inhibited key test
It seems this fails on the new Travis OS X image.
2016-10-05 13:26:57 +02:00
Florian Bruhin
8fdc609b32 Improve error for inhibited key test 2016-10-05 13:26:44 +02:00
Ryan Roden-Corrent
2696f9b427 Handle unicode characters in Completer.
Just limit the cursor position to the length of the text to avoid
crashes in this case.

Resolves #2007.
2016-10-04 07:36:49 -04:00
Florian Bruhin
b21f7be03a Remove qtwebengine_todo for position:absolute test 2016-10-03 06:55:58 +02:00
Florian Bruhin
5b11eaad85 Merge branch 'issue1987' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1987 2016-10-03 06:45:01 +02:00
Florian Bruhin
c7b74edfbe Merge branch 'issue1940' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1940 2016-10-03 06:41:19 +02:00
Florian Bruhin
083d847316 Add a test for a zero count 2016-09-30 18:14:36 +02:00
Daniel Karbach
dc344989c6 revised missing userscript error messages 2016-09-30 09:50:49 +02:00
Daniel Karbach
bac22629e3 test for yanking queries with both '&' and ';' 2016-09-30 09:15:05 +02:00
Florian Bruhin
822c100f52 Make 0 a usable count for :tab-focus
Fixes #1768
2016-09-30 08:33:16 +02:00
Daniel Karbach
8eb12c6cb9 improved error messages for inexistent userscripts
fixes #1940
2016-09-29 13:29:39 +02:00
Daniel Karbach
ae674bc4ac test for yanking URLs with '&' in query
for completeness' sake
2016-09-29 11:04:38 +02:00
Daniel Karbach
4aa3ea89b3 test for yanking URLs with ';' separated queries
refs #1987
2016-09-29 10:44:05 +02:00
Florian Bruhin
5b27e06ce2 Add xfailing test for #1945 2016-09-29 07:16:40 +02:00
Florian Bruhin
b0a2bfa3ee tests: Make scrolling checks stricter 2016-09-29 07:13:34 +02:00
Florian Bruhin
450730df2c Add position_absolute.html test file
Supersedes #1984.
2016-09-29 06:49:41 +02:00
Florian Bruhin
609e206816 Use pytest.fail 2016-09-29 06:37:04 +02:00
Florian Bruhin
9eacf42693 Import modules 2016-09-29 06:36:31 +02:00
Daniel Karbach
d00750126e remove superfluous pass statement 2016-09-28 15:50:59 +02:00
Daniel Karbach
7884594f1b simplify checks in version invocation test 2016-09-28 15:31:32 +02:00
Daniel Karbach
73e1460556 test for --version invocation 2016-09-28 14:38:15 +02:00
Ryan Roden-Corrent
14f8ec8754 Error on mode/command mismatch with :bind.
Resolves #1964 (:bind should error for mode/command mismatch)
2016-09-26 08:30:28 -04:00
Ryan Roden-Corrent
6fdd007dbb Simplify mode-checking in command.
Rather than maintaining separate _modes and _not_modes lists, just
build a single _modes list in the constructor.
2016-09-26 08:30:28 -04:00
Florian Bruhin
57d896e989 Fix hints when zoomed with QtWebEngine
We mutated rect (coming from self._js_dict), which means we used the
already adjusted values the second time we called rect_on_view.

Fixes #1863.
2016-09-21 20:09:31 +02:00
Florian Bruhin
6e9501073a Remove @qtwebengine_todo for qute:settings 2016-09-15 16:13:51 +02:00
Florian Bruhin
713a74cfd4 Fix end2end tests 2016-09-15 14:51:22 +02:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
0657eeb8f4 Activate QtWebEngine tests for qute:* 2016-09-14 11:14:04 +02:00
Florian Bruhin
4a14083507 Fix :jseval --world contitional in set_text_field
See #1942
2016-09-13 07:59:21 +02:00
Florian Bruhin
e4192b5158 Yet another flaky test... 2016-09-12 22:49:55 +02:00
Florian Bruhin
1f10c7ff94 Fix broken hint test
The wait we added a few commits earlier was just plain wrong, filtering
the strings isn't going to print that, and shouldn't happen async
anyways...
2016-09-12 22:00:54 +02:00
Florian Bruhin
11abb642ab Remove downloading test with deleting handler
This actually is kind of tricky, and it makes later tests fail because
the tmpdir is suddenly gone...
2016-09-12 20:53:01 +02:00
Florian Bruhin
07e67740cc Add missing jseval.html 2016-09-12 20:02:03 +02:00
Florian Bruhin
08e95f76a6 QtWebEngine: Stabilize/reactivate two hint tests 2016-09-12 18:59:37 +02:00
Florian Bruhin
516bfb5ba3 Un-flaky another test waiting for scrolling 2016-09-12 18:58:31 +02:00
Florian Bruhin
c40325b510 Stabilize "Jumping back after searching" test
The test was flaky because waiting for scrolling didn't actually wait,
as the page logged a scroll position change to 0/0 directly after
loading.

We work around this by making the generic "And I wait until the scroll
position changed" not wait when it changed to 0/0.
2016-09-12 18:53:56 +02:00
Florian Bruhin
9e20e3a802 Skip :jseval with world tests for PyQt < 5.7.0 2016-09-12 18:30:49 +02:00
Florian Bruhin
c9e3cc04cf Accept a name for --world with :jseval 2016-09-12 18:23:23 +02:00
Florian Bruhin
2281f0c790 Fix :insert-text test for QtWebEngine 2016-09-12 15:59:23 +02:00
Florian Bruhin
b2608d7697 Add --world to :jseval 2016-09-12 15:59:17 +02:00
Florian Bruhin
fa78cc9f69 tests: Allow to mark JS errors as expected 2016-09-12 15:57:02 +02:00
Florian Bruhin
b645a88ade Stabilize :insert-text tests
With QtWebEngine, inserting text into the field is async, so if our
test runs too fast, it would fail. Now we instead log stuff via JS on
changes insteaad, and wait for those log messages in the tests.
2016-09-12 15:25:03 +02:00
Florian Bruhin
d988f919d7 Fix test_quteprocess.py 2016-09-12 12:01:31 +02:00
Florian Bruhin
2388489038 downloads: Be okay with the tmpdir being gone 2016-09-12 11:30:44 +02:00
Florian Bruhin
38a3d118ab Nicer linebreaking in _render_log 2016-09-12 11:24:57 +02:00
Florian Bruhin
469c75662e Fix docstring 2016-09-12 11:24:20 +02:00
Florian Bruhin
8afb02eef7 bdd: Don't log VDEBUG lines without --verbose 2016-09-12 11:23:56 +02:00
Florian Bruhin
fff777404b Use QApplication.postEvent again
We had some funny segfaults reported during scrolling (i.e. with
QApplication.sendEvent), and some code already had to use postpone=True
so there was no segfault...

So now we're back to postEvent again, and eliminated the main reason for
segfaults with it, which was re-using (and -posting) events which had
already been posted.

At least during tests this seems to run stable, let's hope it helps for
the people having crashes as well.
2016-09-11 19:37:09 +02:00
Florian Bruhin
ac7ee5ed8b Stabilize :tab-clone tests
Those were flaky with QtWebEngine on OS X:
https://travis-ci.org/The-Compiler/qutebrowser/jobs/159094434
2016-09-11 16:22:20 +02:00
Florian Bruhin
101d30fe1e Make _get_echo_exe_path() private in bdd conftest 2016-09-11 16:15:27 +02:00
Florian Bruhin
1fe2579bb1 Merge branch 'windows-userscripts' of https://github.com/Kingdread/qutebrowser into Kingdread-windows-userscripts 2016-09-11 16:14:25 +02:00
Florian Bruhin
11ee5befcc Fix download tests on Windows 2016-09-11 15:53:46 +02:00
Florian Bruhin
4c55963dc3 Fix lint 2016-09-10 17:32:04 +02:00
Florian Bruhin
b2d8905d68 Remove {downloaddir} in downloads.feature
We can just use (tmpdir) instead which we already use everywhere else as
well.
2016-09-10 16:42:27 +02:00
Florian Bruhin
d13f88f0ac Add lots of new BDD tests for downloads 2016-09-10 16:42:26 +02:00
Florian Bruhin
dc8396986e FIx expected message in test_invocations 2016-09-10 16:42:26 +02:00
Florian Bruhin
a21cd9f56e Set remove-finished-downloads in download tests 2016-09-10 16:42:26 +02:00
Florian Bruhin
17caf80f2a bdd: Add "I wait for the javascript message" step 2016-09-10 16:42:26 +02:00
Florian Bruhin
9f1aacc4f0 Move pdfjs check to the end2end conftest 2016-09-10 16:24:31 +02:00
Florian Bruhin
230cd40b12 Add a test for a misconfigured XDG_DOWNLOAD_DIR
See #866 and #1269.
2016-09-09 18:46:51 +02:00
Florian Bruhin
a4d0449e19 Use a shorter XDG_RUNTIME_DIR for temp_basedir_env
Otherwise with longer test names, we can't listen to the IPC server as
the filename is too long for a local socket.
2016-09-09 18:46:51 +02:00
Florian Bruhin
143a4af91b Improve :download-open tests 2016-09-09 18:46:51 +02:00
Florian Bruhin
b5b46332c7 Add test for downloading to an inexistent dir 2016-09-09 18:46:51 +02:00
Florian Bruhin
d64241bed9 Add a test for a download without content-size 2016-09-09 18:46:51 +02:00
Florian Bruhin
2177aa574c Improve download BDD tests
This reorganizes the existing tests a bit and adds some new ones.
2016-09-09 18:46:51 +02:00
Florian Bruhin
7611281563 Add basename to "download finished" message 2016-09-09 18:46:51 +02:00
Florian Bruhin
d0cf452ec8 Remove :prompt-yes and :prompt-no
Those are replaced by :prompt-accept yes and :prompt-accept no
2016-09-09 15:59:00 +02:00
Florian Bruhin
d579697245 Add a value argument to :prompt-accept 2016-09-09 15:48:42 +02:00
Daniel Schadt
b0114768c7 fix spawn tests on Windows
On Windows, no echo.exe exists normally, so calling echo from the tests
is no good idea, since it relies on Cygwin to be installed and in %PATH%
(so that echo.exe is available).

This fixes this by providing a small echo.bat which is callable from the
tests, and then using a platform-specific path to the executable instead
of the hardcoded "echo". This should ensure that the tests pass even on
systems where echo.exe is not installed.

Note that we can't simply use a do-nothing exe (like rundll or hh.exe),
as we're passing parameters, and those executables may behave
differently in the presence of those parameters.
2016-09-08 23:14:10 +02:00
Daniel Schadt
f6c6f766cd add newline at the end of the file 2016-09-08 23:13:00 +02:00
Florian Bruhin
93428c4e2b Skip instead of xfail JS prompt test on WebEngine
We probably get stuck with a visual JS prompt, so for some reason the
following header tests fail.
2016-09-07 20:25:56 +02:00
Florian Bruhin
26025214ed Mark session loading tests with @qtwebengine_flaky 2016-09-07 19:03:41 +02:00
Florian Bruhin
a119e9d5b0 Mark :insert-text with undo test as xfail on OS X 2016-09-07 19:01:24 +02:00
Florian Bruhin
44d1056e54 QtWebEngine: Implement custom HTTP headers 2016-09-07 18:29:38 +02:00
Florian Bruhin
3ce9e795a1 Add a simple end2end test for :adblock-update 2016-09-07 16:27:27 +02:00
Florian Bruhin
fca37abf55 QtWebEngine: Implement webelem.classes 2016-09-07 12:31:48 +02:00
Florian Bruhin
522049132b Add a test for hinting with ACE editor 2016-09-07 12:28:12 +02:00
Florian Bruhin
c267776491 Add missing :leave-mode for insert-mode test
Otherwise we hint while still in insert mode - while this seems to work
fine, let's do things the cleaner way.
2016-09-07 11:21:27 +02:00
Florian Bruhin
948fa033c7 Implement :insert-text for QtWebEngine 2016-09-07 11:20:32 +02:00
Florian Bruhin
919196714b QtWebEngine: Implement WebEngineScroller.at_bottom 2016-09-07 09:32:51 +02:00
Florian Bruhin
cf6cffeb08 tests: Ignore "Xlib: sequence lost" error 2016-09-06 22:10:34 +02:00
Florian Bruhin
08302c5a5f Apply @qtwebengine_flaky (too) liberally 2016-09-06 22:10:28 +02:00
Florian Bruhin
1106104700 Add a @qtwebengine_flaky marker 2016-09-06 21:43:02 +02:00
Florian Bruhin
37b1c26e1c Don't check active win for WebEngine session test 2016-09-06 21:22:50 +02:00
Florian Bruhin
e3e7366863 Make pylint shut up 2016-09-06 21:21:37 +02:00
Daniel Schadt
22ac19b151 style fixes 2016-09-06 20:33:48 +02:00
Florian Bruhin
c58a0e926f Skip scrolling tests on Qt < 5.7
This fixes tests on OS X on Travis, since Homebrew is still on Qt 5.6.
2016-09-06 20:29:58 +02:00
Florian Bruhin
22d9c49169 Stabilize scrolling in :repeat-command test 2016-09-06 19:34:38 +02:00
Florian Bruhin
010a52efb8 Stabilize :tab-detach test in invoke.feature
When we detach a tab, we need to wait until the page is actually loaded
in the newly detached tab before saving the session.
2016-09-06 19:33:09 +02:00
Florian Bruhin
c59a1535c5 Don't check active window in session test
This is flaky as we don't know which window is actually focused.
2016-09-06 19:29:12 +02:00
Daniel Schadt
0ab1902c98 add an userscript test for Windows 2016-09-06 18:41:24 +02:00
nanjekyejoannah
d3e19ec8fc Add general -> yank-ignored-url-parameters 2016-09-06 18:19:40 +02:00
Florian Bruhin
e77bf62ace Remove unnecessary @qtwebengine_createWindow tags
Since we did now remove the error message, some more tests actually run
fine without the createWindow patch.
2016-09-06 18:04:54 +02:00
Florian Bruhin
7356e32b94 QtWebEngine: Don't search the Holy Grail 2016-09-06 17:38:13 +02:00
Florian Bruhin
fcaadb9352 Stabilize :save-session --force test 2016-09-06 17:04:13 +02:00
Florian Bruhin
c6d6483929 bdd: Show what exactly failed with InvalidLine 2016-09-06 17:00:25 +02:00
Florian Bruhin
7f013b7808 Fix lint 2016-09-06 17:00:25 +02:00
Florian Bruhin
ce1b2e6f15 quteprocess: Only wait for first about:blank load
We accidentally marked all about:blank lines as waited for...
2016-09-06 17:00:25 +02:00
Florian Bruhin
8b3517af7b bdd: Skip another flaky QtWebEngine tabs test 2016-09-06 17:00:25 +02:00
Florian Bruhin
c07ff15b9b bdd: Display milliseconds in log output 2016-09-06 17:00:25 +02:00
Florian Bruhin
52649aea70 bdd: Improve output when line was already found 2016-09-06 15:55:22 +02:00
Florian Bruhin
db7de0d619 tests: Set waited_for for initial about:blank load
Otherwise, subsequent lines where we wait for about:blank will fall back
on the older one and not actually wait.
2016-09-06 15:50:36 +02:00
Florian Bruhin
82180429ed Add missing wait in :undo test 2016-09-06 15:50:27 +02:00
Florian Bruhin
4b431fdf61 Add some more @qtwebengine_createWindow tags 2016-09-06 15:28:30 +02:00
Florian Bruhin
8a5d7455c1 Skip some broken :undo tests with QtWebEngine 2016-09-06 15:28:19 +02:00
Florian Bruhin
7b9b08a167 QtWebEngine: Fix session tests 2016-09-06 15:13:43 +02:00
Florian Bruhin
85b3d08c66 bdd: Fix scrolling tests with QtWebEngine
Scrolling happens async with QtWebEngine, so we add a new log output
when the page was scrolled, and wait for that in various places.
2016-09-06 14:58:33 +02:00
Florian Bruhin
f6392d730f Stabilize test in invoke.feature
When we use about:blank, the wait doesn't actually wait (because we
already did open about:blank earlier), so we need to use another URL or
this test will be flaky.
2016-09-06 14:04:54 +02:00
Florian Bruhin
2e49368b51 Add missing @qtwebengine_createWindow tag 2016-09-06 13:56:41 +02:00
Florian Bruhin
1ed637a906 QtWebEngine: Initial session implementation 2016-09-06 13:55:35 +02:00
Florian Bruhin
4f55b435f0 Move various session unit tests to BDD tests 2016-09-06 13:55:28 +02:00
Florian Bruhin
108c091894 Get rid of test_smoke.py
If anything is broken in those tests, other tests are going to be broken
as well, so this is just a waste of time.
2016-09-06 08:05:23 +02:00
Florian Bruhin
26aeff2332 testprocess: Don't fail if it was never started 2016-09-06 08:05:23 +02:00
Florian Bruhin
d819ce1b18 Read --qute-bdd-webengine in test_invocations.py 2016-09-06 08:05:16 +02:00
Florian Bruhin
ff5bfced9d Skip flaky QtWebEngine :forward test 2016-09-05 22:05:12 +02:00
Florian Bruhin
59300cb71e Add tests for js-can-open-windows-automatically 2016-09-05 17:25:52 +02:00
Florian Bruhin
0b3656c446 tests: Don't wait for nonexistant log message 2016-09-05 17:25:41 +02:00
Florian Bruhin
525d5ce922 Mark another flaky test with @qtwebengine_skip 2016-09-05 17:10:30 +02:00
Florian Bruhin
22be46e7d3 Skip flaky QtWebEngine test 2016-09-05 16:53:27 +02:00
Florian Bruhin
f26ce3a8ff Only add BDD markers if condition matches
This should make multiple markers on the same test work correctly.
2016-09-05 16:49:17 +02:00
Florian Bruhin
bdc1885f6d Add missing @qtwebengine_createWindow marker 2016-09-05 16:48:21 +02:00
Florian Bruhin
61270b8f92 Fix lint 2016-09-05 16:21:30 +02:00
Florian Bruhin
ba718a2b9d end2end: Improve output when subprocess exits
We don't really have the "infrastructure" set up yet to have proper log
output at that point, but we can always just show the log output as part
of the exception.
2016-09-05 16:19:22 +02:00
Florian Bruhin
c6142df3ec bdd: Re-add test for #906 for QtWebEngine 2016-09-05 15:53:31 +02:00
Florian Bruhin
6151a5faa7 bdd: Fix handling of @qtweb{kit_engine}_* tags 2016-09-05 15:53:19 +02:00
Florian Bruhin
21fe8f43f9 tests: Fix handling of QUTE_BDD_WEBENGINE
The tryfirst decorator somehow messed up handling of other pytest
marks... Also we need to do this in the root conftest for it to work
properly.
2016-09-05 15:32:12 +02:00
Florian Bruhin
f2c4cedf61 QtWebEngine: Don't add invalid URLs to history 2016-09-05 15:08:00 +02:00
Florian Bruhin
8115fa2af8 Re-enable some createWindow tests 2016-09-05 15:08:00 +02:00
Florian Bruhin
a52c8d6576 Clean up javascript double-close test
The test for QtWebEngine was removed because something weird happened
with the two pytest-bdd tags, and I'm too annoyed with everything being
broken to investigate now... Future me, I'm sorry.
2016-09-05 15:08:00 +02:00
Florian Bruhin
ce98d89352 Add some (crashing...) window.open/.close tests 2016-09-05 15:08:00 +02:00
Florian Bruhin
cf89204ac3 Only skip because of QTBUG-54419 with WebEngine 2016-09-05 15:08:00 +02:00
Florian Bruhin
141b7c5893 Increase timeout in auto-follow-timeout test 2016-09-05 15:08:00 +02:00
Florian Bruhin
ebf093bb6e tests: Skip unittests with QUTE_BDD_WEBENGINE 2016-09-05 15:08:00 +02:00
Florian Bruhin
19ac488997 tests: Add QUTE_BDD_WEBENGINE environment variable 2016-09-05 15:08:00 +02:00
Florian Bruhin
cf070d48f2 WebEngine: Disable createWindow for Qt < 5.7.1
Fixes #1911.

The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
2c2375ff18 Add a separate QtWebEngine test for #906 2016-09-05 15:08:00 +02:00
Florian Bruhin
30327b2acf Move end2end tag handling to end2end/conftest.py 2016-09-05 15:08:00 +02:00
Florian Bruhin
6c6e98aac4 Add a @qtwebkit_skip marker 2016-09-05 15:08:00 +02:00
Florian Bruhin
30c07e9b5c tests: Add url to window_open.html 2016-09-05 15:08:00 +02:00
Florian Bruhin
a4cd0291a6 Implement QWebEngineView.createWindow 2016-09-05 15:08:00 +02:00
Florian Bruhin
a85ea92a21 Merge branch 'open-editor-all-modes' of https://github.com/kobezda/qutebrowser into kobezda-open-editor-all-modes 2016-09-05 10:59:53 +02:00
Ján Kobezda
da65f7234a Allow :open-editor in modes other than insert
':open-editor' can now be run in all modes.

Resolves #1902
2016-09-04 22:23:16 +02:00
Florian Bruhin
ea4f4e197f Handle elements which are out of view correctly
Fixes #1910
2016-09-04 21:09:15 +02:00
Florian Bruhin
faa052ad6f Fix hang with multiple spaces in URL completion 2016-09-04 20:19:16 +02:00
Florian Bruhin
6798583e91 Merge branch 'test_yanking' of https://github.com/julianuu/qutebrowser into julianuu-test_yanking 2016-09-01 22:05:21 +02:00
Ryan Roden-Corrent
24a5bffbd8 Test for completion warnings with 1 item.
Add a regression test for #1600: Warnings from completionwidget when it
only has 1 item.

Addresses #1899.
2016-08-31 22:25:34 -04:00
Julian Weigt
fc3c93d3dd run test for clipboard also if selection is not supported 2016-08-30 11:30:32 +02:00
Florian Bruhin
1c0cbc3269 Improve qute:settings tests 2016-08-29 07:09:14 +02:00
Florian Bruhin
5917f34eab Merge branch 'settings' of https://github.com/lahwaacz/qutebrowser into lahwaacz-settings 2016-08-29 06:52:17 +02:00
Jakub Klinkovský
b272fce2cf fix test for setting an invalid value via qute://settings 2016-08-26 15:33:35 +02:00
Jakub Klinkovský
9ff945c56f add tests for qute://settings 2016-08-26 14:51:40 +02:00
Florian Bruhin
187bfa8fce tests: Use pytest_register_assert_rewrite 2016-08-26 06:22:03 +02:00
Florian Bruhin
2650d9350d bdd: Improve webserver error on unexpected status
pytest 3.0 removed the assertion reinterpretation which made this nice:
https://github.com/pytest-dev/pytest/issues/1871
2016-08-25 22:58:14 +02:00
Julian Weigt
853e75e3db Split test for yanking 2016-08-25 13:41:47 +02:00
Julian Weigt
193d219eaf Added test for yanking 2016-08-24 17:39:52 +02:00
Florian Bruhin
8c9bf96435 Merge branch 'test_no_dict' of https://github.com/julianuu/qutebrowser into julianuu-test_no_dict 2016-08-23 23:08:51 +02:00
Florian Bruhin
77aa8b4337 pylint: Use ignored-modules for pytest
See https://github.com/PyCQA/astroid/pull/357
2016-08-23 07:45:31 +02:00
Florian Bruhin
3b6286f71a Remove old pylint suppression for ssl.PROTOCOL_* 2016-08-23 07:45:15 +02:00
Florian Bruhin
23c4c89a0f tests: Set __tracebackhide__ to a callable
This allows us to only filter the exceptions we actually want to hide.

See #1877
2016-08-23 07:28:08 +02:00
Florian Bruhin
df3733af54 tests: Use pytest.fixture instead of yield_fixture
See #1877
2016-08-22 07:40:24 +02:00
Florian Bruhin
80a3920aad Revert "Revert "tests: Use getfixturevalue""
This reverts commit c8fe21c85f.
2016-08-22 07:24:17 +02:00
Julian Weigt
be89e8f499 Add check that qutebrowser defaults to letter hints 2016-08-21 19:37:30 +02:00
Florian Bruhin
c8fe21c85f Revert "tests: Use getfixturevalue"
This reverts commit 961d33b712.
2016-08-21 16:59:54 +02:00
Florian Bruhin
961d33b712 tests: Use getfixturevalue
See #1877
2016-08-21 16:18:33 +02:00
Julian Weigt
f98ba7ba0e Added test for empty dictionary 2016-08-21 15:33:55 +02:00
Florian Bruhin
679165ebab Remove unneeded import 2016-08-19 19:02:12 +02:00
Florian Bruhin
99c2f8eca5 Add missing import 2016-08-19 19:02:02 +02:00
Florian Bruhin
dec0f0753d Relax the checking in :view-source test 2016-08-19 17:22:07 +02:00
Florian Bruhin
3b897d6a64 bdd: Move :debug-log-* near :log-capacity tests 2016-08-19 15:05:45 +02:00
Florian Bruhin
6781f6409b bdd: Test :debug-log-capacity with negative value 2016-08-19 15:05:20 +02:00
Florian Bruhin
33e71525ed bdd: Test :debug-log-filter with invalid filter 2016-08-19 15:04:11 +02:00
Florian Bruhin
75c3b1a9f8 Fix test for :debug-log-level with invalid level
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
Florian Bruhin
37758131f5 Delete broken :debug-log-{filter,level} tests 2016-08-19 14:43:42 +02:00
knaggita
bd6f4ae7c0 Add end2end tests issue52 2016-08-19 14:21:06 +02:00
knaggita
1d5a3a6175 Add :debug-loglevel :debug-logfilter commands 2016-08-19 14:12:19 +02:00
Florian Bruhin
b5444338ba Fix lint 2016-08-19 13:35:39 +02:00
Florian Bruhin
f7a7e82939 bdd: Skip another flaky backforward test with qtwe 2016-08-19 13:15:45 +02:00
Florian Bruhin
2eae6a0603 bdd: Wait less for xfailing tests
We now divide all timeouts by ten for xfailing tests, with the hope to
still catch newly passing tests, but not spend too much time waiting.

With a quick test, this reduced the testsuite run length from 12 to
7-8 minutes.
2016-08-19 13:11:29 +02:00
Florian Bruhin
362c23692a Change quteproc._request back to quteproc.request
Otherwise our per-test quteproc fixture wouldn't set the 'request'
object properly from the outside, and quteproc always had a module as
request.node.
2016-08-19 13:05:59 +02:00
Florian Bruhin
8378e16139 Fix ignored tag in misc.feature
Seems like pytest-bdd ignores that second tag...
2016-08-19 12:20:23 +02:00
Florian Bruhin
6cd890aa19 bdd: Set request object on QuteProc 2016-08-19 12:15:50 +02:00
Florian Bruhin
c0c3279424 Fix test_quteprocess.test_set with QtWebEngine
network -> accept-language is not available for QtWebEngine, and we
simply need a setting which accepts an arbitrary string.
2016-08-19 11:25:59 +02:00
Florian Bruhin
3d1859b13e Fix lint 2016-08-19 00:05:56 +02:00
Florian Bruhin
a88adcca17 bdd: Stop checking requests in yankpaste.feature
It's not needed and only makes the test more unreliable (e.g. flaky with
QtWebEngine)
2016-08-18 23:58:33 +02:00
Florian Bruhin
044b3df872 bdd: Skip another flaky test for QtWebEngine 2016-08-18 23:47:27 +02:00
Florian Bruhin
fa0bde631d bdd: at_top is actually implemented (scroll) 2016-08-18 23:47:09 +02:00
Florian Bruhin
ea0f137fd1 bdd: Tag flaky backforward test qtwebengine_skip 2016-08-18 23:33:56 +02:00
Florian Bruhin
44c74c0887 tests: Mark test_mhtml_e2e as qtwebengine_todo 2016-08-18 23:32:26 +02:00
Florian Bruhin
914ce85780 tests: Fix quteproc_new fixture 2016-08-18 23:31:18 +02:00
Florian Bruhin
33755b09df Skip :insert-text in test_insert_mode in webengine 2016-08-18 23:30:35 +02:00
Florian Bruhin
4d1ae999c6 tests: Allow to mark files as qtwebengine_todo 2016-08-18 23:28:37 +02:00
Florian Bruhin
322a4323cb Improve file validating in test_hints 2016-08-18 23:28:27 +02:00
Florian Bruhin
1eb0eabdab test_hints_html: Split off _parse_file 2016-08-18 23:14:21 +02:00
Florian Bruhin
63cc73d56d Try to make test_hints work with QtWebEngine 2016-08-18 23:10:37 +02:00
Florian Bruhin
94e3d7b050 Mark test_dirbrowser as qtwebengine_skip 2016-08-18 23:05:31 +02:00
Florian Bruhin
339ac42623 bdd: Mark :insert-text tests as @qtwebengine_todo 2016-08-18 23:04:03 +02:00
Florian Bruhin
d2f69db0ff bdd: Mark qute:bookmarks tests as qtwebengine_todo 2016-08-18 23:00:10 +02:00
Florian Bruhin
63628d2f97 bdd: Wait for any focus object in tabs.feature
With QtWebEngine, we get a "Focus object changed" logged pointing to the
QOpenGLWidget, not the tab.
2016-08-18 22:57:21 +02:00
Florian Bruhin
50031c5aae bdd: xfail in check_open_tabs for QtWebEngine 2016-08-18 22:54:41 +02:00
Florian Bruhin
15f142880e bdd: Mark qute:settings test as @qtwebengine_todo 2016-08-18 22:52:36 +02:00
Florian Bruhin
1763f9bb58 bdd: Mark search/sessions as qtwebengine_todo 2016-08-18 22:50:57 +02:00
Florian Bruhin
2969d3dc91 bdd: Mark prompt.feature as TODO on QtWebEngine 2016-08-18 22:47:11 +02:00
Florian Bruhin
84b8ea856d bdd: Skip :scroll-page+navigate tests on webengine 2016-08-18 22:46:48 +02:00
Florian Bruhin
8da942ddc7 bdd: Skip tests on WebEngine causing memory leaks 2016-08-18 22:46:32 +02:00
Florian Bruhin
1c581cf1cf quteproc: Ignore failing messages on xfail
When a test calls pytest.xfail it might stop early, so the message
doesn't get marked as ignored.
2016-08-18 22:23:29 +02:00
Florian Bruhin
d5131aa0a4 navigate.feature: Add @qtwebengine_todo 2016-08-18 22:23:11 +02:00
Florian Bruhin
69514df126 hints.feature: Skip flaky test on QtWebEngine 2016-08-18 22:22:56 +02:00
Florian Bruhin
0557fea79e Use QApplication.sendEvent instead of postEvent
From the QApplication.postEvent docs:
http://doc.qt.io/qt-5/qcoreapplication.html#postEvent

  The event must be allocated on the heap since the post event queue
  will take ownership of the event and delete it once it has been
  posted. It is not safe to access the event after it has been posted.

We can't reliably guarantee that from Python, so we need to use
sendEvent instead.
2016-08-18 21:36:43 +02:00
Florian Bruhin
25faa04196 bdd: Add qtwebengine tags in misc.feature 2016-08-18 20:34:03 +02:00
Florian Bruhin
788eebc1ad bdd: Ignore "Running without the SUID sandbox!" 2016-08-18 19:29:34 +02:00
Florian Bruhin
577f1b850a bdd: Make :jseval tests work with QtWebEngine 2016-08-18 19:26:50 +02:00
Florian Bruhin
d298787b1a bdd: Make marks.feature work with QtWebEngine 2016-08-18 19:22:18 +02:00
Florian Bruhin
105c1952a8 bdd: Skip scroll checks with QtWebEngine 2016-08-18 19:20:48 +02:00
Florian Bruhin
2cbaf0ccb3 Add @qtwebengine_todo in javascript.feature 2016-08-18 18:44:07 +02:00
Florian Bruhin
e477b810bd bdd: Mark backforwards test as qtwebengine_todo 2016-08-18 18:29:10 +02:00
Florian Bruhin
0c50e7dfb9 WebEngine: Don't bother running downloads.feature 2016-08-18 18:28:41 +02:00
Florian Bruhin
f03cd5022e pylint doesn't know pytest.xfail 2016-08-18 18:27:24 +02:00
Florian Bruhin
ab4e442602 QtWebEngine: Don't bother running caret.feature 2016-08-18 18:26:31 +02:00
Florian Bruhin
001e839ca9 Remove qtwebengine_todo for backforward.feature 2016-08-18 18:22:44 +02:00
Florian Bruhin
2d97ffa323 bdd: xfail in compare_session with WebEngine 2016-08-18 18:20:25 +02:00
Florian Bruhin
e950b09027 tests: Get history.feature to work with WebEngine 2016-08-18 18:17:01 +02:00
Florian Bruhin
8d381aaa01 tests: Improve @qtwebengine_* markers
This uses xfail for @qtwebengine_todo and adds a new @qtwebengine_skip
marker.
2016-08-18 18:16:33 +02:00
Florian Bruhin
4b7a3db0eb tests: QtWebEngine: Make hints.feature work 2016-08-18 17:50:52 +02:00
Florian Bruhin
0b9aec873f tests: Accept HTTP "not modified" as status
It seems like QtWebEngine sends some caching headers QtWebKit didn't?
2016-08-18 17:44:35 +02:00
Florian Bruhin
5e8254d470 bdd: Mark some hint tests as @qtwebengine_todo 2016-08-18 17:43:50 +02:00
Florian Bruhin
745614e45d BDD: Wait until hints are ready after hinting
With QtWebEngine, hinting happens async, so we need to wait for
"hints: ..." in the log before we can actually follow a hint.
2016-08-18 17:21:50 +02:00
Florian Bruhin
d7110069bb Fix broken :repeat-command test 2016-08-18 16:58:56 +02:00
Florian Bruhin
a06dcc7f0b BDD: Use :click-element instead of hints 2016-08-18 16:25:58 +02:00
Florian Bruhin
4719e11e78 Add a test for :click-element with --target 2016-08-18 15:58:46 +02:00
Florian Bruhin
cc9b776476 tests: Use :click-element in editor.feature 2016-08-18 15:58:40 +02:00
Florian Bruhin
0cef4ac2db Add a :click-element command 2016-08-18 15:30:04 +02:00
Florian Bruhin
28a6b3918c Fix lint 2016-08-18 14:42:42 +02:00
Florian Bruhin
da73a7123c Add quteproc.click_element_by_id 2016-08-18 13:24:47 +02:00
Florian Bruhin
c37c501b25 Mark download BDD tests as TODO for QtWebEngine 2016-08-18 13:16:52 +02:00
Florian Bruhin
7515438f88 Skip back/forward BDD tests for now 2016-08-18 13:12:07 +02:00
Florian Bruhin
082fc5667e Remove requests check for :back/:forward test 2016-08-18 13:06:42 +02:00
Florian Bruhin
e10b7ba8ab tests: Add @qtwebengine_todo marker 2016-08-18 13:05:37 +02:00
Florian Bruhin
01fd7cd210 Merge branch 'issue1060' of https://github.com/haasn/qutebrowser into haasn-issue1060 2016-08-17 12:01:53 +02:00
Florian Bruhin
8d6b905f95 Merge branch 'insert-text' of https://github.com/blyxxyz/qutebrowser into blyxxyz-insert-text 2016-08-16 13:29:42 +02:00
Florian Bruhin
2d7d47dc30 Rewrite word hint test as BDD test
See #1842.
2016-08-16 13:08:49 +02:00
Florian Bruhin
8e6d784fd7 Merge branch 'fix_hints_autofollow' of https://github.com/lahwaacz/qutebrowser into lahwaacz-fix_hints_autofollow 2016-08-16 12:58:56 +02:00
Niklas Haas
c2cc28a72b
Add new-instance-open-target.window = first-opened
Fixes #1060.

In the process of adding this, I also decided to rewrite
mainwindow.get_window() for clarity (and also because flake8 was warning
about complexity).

Also adds some tests to the new-instance-target mechanism, in particular
a specific test for the issue in question.
2016-08-16 12:24:38 +02:00
Florian Bruhin
cf0b12b5a9 Merge branch 'var_replacements' of https://github.com/lahwaacz/qutebrowser into lahwaacz-var_replacements 2016-08-16 11:49:31 +02:00
Florian Bruhin
380856bcb2 Merge branch 'navigate-count' of https://github.com/pvsr/qutebrowser into pvsr-navigate-count 2016-08-16 11:21:07 +02:00
Florian Bruhin
9d7d307aa5 Merge branch 'winonly' of https://github.com/haasn/qutebrowser into haasn-winonly 2016-08-16 11:02:49 +02:00
Peter Rice
ad9dfc1981 add end-to-end tests for navigating with a count 2016-08-16 04:28:31 -04:00
Michael Hoang
8608c6b8b3 Remove unnecessary fresh instance requirement for test 2016-08-16 08:04:54 +10:00
Michael Hoang
c0ab474b21 Give error when trying to detach a single tab 2016-08-16 07:36:39 +10:00
Jakub Klinkovský
befaf4f6dc fix nested expansion of {variables} in command args 2016-08-14 15:29:16 +02:00
Niklas Haas
b6145d98a4
Remove some unnecessary "fresh instances" in tests
With the addition of :window-only, it's no longer necessary to use
"Given I have a fresh instance" to clean up previous windows. This
greatly cuts down on the amount of process restarts that need to happen
to complete a full testing cycle.

I also made one of the tests more robust against order alterations, and
removed some unnecessary extra commands that were already implied by the
background on others.
2016-08-12 00:20:57 +02:00
Niklas Haas
d5080bdb1a
Add :window-only command
I mainly added this so I can speed up all of the tests that rely on
closing other windows.
2016-08-11 23:37:14 +02:00
Florian Bruhin
cd0b5e6889 Merge branch 'test_short_dict' of https://github.com/julianuu/qutebrowser into julianuu-test_short_dict 2016-08-11 19:31:39 +02:00
Julian Weigt
5913c55864 Fixed syntax and improved test 2016-08-11 20:41:02 +02:00
Julian Weigt
060a3998c6 Merge remote-tracking branch 'upstream/master' into test_short_dict 2016-08-11 17:51:45 +02:00
Florian Bruhin
fe3c748e44 Fix another navigation request log 2016-08-11 17:47:13 +02:00
Florian Bruhin
20517e9a8f Adjust navigation request logging in hints.feature 2016-08-11 16:38:51 +02:00
Jakub Klinkovský
9b1c07e2e2 add tests for hints auto-follow in word mode 2016-08-11 15:20:52 +02:00
Julian Weigt
6973c93fa7 Added test to check handling of the case of a too small dictionary 2016-08-11 15:06:24 +02:00
Jan Verbeek
79ab5da45b Update test comment 2016-08-11 14:04:30 +02:00
Florian Bruhin
aafdc225bc tests: Use last history item to check scroll pos 2016-08-11 11:56:11 +02:00
Florian Bruhin
bb2eee6178 Add a test for #1821 2016-08-11 11:49:56 +02:00
Florian Bruhin
c12aeea670 tests: Move data/scroll.html to data/scroll/simple 2016-08-11 11:47:55 +02:00
Jan Verbeek
e7367bd949 Make :insert-text test platform-independent
The test for inserting text at a specific position failed because
<Ctrl+Right> doesn't behave the same on Windows and Linux. This changes
it to move the cursor using other keys.
2016-08-11 02:26:48 +02:00
Jan Verbeek
28430a4e43 Make test_insert_mode Windows-compatible 2016-08-11 01:36:03 +02:00
Jan Verbeek
4966debd61 Deprecate :paste-primary to :insert-text {primary} 2016-08-10 21:55:16 +02:00
Florian Bruhin
57896dc00e Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip 2016-08-10 20:38:54 +02:00
Jan Verbeek
efa53ac25e Add variable tests 2016-08-10 19:42:03 +02:00
Florian Bruhin
3b34032b4b Merge branch 'feature/undo-to-old-pos' of https://github.com/airodactyl/qutebrowser into airodactyl-feature/undo-to-old-pos 2016-08-10 17:47:25 +02:00
Jakub Klinkovský
073e5555ca add more tests for hints auto-follow 2016-08-10 16:12:09 +02:00
Florian Bruhin
144895d35e Mark test_invocations.test_optimize as not_frozen 2016-08-10 15:05:55 +02:00
Florian Bruhin
a35b6e2279 Fix testprocess test for custom environment 2016-08-10 14:02:04 +02:00
Michael Hoang
66dcc391ba Add tests to check :undo opens in the old position 2016-08-10 21:52:02 +10:00
Florian Bruhin
e51b763c93 testproc: Pass through full system environment
Let's just rely on tox for environment isolation, otherwise we just
break stuff on Windows.
2016-08-10 13:23:15 +02:00
Jakub Klinkovský
605e90a222 simplify hints auto-follow tests 2016-08-10 13:14:21 +02:00
Jakub Klinkovský
f69c02a2b1 tests: fix hints auto-follow tests 2016-08-10 13:05:53 +02:00
Jakub Klinkovský
a31565f46e hints: make auto-follow a quadruple option instead of binary 2016-08-10 12:40:16 +02:00
Florian Bruhin
75bdd1f797 quteproc: pass through QT_QPA_PLATFORM_PLUGIN_PATH 2016-08-10 10:33:26 +02:00
Florian Bruhin
cc0579bd1a Merge branch 'bind-alias' of https://github.com/rcorre/qutebrowser into rcorre-bind-alias 2016-08-10 09:35:28 +02:00
Florian Bruhin
9aa6c8cf36 Automatically terminate quteproc_new after a test
This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
2016-08-10 09:30:24 +02:00
Florian Bruhin
61c031ff23 Merge branch 'lastfocus' of https://github.com/haasn/qutebrowser into haasn-lastfocus 2016-08-10 09:09:58 +02:00
Florian Bruhin
f0133624bf Add some tests for -OO logging 2016-08-10 09:05:04 +02:00
Ryan Roden-Corrent
245212efa1 Allow binding to an alias.
Fix #1813: Cannot :bind to alias
2016-08-09 21:37:12 -04:00
Niklas Haas
6d181e5c6f
Add new-instance-open-target.window setting
This adds the ability to open new tabs in the last-focused window
instead, which fixes #1801.

Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)

To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
2016-08-10 00:06:12 +02:00
Florian Bruhin
fb3da578c5 Fix lint 2016-08-09 17:28:14 +02:00
Florian Bruhin
13f80e3f63 Merge branch 'hintmodes' of https://github.com/haasn/qutebrowser into haasn-hintmodes 2016-08-09 16:14:07 +02:00
Niklas Haas
62e58c0ab9
Add a --mode flag to :hints
This allows a specific keybinding, for whatever reason, to override the
default mode. Examples of when this could be useful:

* :hint --rapid --mode=word  (to type them more rapidly)
* :hint --mode=letter input  (if the default mode is number)

Also reword the description of 'group' to make the distinction between
'group' and 'mode' clearer.
2016-08-09 15:34:13 +02:00
Florian Bruhin
2d48a8013f tests: Don't set ssl-strict with QtWebEngine 2016-08-09 15:13:26 +02:00
Jan Verbeek
ebfe23c376 Merge https://github.com/The-Compiler/qutebrowser into clip
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Jan Verbeek
0177dafbd0 Add {clipboard} and {primary} to replace :paste
:paste is deprecated and replaced by equivalents using :open and the
new variables, and :open supports opening newline-separated lists of
URLs.
2016-08-06 22:03:50 +02:00
Marshall Lochbaum
54ba27cf77 Merge :yank-selected into :yank (fixes #820)
Changes :yank's flag arguments to a positional "what" argument
specifying the object to be yanked. Including "selection" as a
possibility allows for the replacement of :yank-selected with
:yank selection.
2016-08-05 22:01:17 -04:00
Florian Bruhin
8cc9f30eba Add a BDD test for :debug-log-capacity 2016-08-05 15:13:36 +02:00
Florian Bruhin
466a87af6a Merge branch 'end2endTest4@844' of https://github.com/nanjekyejoannah/qutebrowser into nanjekyejoannah-end2endTest4@844 2016-08-04 18:21:43 +02:00
Florian Bruhin
08b70f0f4c Add qutebrowser.utils.javascript
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
nanjekyejoannah
6431cd2395 added closing body tag 2016-08-04 15:43:58 +03:00
nanjekyejoannah
04b007986f end2end testcase for #844 2016-08-04 13:47:14 +03:00
Daniel Schadt
8730dc6f8e tests: use :hint instead of :hint all download
:hint all download does not use the response headers to determine the
filename (the prompt is shown before a request is even done), so our
long filename was pretty useless.

:hint works because it does a request first and uses the right filename,
but we need to wait until the prompt is shown before we can do
:prompt-open-download, since the request is a bit slower and would fail
otherwise.
2016-08-04 11:16:43 +02:00
Daniel Schadt
b9b3bdf9dd Minor Text Fixes 2016-08-04 11:03:05 +02:00
Daniel Schadt
e21bdab2c0 rename function to remove duplicate 2016-08-04 02:14:46 +02:00
Daniel Schadt
47b455957f tests: actually download file
Otherwise the :prompt-open-download will throw an error since the
request is not fast enough.
2016-08-04 01:47:02 +02:00
Daniel Schadt
8f4377937d use shlex.quote instead of "{}" 2016-08-04 01:41:50 +02:00
Daniel Schadt
cbe60b0638 add tests for download with special characters
See issue 1726.
2016-08-04 01:24:08 +02:00
Daniel Schadt
d2107498a2 add a test for downloads with long filenames
See issue #1725.
2016-08-04 01:06:42 +02:00
Daniel Schadt
afa7494c5f add tests for download-open/prompt-open-download
This has tests for
* standard :download-open
* standard :prompt-open-download
* :prompt-open-download + cancel the download (issue #1728)
2016-08-03 17:59:32 +02:00
nanjekyejoannah
4e93e04468 end2end testcase for issue #844 2016-08-03 18:55:33 +03:00
Florian Bruhin
23ce4561c8 Fix lint 2016-08-03 16:48:48 +02:00
Florian Bruhin
9851a13981 Add utils.random_port() 2016-08-03 13:08:55 +02:00
Florian Bruhin
1fb4aa3532 Merge branch 'tab-open-implicit' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-open-implicit 2016-08-03 09:16:49 +02:00
Florian Bruhin
a49c524b00 tests: Ensure LogLine gets the right json type 2016-08-03 09:06:58 +02:00
Marshall Lochbaum
97a249d8a6 Rewrite tests in open.feature 2016-08-02 15:27:26 -04:00
Marshall Lochbaum
66adbc9323 Add --implicit flag to :open 2016-08-02 13:49:25 -04:00
Marshall Lochbaum
8a127f2839 Remove cmdutils.arg_or_count 2016-08-02 11:31:03 -04:00
Florian Bruhin
424758a6d1 Use HTML content for localstorage test
JS logging is disabled by QtWebKit in private browsing mode
2016-08-02 15:18:25 +02:00
Florian Bruhin
43ff1b0d97 Tunnel private-browsing to QtWebKit correctly 2016-08-02 14:19:31 +02:00
Florian Bruhin
5ec39b7540 Fix crash when opening http://foo%40bar@baz 2016-08-01 17:18:14 +02:00
Florian Bruhin
4414f5fea9 Merge branch 'tab-move-index' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-move-index 2016-08-01 16:17:09 +02:00
Florian Bruhin
86669600ff Consider input elements without type for hinting 2016-08-01 15:49:50 +02:00
Marshall Lochbaum
a7438f4f15 Extend tab-move's direction argument to take an index (fixes #1701) 2016-07-29 23:06:51 -04:00
Claire Cavanaugh
e409eafe2a Add test for opening a quickmark 2016-07-28 23:36:05 -07:00