Florian Bruhin
00bdb60627
Ignore "Dropping message on closed channel." message
...
This seems to happen with this test in tabs.feature with Qt 5.11:
Scenario: :buffer with wrong argument (-1)
It only happens ~1/50 times though, and seems like some Qt bug.
See #3661
2018-03-23 07:59:46 +01:00
Florian Bruhin
11696f0073
Fix test_configinit
2018-03-20 22:16:16 +01:00
Florian Bruhin
f9d976880e
Disable shared web workers on Qt < 5.11
2018-03-20 21:14:04 +01:00
Florian Bruhin
a5f1022330
Log document.body in JS tests
2018-03-20 11:56:46 +01:00
Florian Bruhin
85d3d4baba
Mark test_set_error as flaky
2018-03-20 10:25:03 +01:00
Florian Bruhin
561295238d
Another try at stabilizing test_set_error
2018-03-20 08:58:48 +01:00
Florian Bruhin
81827a3150
Try to stabilize stylesheet tests
2018-03-20 07:05:03 +01:00
Florian Bruhin
32145d579b
Merge branch 'pyup-scheduled-update-2018-03-19'
2018-03-20 07:00:37 +01:00
Florian Bruhin
a374698693
Fix lint
2018-03-20 06:38:11 +01:00
Florian Bruhin
32df91fbae
Merge remote-tracking branch 'origin/pr/3604'
2018-03-20 06:24:57 +01:00
Florian Bruhin
ea1e52ea7c
Load page before loading stylesheets
...
If we don't do this, when doing:
self.config_stub.val.content.user_stylesheets = css_path
then _update_stylesheet gets called before the stylesheet QWebEngineScript did
run (as there was no load yet), so we get:
[:2] Uncaught TypeError: Cannot read property 'stylesheet' of undefined!
Instead, load the page first and then update the stylesheet.
This tests that live updating works properly, and also makes sure we don't run
into the problem described above.
2018-03-19 21:44:47 +01:00
Florian Bruhin
b588f54a53
Fail javascript tests on logging messages
2018-03-19 20:43:55 +01:00
Florian Bruhin
1162e640c5
Remove unused imports
2018-03-19 19:42:56 +01:00
Florian Bruhin
0ea7a1457d
Make test_position_caret work again
...
The tests only work properly with QtWebKit (and aren't needed on QtWebEngine).
Also, for some reason the scrolled_down tests only work without Xvfb.
2018-03-19 19:38:21 +01:00
Florian Bruhin
f5d7605ae0
Add a :scroll-to-anchor command
...
Fixes #2784
2018-03-19 19:18:33 +01:00
Florian Bruhin
460bd86579
Initial attempt at using the tab API for tests/unit/javascript
2018-03-19 18:18:21 +01:00
Florian Bruhin
e43f0a61b9
Move all QWebEngineScript related code out of webenginesettings
...
It looks like there's some issue with QWebEngineScript in a profile, at least
with older Qt versions...
See #3497 , #3377
2018-03-19 17:33:02 +01:00
Florian Bruhin
33066af51d
Break long comment
2018-03-19 13:59:30 +01:00
Florian Bruhin
6a971e2846
Ignore OnDidStopLoading error message
...
See #3661 , https://bugreports.qt.io/browse/QTBUG-66661
2018-03-19 12:13:10 +01:00
Florian Bruhin
bee04a1eec
Wait until runner is finished in test_custom_env
...
This seems to at least lead to less warnings when running the test.
2018-03-19 11:43:08 +01:00
Florian Bruhin
232fd19422
Fix unit tests after refactoring
2018-03-19 09:53:35 +01:00
Florian Bruhin
1b84bbd61d
Refactor initialization of internal JavaScript
...
- Initialize JavaScript in webenginesettings.py instead of webenginetab.py
- Move JavaScript snippet into a .js file
- Make sure scripts can be re-run and do nothing if already run.
- Run scripts on DocumentCreation *and* DocumentReady. Closes #3717 .
- Give each script an unique name for debugging.
- Also make custom stylesheets work on chrome:// pages
2018-03-19 09:14:55 +01:00
Florian Bruhin
8a3d9c0c01
Adjust ignored log messages for Qt 5.11
2018-03-18 18:58:29 +01:00
gammelon
f57e47c742
Separate tests for _get_search_url
2018-03-16 11:42:51 +01:00
Florian Bruhin
1d25b212d5
Add missing qapp fixtures to tests
...
See #3723
2018-03-15 09:06:40 +01:00
Florian Bruhin
84c7c37e8e
Swap Control/Meta back on macOS
...
Fixes #3697
(cherry picked from commit fd9e7bed7fd9842eac22ed304a094a92cc953577)
2018-03-14 19:40:56 +01:00
Florian Bruhin
d232b3ea57
Disable test_software_rendering on macOS
...
For some reason, macOS doesn't care about us disabling software rendering
2018-03-14 19:31:36 +01:00
Florian Bruhin
c0fdf19756
Merge remote-tracking branch 'origin/pr/3704'
2018-03-14 08:06:24 +01:00
Jay Kamat
35beff98a9
Add test for #3711
2018-03-13 19:18:42 -04:00
Florian Bruhin
b88ac51d25
Fall back to non-keypad keys without any keypad bindings
...
Fixes #3701
2018-03-13 14:40:54 +01:00
Ryan Roden-Corrent
73517f0a51
Fix test_backup_error.
...
- Need caplog at level error
- Rename test to be unique
2018-03-13 08:50:34 -04:00
Ryan Roden-Corrent
27966c94a6
Fix up editor backup patch.
...
- Use qutebrowser-editor-backup as the backup file prefix
- Consistently use message.error instead of cmdexc
- Improve test coverage for the backup function
- Fix lint errors in the unit test code
2018-03-13 07:34:18 -04:00
Florian Bruhin
dcd6bcd2f4
Apply changes from PR review
2018-03-13 08:47:41 +01:00
Florian Bruhin
c590648077
Merge remote-tracking branch 'origin/pr/3613'
2018-03-13 08:39:36 +01:00
Florian Bruhin
14d6e737fa
Merge remote-tracking branch 'origin/pr/3606'
2018-03-13 07:37:57 +01:00
Ryan Roden-Corrent
38bb3673db
Preserve a backup if editor callback fails.
...
Currently the editor deletes its temp file whenever editing is finished.
With this patch, the file will not be deleted if the editor callback
encounters an exception.
One example is if the tab containing the edited element is closed. The
editor errors with "Edited element vanished", but with this patch it
will also print "Backup at ..." so the user does not lose their work.
Resolves #1596 .
Supersedes #3641 , using the cleaner approach started in #1677 .
2018-03-12 08:34:50 -04:00
gammelon
455f6b8a70
Fix blank lines
2018-03-12 12:37:52 +01:00
Florian Bruhin
8c5b7bcd03
Fix lint
2018-03-12 08:51:36 +01:00
Florian Bruhin
9941812127
Normalize keys read from the config
...
This makes sure the internal bindings.commands object only contains normalized
key sequences.
Fixes #3699
2018-03-12 08:00:56 +01:00
Florian Bruhin
990c0707f4
Make from_obj() work for List/Dict configtypes
...
We can't easily make it work for ListOrValue as we don't know which of both we
get at this point.
2018-03-12 08:00:18 +01:00
Florian Bruhin
c03ef10d54
tests: Add a yaml_config_stub fixture
2018-03-12 07:39:20 +01:00
Florian Bruhin
b6e29d8eae
Be explicit about expected output in test
2018-03-11 14:35:15 +01:00
Florian Bruhin
591883656e
Merge remote-tracking branch 'origin/pr/3700'
2018-03-11 14:34:06 +01:00
Florian Bruhin
f0a649e101
Mark another GreaseMonkey test as flaky
...
See #3238
2018-03-11 14:29:54 +01:00
Roman Bogorodskiy
d0342bffc4
Show version for POSIX OSes
...
For POSIX OSes other than Linux and macOS set OS Version to
platform.uname() instead of showing 'OS Version: ?'.
2018-03-11 13:28:53 +04:00
Johannes Wegener
cf4e472461
add basic completion to file dialog
2018-03-09 16:21:57 +01:00
gammelon
0ce94dae1c
forgot one bit
2018-03-09 15:55:40 +01:00
gammelon
7e3c966afe
rewrite tests
2018-03-09 15:52:03 +01:00
Florian Bruhin
ebb373ccad
Make sure keys with modifiers get handled as special
2018-03-09 09:04:28 +01:00
Florian Bruhin
66b06ed84c
Add first tests for HintKeyParser
2018-03-09 07:38:16 +01:00