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
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
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
c0fdf19756
Merge remote-tracking branch 'origin/pr/3704'
2018-03-14 08:06:24 +01: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
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
b6e29d8eae
Be explicit about expected output in test
2018-03-11 14:35:15 +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
Florian Bruhin
482b622b1b
Fix handling of empty bindings without breaking :unbind
...
1899e313fd
as a fix for #3631 broke :unbind, as
the config system treats None and '' equally.
Instead, allow None/'' again, but just handle it as "no binding".
2018-03-08 11:42:27 +01:00
Florian Bruhin
d5c04318b2
Fix test/lint
2018-03-08 06:41:15 +01:00
Florian Bruhin
9b9d7647a4
Show the keystring correctly when entering a count
2018-03-07 22:47:31 +01:00
Florian Bruhin
514138aad2
Allow to bind numbers in keybindings
...
This mostly reverts 4ef5db1bc4
for #1966 , but
fixes #3684 by allowing numbers to be bound again. If the user wants to bind
numbers instead of using them for a count, why not let them.
2018-03-07 22:37:10 +01:00
Florian Bruhin
34815f5cf8
Make bindings.default only settable in autoconfig.yml
...
Fixes #3131
2018-03-07 18:30:44 +01:00
Florian Bruhin
8a60855b88
Fix lint
2018-03-06 21:44:37 +01:00
Florian Bruhin
0d94c17edc
Apply key_mappings to KeySequences correctly
...
Fixes #3678
2018-03-06 21:39:57 +01:00
Florian Bruhin
db7ccb0434
Update config tests for pattern changes
2018-03-06 13:26:22 +01:00
Florian Bruhin
257753841b
Allow lightweight URL patterns without a scheme
...
See #3622
2018-03-06 10:33:55 +01:00
Florian Bruhin
7fc53ae78a
Make path optional in URL patterns
...
See #3622
2018-03-06 09:45:06 +01:00
Florian Bruhin
8c0bca90d3
Merge remote-tracking branch 'origin/pr/3456'
2018-03-06 09:32:39 +01:00
Florian Bruhin
0e2a39da2a
Fix tests for keyboard parsing change
2018-03-06 07:39:41 +01:00
Florian Bruhin
41dfa29648
Improve parsing of invalid keys
...
This should handle "<>" and "\x1f" correctly.
2018-03-06 06:29:38 +01:00
Florian Bruhin
7a9f8fda72
Get rid of unnecessary lambda
2018-03-05 23:07:03 +01:00
Florian Bruhin
2b84ea9dbe
Make sure we have plain keys/modifiers where needed
2018-03-05 23:01:24 +01:00
Florian Bruhin
0ee7fac727
Update test_init_unknown/test_init_invalid for KeyboardModifierMask
...
-1 & Qt.KeyboardModifierMask == Qt.Key_unknown
2018-03-05 22:56:58 +01:00