Commit Graph

2866 Commits

Author SHA1 Message Date
Florian Bruhin
df0bd23d79 Make pylint shut up about test_version 2017-06-19 13:42:19 +02:00
Florian Bruhin
4ae8e247d0 Show 'legacy QtWebKit' in version output 2017-06-19 10:24:33 +02:00
Florian Bruhin
df6c4c6e73 Fix earlyinit.qt_version issues 2017-06-19 09:42:49 +02:00
Florian Bruhin
9b5227b987 Improve test_version output 2017-06-19 09:06:18 +02:00
Florian Bruhin
fdba676933 Move version.qt_version() to earlyinit
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Florian Bruhin
9cc688ea2b Fix initial tab sizing with vertical tabbar 2017-06-16 23:00:16 +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
8df0b063be Get rid of utils.unused because it's unused 2017-06-06 17:04:21 +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
6d175fbb4b Get rid of configtypes.WebKitBytes 2017-06-06 16:17:44 +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
27ea9a6954 Fix test_debug_trace 2017-06-05 20:17:39 +02:00
Florian Bruhin
eac284d880 Skip test_opengl_vendor without QtOpenGL
The test fails on Ubuntu Xenial because QtOpenGL is not installed.
This isn't a problem with real-life usage though, as we only call it with
QtWebEngine, and that ensures that QtOpenGL is available.
2017-05-31 10:29:46 +02:00
Florian Bruhin
912cea6e7d Improve version.opengl_vendor()
On Windows with OpenGL ES we can't use versionFunctions, so we just return None
early.

Also, this fixes some lint and adds a smoke test.
2017-05-30 19:23:27 +02:00
Florian Bruhin
eb9a0c01ba Set backend-warning-shown in test_invocations 2017-05-30 16:49:39 +02:00
Florian Bruhin
4cb82af11e Add QUTE_FAKE_OS_RELEASE envvar 2017-05-30 07:37:10 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +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
0f3a17ae88 Fix raw string prefix 2017-05-23 10:09:06 +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
aa8e6c8d17 Add parsed distribution to version info
Fixes #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
fe145b66c1 Add a version.distribution()
See #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
964b06bf7e Fix shadowed import 2017-05-19 09:26:48 +02:00
Florian Bruhin
f66c1a0e44 Merge commit '3d9729839d6d9b5ee5d38afdf6ddf410dfca2027' into abbradar/pac-fix 2017-05-19 08:36:39 +02: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
Nikolay Amiantov
3d9729839d Fix crash on PAC evaluation error 2017-05-18 16:54:49 +03: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
9408babef5 Also remove test for removed assertion 2017-05-16 12:56:25 +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