Commit Graph

980 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
42243d3d97 Add more performance logging to completion. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
b1b521e0c2 Fix two history tests added recently.
These were added on master and needed to be adjusted slightly for the
new history check (which doesn't rely on reading a history file
anymore).
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
20000088de Add debug-dump-history and fix sql history tests.
Trying to read from the sql database from another process was flaky.
This adds a debug-dump-history command which is used by the history BDD
tests to validate the history contents.

It outputs history in the old pre-SQL text format, so it might be
useful for those who want to manipulate their history as text.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
eb61269068 Fix qute://history javascript for SQL.
Returning "next" was no longer possible as the SQL query does not fetch
more items than necessary. This is solved by using a start time, a
limit, and an offset. The offset is needed to prevent fetching duplicate
items if multiple entries have the same timestamp.

Two of the history tests that relied on qute://history were changed to
rely on qute://history/data instead to make them less failure-prone.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
a8ed9f1c2f Fix qute://version sql init bug.
Calling sql.init() in version.version() would replace the existing sql
connection and cause a crash when accessed by opening qute://version.

Now version relies on sql already being initted, and app.py inits sql early if
the --version arg is given.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
231bbe7c2b Fix race condition on history tests.
Two history end2end tests are failing because sqlite is not flushing to disk in
time to be read by the test process. My understanding is that sqlite should
take an exclusive lock while writing, so it is difficult to understand why this
is happening. This can be fixed by adding a delay, but that seems flaky.

I'm fixing it by checking qute://history instead of reading the database file.

See:
https://github.com/qutebrowser/qutebrowser/pull/2295#issuecomment-292786138
and the following discussion.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
3e63b62d6e Fix pylint/flake8 for sql work. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
8ff45331df Clean up sql implementation.
Now that sql is only used for history (not quickmarks/bookmarks) a number of
functions are no longer needed. In addition, primary key support was removed as
we actually need to support multiple entries for the same url with different
access times. The completion model will have to handle this by selecting
something like (url, title, max(atime)).

This also fixes up a number of tests that were broken with the last few
sql-related commits.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
be07107b1c Fix end2end completion tests for SQL backend.
Change the logging to report the completion function name and have the end2end
tests check for this.

Remove the tests for realtime completion, as it was decided this is not an
important feature and the code is much simpler without it.
2017-06-19 07:42:12 -04:00
Florian Bruhin
9b5227b987 Improve test_version output 2017-06-19 09:06:18 +02:00
Florian Bruhin
9cc688ea2b Fix initial tab sizing with vertical tabbar 2017-06-16 23:00:16 +02:00
Iordanis Grigoriou
e14477375b Fix typo in test 2017-06-16 12:41:30 +02:00
Iordanis Grigoriou
f28d523225 Select the last focused tab when running ':tab-focus <current tab number>' 2017-06-16 12:28:56 +02:00
Florian Bruhin
54154e2434 Mark :stop test as flaky
Looks like the requests sometimes aren't updated, but I have no idea why.
2017-06-12 18:15:05 +02:00
Florian Bruhin
38d54cb112 Stabilize history tests
Get current URL right away in :view-source, and wait until source is shown in
the test.
2017-06-12 18:13:17 +02:00
Florian Bruhin
57fbfbd606 Set an initial window size for background tabs
When we open a background tab, it gets a hardcoded size (800x600 or so) because
it doesn't get resized by the layout yet.

By resizing it to the size it'll actually have later, we make sure scrolling to
an anchor in an background tab works, and JS also gets the correct size for
background tabs.

Fixes #1190
Fixes #2495
See #1417
2017-06-11 17:48:01 +02:00
Florian Bruhin
ad260366ef Remove ":messages without messages" test
We can never know for sure there aren't any messages - for example, on Travis we get a message about XDG_RUNTIME_DIR being unset on Qt 5.9.
2017-06-09 11:04:21 +02:00
Florian Bruhin
250da212cd Adjust tests for new QtWebKit-NG 2017-06-09 10:28:41 +02:00
Florian Bruhin
ddf4521305 Fix :messages tests 2017-06-08 14:16:30 +02:00
Florian Bruhin
a5af98b063 Add a few tests for qutebrowser.is_ignored_chromium_message 2017-06-06 16:26:01 +02:00
Florian Bruhin
cb03fb7d80 Make process/thread ID optional for Chromium messages
Looks like at least on Travis they're not always there.
2017-06-06 16:18:53 +02:00
Florian Bruhin
998f93dfd3 tests: Properly parse Chromium logging messages
Closes #2519
2017-06-06 10:01:45 +02:00
Florian Bruhin
73249d8abe Adjust ignored Chromium messages for Qt 5.9 debug builds 2017-06-05 21:57:53 +02:00
Florian Bruhin
eb9a0c01ba Set backend-warning-shown in test_invocations 2017-05-30 16:49:39 +02:00
Florian Bruhin
b32223acc7 Only inherit private mode when window is set
Otherwise, everything calling _open in a private window (like :quickmark-load)
will open a new window.
2017-05-29 06:37:28 +02:00
Florian Bruhin
8bd6974042 Open a window with an empty session
With general -> save-session on and only private windows open, we can easily get
a session file with "windows: []" in it. If we loaded such a file, we got no
windows at all when qutebrowser started.

Fixes #2664
2017-05-28 11:15:51 +02:00
Florian Bruhin
ea2fbc427a tests: Use match= for pytest.raises 2017-05-23 09:36:00 +02:00
Florian Bruhin
af7923de4d tests: Use pytest.param 2017-05-23 08:08:46 +02:00
Florian Bruhin
c32c01ffc0 Merge commit '419793c0b9ff4f293babea7623dcaf4787bbaa35' 2017-05-22 07:55:44 +02:00
Jay Kamat
00f001729b
Fix undo with pinned tabs
Add tests for undo with a pinned tab
Add tests for clone with a pinned tab
2017-05-21 21:03:33 -07:00
Florian Bruhin
c4fb2bc609 Fix URL/renderer crash tests with Qt 5.9
The behavior in Qt changed there (in a good way), so we need to adjust the tests
accordingly.

Fixes #2514
2017-05-19 08:10:17 +02:00
Florian Bruhin
e3f5e8ca9a Disable local storage test for now
It also seems to run unstable on Windows (AppVeyor), so we probably need to wait
for qutewm to run it.
2017-05-17 20:38:30 +02:00
Florian Bruhin
00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
12520bf4ba Install PyQt from PyPI for pylint
This means we can be sure to have QtWebEngine available and won't have QtWebKit.
2017-05-17 19:08:59 +02:00
Florian Bruhin
dd15b4b953 Fix local storage test
Looks like it needs a window manager to run properly...
2017-05-17 13:38:21 +02:00
Florian Bruhin
e0ff2d98fe Test for private browsing differently
In a48ea597d0 we fixed settings in private
QtWebEngine windows.

However, this means we also enable local storage for private windows, which was
disabled in QtWebEngine by default:

4ef5831a39 (diff-44ac7d27348388501944f6a8e2e67d8dR207)

It should be safe to enable it, as we get the same behavior as in Chromium, i.e.
a working local storage which entirely lives in RAM.

This also makes those tests work on QtWebKit-NG, presumably because private
browsing for cookies is implemented there.

It also adds a test to at least check whether local storage is isolated from
non-private tabs. I tried writing a test which ensures nothing lands on the hard
disk, but due to QTBUG-52121 this might not happen at all:

https://bugreports.qt.io/browse/QTBUG-52121
2017-05-17 09:42:28 +02:00
Florian Bruhin
a48ea597d0 Set websettings on each profile's setting object
Turns out QWebEngineSettings.globalSettings() only sets things on the default
profile. We now get everything from the default profile settings, but set it on
both the default and the private profile.

Fixes #2638

(cherry picked from commit b11a4388cd10b6ff2fd917fca689ebdc50d581ae)
2017-05-17 06:31:51 +02:00
Jay Kamat
5e3c68530a
Regenerate documentation 2017-05-16 21:03:33 -07:00
Jay Kamat
1142a19de9
Add (pinned) keyword to 'following tabs open' tests 2017-05-16 20:16:43 -07:00
Florian Bruhin
407537dbe6 tests: Wait until window is closed after :close
If we don't wait here, we might end up running the subsequent commands (like
:command-history-prev) on the old window while it's still closing, causing an
exception at least on AppVeyor:

    Traceback (most recent call last):
      File "C:\projects\qutebrowser\qutebrowser\app.py", line 110, in <lambda>
        target_arg=target_arg))
      File "C:\projects\qutebrowser\qutebrowser\app.py", line 265, in process_pos_args
        win_id = mainwindow.get_window(via_ipc, force_tab=True)
      File "C:\projects\qutebrowser\qutebrowser\mainwindow\mainwindow.py", line 89, in get_window
        window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
    RuntimeError: wrapped C/C++ object of type MainWindow has been deleted
2017-05-16 15:46:20 +02:00
Florian Bruhin
d0dd1644af Set user agent correctly on QtWebEngine 2017-05-16 06:46:45 +02:00
Florian Bruhin
086139110d Merge branch 'new-private-browsing' 2017-05-16 06:32:15 +02:00
Florian Bruhin
c4307c9f03 Fix lint 2017-05-15 11:07:43 +02:00
Florian Bruhin
3f8b9fb1a5 tests: Improve matching of exceptions to show verbose output
In some situations we can get a TypeError without a stack
2017-05-15 11:07:43 +02:00
Florian Bruhin
3c3f695af4 Fix things pointed out in reviews 2017-05-15 11:07:43 +02:00
Florian Bruhin
8993667479 Remove unused imports 2017-05-15 11:02:29 +02:00
Florian Bruhin
c3ac3ccdee Add tests for new private browsing 2017-05-15 11:02:29 +02:00
Florian Bruhin
9805b43c85 Handle private browsing in sessions 2017-05-15 11:02:29 +02:00
Florian Bruhin
157a0af908 Hopefully fix failing history test on old Qt 2017-05-15 10:29:13 +02:00
Florian Bruhin
5b1d35bef9 Don't add data: URLs to history 2017-05-15 09:04:16 +02:00
Jay Kamat
17169812be
Misc cleanup and fixes 2017-05-14 00:21:51 -07:00
Jay Kamat
a5eb3e27f8
Fix some bugs in session saving test case 2017-05-12 17:48:38 -07:00
Jay Kamat
2ae1bfc033
Keep pinned tabs in place rather than moving them. 2017-05-12 13:09:22 -07:00
Jay Kamat
3e3f4b4164
Add :tab-only tests for --force 2017-05-12 11:06:17 -07:00
Jay Kamat
66dfb1b1c9
Fix a bug with titles not being refreshed when pinning tabs 2017-05-12 09:53:25 -07:00
Florian Bruhin
203a5dff74 Get rid of webelem.FILTERS
There's actually no good reason to filter javascript links as we might want to
click them (or copy their URL) just like any other link - this fixes #2404.

With that being gone, we don't need FILTERS at all anymore, as we can check for
existence of the href attribute in the CSS selector instead.
2017-05-12 09:41:12 +02:00
Jay Kamat
4c28487fd0
Warn user if pinned tab is closed via tab-only 2017-05-11 14:30:45 -07:00
Jay Kamat
cb654225fd
Add a test case for loading/saving pinned tabs in sessions 2017-05-11 14:05:25 -07:00
Jay Kamat
3317834b36
Fix a bug where pinned tabs were occasionally miscounted
Example case: :tab-only. This should cover other cases, but currently those
cases (such as :tab-only) do NOT have a warning message when popping up.
2017-05-11 13:28:26 -07:00
Jay Kamat
725bafea54
Merge branch 'master' into jay/pintab 2017-05-10 23:51:33 -07:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Jay Kamat
a3d41c0467
Refactor search method of AbstractBrowserTab into a field 2017-05-09 00:24:13 -07:00
Jay Kamat
02f79c2990
Add tests for manual selection 2017-05-09 00:11:25 -07:00
Jay Kamat
5ba81e3611
Add tests for follow_selected 2017-05-08 22:32:53 -07:00
Florian Bruhin
90b0af97ce Improve serialization crash check
It now works correctly with view-source URLs and is disabled on Qt 5.9.

Fixes #2289
See #2458
2017-05-03 23:15:17 +02:00
Florian Bruhin
ea2d5e97e2 Disable serialization crash check on Qt 5.9 2017-05-03 21:31:09 +02:00
Florian Bruhin
7c6981e512 Remove unused imports 2017-05-02 10:41:51 +02:00
Florian Bruhin
d5c5d09b18 Hopefully stabilize test_version
When using QuteProcess here, we fight with it over who can read the output.
Just use a raw QProcess instead.
2017-05-02 09:12:06 +02:00
Florian Bruhin
7b4ab901e9 tests: Fix Chromium message matching 2017-05-02 08:24:57 +02:00
Florian Bruhin
bffdea6719 Read qWebKitVersion in qtutils.is_webkit_ng.
This means we need to try and import qWebKitVersion in qtutils, but better there
than at every place which calls it.
2017-04-28 21:36:02 +02:00
Florian Bruhin
8101fe99a8 Fix starting with Python 2
Fixes #2567
2017-04-28 20:51:38 +02:00
Florian Bruhin
421aa0d319 Also try harder to get text content 2017-04-28 19:11:02 +02:00
Florian Bruhin
c8090b5388 Don't wait for click message in webelem tests
Looks like we get this sometimes:

----> Waiting for 'Clicked non-editable element!' in the log
14:02:14.976 DEBUG    webview    webkittab:find_at_pos:618 Hit test result element is null!
14:02:14.976 DEBUG    mouse      mouse:_mousepress_insertmode_cb:149 Got None element, scheduling check on mouse release
14:02:14.977 DEBUG    mouse      webview:mousePressEvent:299 Normal click, setting normal target
14:02:14.978 DEBUG    mouse      mouse:mouserelease_insertmode_cb:173 Element vanished!
2017-04-28 17:29:19 +02:00
Florian Bruhin
20da495376 Add missing file 2017-04-28 15:22:29 +02:00
Florian Bruhin
a2c8e093f4 Move webelement checks to javascript.feature 2017-04-28 15:16:36 +02:00
Florian Bruhin
6458c692cb Improve JS value type checks 2017-04-28 15:15:32 +02:00
Florian Bruhin
0c653c4703 Handle elem.className in webelem.js 2017-04-28 14:48:30 +02:00
Florian Bruhin
513f83d446 Try harder to get tag name from element
This could happen for any of the attributes, but for tagName this actually
happens in the wild... Since elem.tagName is equal to elem.nodeName we just try
to use this.

Fixes #2569
2017-04-28 14:48:30 +02:00
Florian Bruhin
d62ebdb926 Make most of search BDD tests work with QtWebEngine 2017-04-27 21:02:26 +02:00
Florian Bruhin
046401c489 Clean up search.feature 2017-04-27 08:20:55 +02:00
Florian Bruhin
ad9e82b91e Adjust bookmark tests 2017-04-16 21:13:01 +02:00
Florian Bruhin
1d0f187fab Adjustments for new pylint version 2017-04-13 18:22:16 +02:00
Florian Bruhin
4a480e6f5f Ignore Chromium NETLINK message 2017-04-12 13:24:10 +02:00
Fritz Reichwald
68c655bd9c Add period at end of docstring to make flake happy 2017-04-12 10:21:03 +02:00
Fritz Reichwald
b00c1dc906 Add docstring 2017-04-12 09:23:29 +02:00
Fritz Reichwald
ff767dd965 Add neccessary metadata to py script 2017-04-12 08:47:39 +02:00
Fritz Reichwald
c38dc95c23 Add posix to stdin test beacause the py script fails on windows 2017-04-12 07:59:40 +02:00
Fritz Reichwald
b784ddeddd Also test stdin close for detached start 2017-04-12 07:40:11 +02:00
Fritz Reichwald
590a9b4f78 Indent with spaces and minor changes 2017-04-12 07:32:40 +02:00
Fritz Reichwald
424d0aec5a change test_stdinclose.py to stdinclose.py 2017-04-12 07:31:24 +02:00
Fritz Reichwald
75f8d2a1d1 Test if stdin gets closed when starting QProcess 2017-04-12 06:54:39 +02:00
Florian Bruhin
fc37223d1b Regenerate docs properly for qute:help test 2017-04-09 11:36:13 +02:00
Florian Bruhin
778832a813 Set path when redirecting qute:* URLs
Fixes #2513
2017-04-08 23:04:10 +02:00
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