Florian Bruhin
fede64ba7a
Add test for configdata.is_valid_prefix
2017-07-04 15:08:01 +02:00
Florian Bruhin
18eb133811
configdata: Make sure default values are valid
2017-07-04 15:08:01 +02:00
Florian Bruhin
0857a45b0a
configtypes: parse regex flags properly
2017-07-04 15:08:01 +02:00
Florian Bruhin
6733e92b50
Handle files correctly in utils.yaml_dump
2017-07-04 15:08:01 +02:00
Florian Bruhin
001312ca82
Disallow Booleans for configtypes.Int.from_py
2017-07-04 14:42:56 +02:00
Florian Bruhin
4e729bb9ec
Back to using json in test_configtypes
...
It returns one-line data and is YAML compatible
2017-07-04 14:42:56 +02:00
Florian Bruhin
dfee857466
Make utils.yaml_dump return str
2017-07-04 14:42:56 +02:00
Florian Bruhin
05dc94ccc4
Improve configtypes tests
2017-07-04 14:42:56 +02:00
Florian Bruhin
7416164aca
Rename old validate tests
2017-07-04 14:42:56 +02:00
Florian Bruhin
71f2e8c577
None validation fixups for test_configtypes
2017-07-04 14:42:56 +02:00
Florian Bruhin
61ba92ae18
configtypes: Separate str/py basic validation
...
This also ensures the behavior for none_ok is consistent.
2017-07-04 14:42:56 +02:00
Florian Bruhin
cdbd64a30d
Move test_configtypes_hypothesis to test_configtypes
2017-07-04 14:42:56 +02:00
Florian Bruhin
7e7fbf106b
Fix lint and old config options
2017-07-04 14:42:56 +02:00
Florian Bruhin
63bdee8b55
Initial configtype tests update
2017-07-04 14:42:56 +02:00
Florian Bruhin
1022b7ea32
Make jinja templating more strict
...
This ensures we actually know when an AttributeError happens.
It also changes most external code to use the correct environment, rather than
simply creating a jinja2.Template, which wouldn't use the more tightened
environment.
2017-07-02 22:17:33 +02:00
Florian Bruhin
aa6f229e6b
Add utils.yaml_{load,dump}
2017-07-02 22:17:33 +02:00
Florian Bruhin
3e3685b68b
Initial configexc refactoring
2017-07-02 22:17:33 +02:00
Florian Bruhin
5ec47da127
Get rid of configtypes.AutoSearch and IgnoreCase
2017-07-02 22:17:33 +02:00
Florian Bruhin
938946c48b
configdata: Add check for shadowing keys
2017-07-02 22:17:33 +02:00
Florian Bruhin
52f6ea2525
Initial parsing
2017-07-02 22:17:33 +02:00
Florian Bruhin
d132b6ed71
Fix :scroll-page with --bottom-navigate on QtWebEngine
...
There were two issues here:
- The comparison was backwards, causing scroller.at_bottom() to always return
true.
- When zoomed in, jsret['px']['y'] can be a float, which means we can be
slightly off when checking the difference - math.ceil() fixes that.
2017-06-29 22:39:48 +02:00
Florian Bruhin
5ec94f96fd
Allow a trailing % for :zoom
2017-06-26 21:51:35 +02:00
Florian Bruhin
cb5cd1a910
Remove old test_commands.py
2017-06-20 15:20:32 +02:00
Florian Bruhin
994e8c692f
Merge different FakeTabbedBrowser objects
2017-06-20 15:19:53 +02:00
Florian Bruhin
750ef834dc
Make PyOpenGL a required dependency
...
Looks like the "black screen" issue isn't the only thing going wrong, some
people even report segfaults since the vendor check was added.
2017-06-20 13:05:53 +02:00
Florian Bruhin
06d4a24bd1
Merge branch 'master' of https://github.com/iordanisg/qutebrowser
2017-06-20 12:45:21 +02:00
Iordanis Grigoriou
f0ff02fcb2
Avoid throwing exception when no last focused tab exists
2017-06-19 15:48:17 +02:00
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
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
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
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
65952ca290
Fix webkitelem tests
2017-05-12 13:57:33 +02:00
Florian Bruhin
9e2aa65c02
Remove webelem.Group.prevnext
...
Apart from checking for buttons with an href attribute (which made no sense at
all and should never return any element) this was identical to
webelem.Group.links.
2017-05-12 09:41:12 +02: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
c6e31391de
Fix most tests/lint
2017-05-10 09:19:24 +02:00
Florian Bruhin
1c50377c0a
Initial work on new private browsing
2017-05-10 07:00:21 +02:00