toofar
ff8dbc4580
lint: broad-exception-raised
...
Mostly pretty lazy fixes. Most of the places in the tests we were
already matching on error message, a couple of places we weren't. The
tick-tock one was the only one that wasn't being used right where it was
raised.
Some of them I just changed to RuntimeError because it was shorter than
adding the pylint directive.
2023-02-06 18:53:56 +13:00
Florian Bruhin
0941c59c3b
tests: Ignore another spurious Chromium error
2022-12-13 09:43:08 +01:00
Florian Bruhin
b4d32e04f4
Merge branch 'master' into qt6-v2
2022-12-13 09:05:32 +01:00
Florian Bruhin
725ed95d8a
tests: Fix downloads.feature flakiness
...
The "Answering a question for a cancelled download" test was flaky,
due to the preceding PDF.js test sometimes not waiting properly for its
download to finish: "I wait until the download is finished" waited for
the initial PDF download above (which causes PDF.js to open), but not
for the real download after clicking the save button.
See #5390
TODO: Cherry-pick to master?
2022-11-24 14:56:52 +01:00
Florian Bruhin
e11f899b41
tests: Ignore new QtWebEngine 6.4 message
...
See #7314
2022-11-24 14:19:38 +01:00
Florian Bruhin
f6e4ba3d6f
Make skipping broken PDF.js work properly
...
Fixup for c7ea2f705f
See #7135
2022-11-24 14:12:38 +01:00
toofar
2d66466194
Merge branch 'master' into qt6-v2
...
Just a few conflicts around CI and dependencies.
2022-11-20 15:48:00 +13:00
Kian-Meng Ang
d77b0fb8a3
Fix typos
...
Found via `codespell -S *.js -L
technik,gir,nam,ans,wih,wil,ro,nowe,te,datas,qutie,ned,fo,clude,alph,crashers,nd,wasn,cros,ue,possition`
Co-authored-by: Marcel Schilling <marcel.schilling@uni-luebeck.de>
2022-11-19 13:03:39 +08:00
Florian Bruhin
1387c999fa
Skip problematic QtWebKit tests with OpenSSL 3
...
See https://github.com/cherrypy/cheroot/issues/517 and #7467
2022-11-08 16:17:31 +01:00
Florian Bruhin
fa62360357
Remove unneeded str
...
Only needed in Python 3.5 times
2022-09-30 20:23:38 +02:00
Florian Bruhin
31878b4b7b
Speculatively stabilize :history-clear tests
...
See #7415 , #5390 . Similar to ad429d9552a9f169a1122cb5784424848d4805e2.
2022-09-26 16:06:30 +02:00
Florian Bruhin
87f58a30b7
Fix half-finished test
...
(cherry picked from commit 40125ca73b )
2022-08-26 22:32:10 +02:00
Florian Bruhin
40125ca73b
Fix half-finished test
2022-08-23 22:21:40 +02:00
Florian Bruhin
815374c6b6
js: Handle stylesheets in cross-origin frames gracefully
...
Otherwise the exception gets shown since the recent message change.
(cherry picked from commit 73e30e4738 )
2022-08-23 20:10:57 +02:00
Florian Bruhin
73e30e4738
js: Handle stylesheets in cross-origin frames gracefully
...
Otherwise the exception gets shown since the recent message change.
2022-08-23 20:07:53 +02:00
Florian Bruhin
496c14bc9e
quteprocess: Add --qute-delay-start
...
Allows for some rudimentary debugging of subprocesses.
2022-08-23 18:31:42 +02:00
Florian Bruhin
d31b2e2016
Qt 6.4: Adjust dark mode tests
...
See #7314 and #6097
2022-08-23 18:31:42 +02:00
Florian Bruhin
68f01b9072
Qt 6.4: Ignore new Chromium cert errors in tests
...
See #7314
2022-08-23 18:31:42 +02:00
Florian Bruhin
a7e6a3a178
Avoid deprecated QProcess.pid()
...
processId() got introduced in Qt 5.3
FIXME: pick to master?
2022-08-23 18:31:42 +02:00
Florian Bruhin
76456e6bd9
tests: Ignore another Chromium line
2022-08-23 18:31:42 +02:00
Florian Bruhin
07434241ef
Reintroduce skipped tests
2022-08-23 18:31:42 +02:00
Florian Bruhin
769ef6859f
Adjust some fixme comments
2022-08-23 18:31:42 +02:00
Florian Bruhin
344fcb6918
Ignore additional chromium message
...
See https://github.com/qutebrowser/qutebrowser/runs/6658849317?check_suite_focus=true
2022-08-23 18:31:41 +02:00
Florian Bruhin
80961cee6b
lint: Fix flake8 whitespace issues
2022-08-23 18:31:41 +02:00
Florian Bruhin
e658ce6acf
lint: Remove unused imports
...
Via autoflake and git add -p
2022-08-23 18:31:41 +02:00
Florian Bruhin
c7ea2f705f
tests: Skip broken PDF.js installations
...
See #7135
TODO: cherry-pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin
ee7b283afb
Fix sandboxing tests on Flatpak
...
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/193
TODO: Cherry-pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin
ef486aa263
Remove unneeded old log ignores
2022-08-23 18:31:41 +02:00
Florian Bruhin
e4bc609ff4
Update dark mode tests for Qt 6 and ARM
...
Thanks to tinywrkb for running them on Flatpak infrastructure!
2022-08-23 18:31:41 +02:00
Florian Bruhin
29d1096e8e
Adjust test_preferred_colorscheme_with_dark_mode for Qt 6
2022-08-23 18:31:41 +02:00
Florian Bruhin
634cbc2d5f
Adjust dark mode tests for Qt 6
2022-08-23 18:31:41 +02:00
Florian Bruhin
81a67a9201
Adjust referrer handling for Qt 6
...
As suspected in a comment, ReducedReferrerGranularity does not exist anymore
with Chromium 90, and neither does an option for getting the full referrer back:
https://chromium-review.googlesource.com/c/chromium/src/+/2545444
https://bugs.chromium.org/p/chromium/issues/detail?id=1150018
2022-08-23 18:31:41 +02:00
Florian Bruhin
473f048041
downloads: Bump up maximum redirects
...
TODO: Cherry-pick to master?
TODO: Changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin
59922dfe4e
Delete empty files after download errors
...
It's debatable whether we should keep non-empty files, but surely empty
ones are useless.
TODO: Add changelog entry
TODO: Pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin
4812c8e30e
Add a test for insecure download redirects
...
TODO: Pick to master?
TODO: Changelog entry
2022-08-23 18:31:41 +02:00
Florian Bruhin
556d6cbdc2
Let Qt handle QtNetwork redirects
...
With Qt 6, the default changed to Qt handling network redirects instead of us
doing so manually. This seems like a good thing, so instead of setting the
redirect policy back to QNetworkRequest.RedirectPolicy.ManualRedirectPolicy,
let's just let Qt handle everything.
By default, Qt allows 50 redirects before giving up. That seems a tad much, so
we set it back to our former default.
This change comes with a few changes in behavior:
- Redirects to the same URL now fail (too many redirects) rather than being
ignored. I'm not sure how the previous behavior was useful. We added it in the
initial implemetation in 6856c49be9 (later
refactored a bit in 70e390a2e8 ) and added a test
in d13f88f0ac . But it doesn't make sense...
- We use QNetworkRequest.RedirectPolicy.NoLessSafeRedirectPolicy (no HTTPS ->
HTTP redirects allowed), while the former behavior didn't validate redirects
at all. Interestingly enough, I can't get Chromium to error out in that case
for downloads (though I only tried on localhost with a self-signed
certificate). However, it seems like a reasonable default.
Test will be added in a follow-up commit.
- Partially downloaded files aren't deleted anymore on a "too many redirect"
error. This should be solved in a more generic way, will do so in a follow-up
commit.
TODO: Pick to master?
Fixes #2679 .
2022-08-23 18:31:41 +02:00
Florian Bruhin
76514547cf
qt6 tests: Update ignored messages
...
On Qt 6.3: 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.'
2022-08-23 18:31:41 +02:00
Florian Bruhin
c5a51eb0bc
Drop Qt < 5.15
...
Fixes #7091
TODO: Add changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin
deb21acdeb
qt6 tests: Fix remaining PyQt5 references
2022-08-23 18:31:40 +02:00
Florian Bruhin
d387b1a108
tests: Adjust most imports
2022-08-23 18:31:40 +02:00
Florian Bruhin
236371cb1d
Fix up various webkit/webengine imports
2022-08-23 18:31:40 +02:00
Florian Bruhin
0877fb0d78
Run scripts/dev/rewrite_enums.py
2022-08-23 18:31:38 +02:00
Florian Bruhin
d47cfd99d7
Run scripts/dev/rewrite_qt_imports.sh
2022-08-23 18:09:11 +02:00
Florian Bruhin
a90d2ba580
Remove unused imports
2022-08-22 14:29:14 +02:00
Florian Bruhin
6379553774
Revert "Ignore flask development warnings."
...
This reverts commit d6b7d51307 .
We switched to CherryPy for the SSL server in the previous commit, so
this won't be needed anymore.
2022-08-22 14:21:20 +02:00
Florian Bruhin
41c4ee3e2f
tests: Use CherryPy for HTTPS server
...
Not sure why we didn't do this initially, maybe it wasn't possible: https://webpy.org/cookbook/ssl
This means we don't need to (ab)use the Flask development server anymore.
2022-08-22 14:21:08 +02:00
Florian Bruhin
3f875e3b27
Add --quiet for :back and :forward
2022-08-22 11:44:31 +02:00
Florian Bruhin
55b2fb6c9c
Merge pull request #7344 from qutebrowser/update-dependencies
...
Update dependencies
2022-08-18 02:24:38 -07:00
Florian Bruhin
62d3a80026
tests: Support GetServerInformation for test notification server
...
Huge thanks to u/SomethingOfAGirl on Reddit for finding out how to make this work!
See https://www.riverbankcomputing.com/pipermail/pyqt/2021-March/043724.html
2022-08-18 11:09:33 +02:00
toofar
d6b7d51307
Ignore flask development warnings.
...
We used to dodge these by listening on 0.0.0.0. Now they are on to us
and always show the warnings. Running flask in development mode here is
intended, so lets not have the warnings fail the tests.
Ref: https://github.com/pallets/werkzeug/issues/2480
2022-08-18 19:18:09 +12:00
Florian Bruhin
65aa61f33f
Fixup content.javascript.log_messages.excludes issues
2022-08-15 18:53:35 +02:00
Florian Bruhin
ec2dcfce9e
Add content.javascript.log_messages.excludes
...
Fixes #7342
2022-08-15 15:07:24 +02:00
Florian Bruhin
418f91dfcd
tests: Remove trailing periods in feature files
...
Breaks after https://github.com/pytest-dev/pytest-bdd/pull/539
2022-07-17 11:51:21 +02:00
Florian Bruhin
a16aa959bb
tests: Fix broken BDD definition
...
This happened to work before this commit:
7cd7b40df3
Because the "command" argument was still defined from the previous
"And I run ..." step.
2022-07-05 12:27:06 +02:00
Florian Bruhin
a7625bf924
notification: Fix wrong return type annotation
2022-06-21 12:29:10 +02:00
Florian Bruhin
124fc717d1
notification: Add PID to DBus test notification service
...
Fixes #7160
2022-06-21 12:29:06 +02:00
Florian Bruhin
db7bc2c6ff
Add tests for :session-save --no-history
2022-06-14 13:31:26 +02:00
Florian Bruhin
27ca9af77f
Add test for :session-save with --no-history
2022-06-14 13:28:43 +02:00
Florian Bruhin
70697b8d97
tests: Make it possible to pass flags when saving session
2022-06-14 13:25:11 +02:00
Florian Bruhin
2cb20dbf5b
Skip test broken on QtWebKit
...
(cherry picked from commit d01dd9be07bd1591b1ecda298a2bf84b41ea280c)
2022-06-13 21:46:49 +02:00
Florian Bruhin
bf045f7ec7
Add a helper dataclass for find flags
...
When e.g. doing:
- '?foo' (search with reverse=True -> FindBackwards)
- 'N' (prev_result -> no FindBackwards)
- 'n' (next_result -> FindBackwards again)
we need to take a copy of the flags so that we can temporarily clear
FindBackwards when pressing 'N'.
Relevant history:
- We originally did int(self._flags) in
d450257485 .
- In f0da508c21 , we used
QWebPage.FindFlags(int(self._flags)) instead.
- With 97bdcb8e674c8ff27ab92448effef263880ab3aa (picked from
c349fbd180 ) we instead do:
flags = QWebEnginePage.FindFlag(self._flags)
Using FindFlag instead of FindFlags seemed to work fine with PyQt6 and
enum.Flag. With PyQt5, however, later clearing a flag bit ends up with us
getting 0 as an integer, thus losing the type information about this being a
FindFlag instance, and resulting in a TypeError when calling into Qt.
We could use FindFlags() with PyQt 6 but FindFlag() with PyQt 5 to copy the
original flags, but that's getting rather cumbersome. Instead, let's have a
helper dataclass of bools, do away with the bit-twiddling, and only convert it
to a Qt flags when we actually need them. This solves the copying issue nicely,
and also makes the code a lot nicer.
Finally, this also adds a test case which fails when the flags are mutated in
place instead of copied.
We could do the same kind of change for QtWebKit as well, but given that it's
somewhat dead - and perhaps more importantly, won't run with Qt 6 - let's not
bother. To not break the end2end tests with QtWebKit, the output still is the
same as before.
(cherry picked from commit 96a0cc39512753445bc7a01b218b2f1290819ddd)
2022-06-13 18:40:08 +02:00
Florian Bruhin
e15bda307e
search: Split navigation/search callbacks
...
This way, we can move more logic (checking wrapping, etc.) into the API,
thus making the commands much more simple and stateless.
2022-06-13 18:40:08 +02:00
Florian Bruhin
583354d524
Merge remote-tracking branch 'origin/pr/6670' into dev
2022-06-13 15:47:31 +02:00
Florian Bruhin
fc17602f79
Add test for using :prompt-fileselect-external on wrong prompt
2022-06-13 14:37:27 +02:00
Florian Bruhin
435e880477
Fix test
2022-06-13 14:25:03 +02:00
Florian Bruhin
fe2a5529e6
Merge remote-tracking branch 'origin/pr/7003'
2022-06-13 14:06:51 +02:00
Florian Bruhin
85b867fe8d
Merge remote-tracking branch 'origin/pr/7096'
2022-06-13 12:34:33 +02:00
Florian Bruhin
5e2fe7924e
Apply MathML darkmode workaround for display math
...
See e.g. https://en.wikipedia.org/wiki/Gradient#General_coordinates
2022-05-12 10:10:49 +02:00
Florian Bruhin
a84ecfb80a
Display close matches for invalid commands
2022-05-09 11:48:41 +02:00
Florian Bruhin
3e9203b829
tests: Update bs4 argument name
2022-04-11 10:29:44 +02:00
Nicholas Schwab
d1bc60edb8
Adapte errors on click-element to filter.
2022-04-08 14:28:17 +02:00
Nicholas Schwab
39dbf2266f
Remove duplicate value in error message for invalid point.
2022-04-08 14:25:07 +02:00
Nicholas Schwab
bf562a74fa
Added missing Then in test case for click-element.
2022-04-08 14:05:16 +02:00
Axel Dahlberg
55303587b8
test(download) no folder chosen
2022-04-08 09:27:26 +02:00
Nicholas Schwab
709592b46a
Adapted expected errors in end2end test for click-element.
2022-04-06 20:09:03 +02:00
Axel Dahlberg
bf34f18f09
style(prompt) fix
2022-04-06 16:06:08 +02:00
Axel Dahlberg
6411db1228
test(downloads) fix fixture replacements
2022-04-06 15:54:30 +02:00
Axel Dahlberg
6462133477
Apply suggestions from code review
...
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-04-06 15:38:35 +02:00
Florian Bruhin
96425c93bf
Merge remote-tracking branch 'origin/pr/7103'
2022-04-05 12:14:53 +02:00
Jimmy
e9ed6456fd
Load icons via importlib.resources
...
The PyQt resources system is gone in 6.2 and deprecated before that. This
should be the last usage of it.
Switches icons to be read with `utils.resources.read_file_binary()` in
`notification.py` (fallback desktop notification icon) and `app.py` (icon for
the desktop window).
importlib only loads resources under a package, so the icons are moved under
the `qutebrowser/` directory.
Closes : #6062
2022-04-04 18:03:54 +12:00
Jimmy
060e4fbf80
Drop python3.6 support.
...
Commits for dropping 3.5 support to copy from:
c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b85 "Drop support for Python 3.6.0"
Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
rebuild
workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.
Regarding mimetype overrides (ebb3046822 ) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.
There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
2022-04-04 12:08:19 +12:00
Florian Bruhin
bd8c940320
Simplify some syntax
...
Found via pyupgrade
2022-04-03 12:18:09 +02:00
Nicholas Schwab
eb1e49c468
Fixed spaces at line end.
2022-04-01 20:45:16 +02:00
Nicholas Schwab
93e548eccf
Added tests for click-element focused.
2022-04-01 20:32:21 +02:00
Nicholas Schwab
061542808b
Added some tests for click-element with position filter.
2022-04-01 20:27:07 +02:00
Nicholas Schwab
2c0470d098
Add tests for click-element with CSS filter.
2022-04-01 20:27:07 +02:00
Nicholas Schwab
53b87f024c
Adapt tests to new error output.
2022-04-01 20:27:07 +02:00
Axel Dahlberg
3656345076
test(downloads) wip test for external fileselect
2022-03-31 17:30:17 +02:00
Florian Bruhin
735ec65865
pylint: Work around Python 3.10 pathlib issue
...
See https://github.com/PyCQA/pylint/issues/5783
2022-03-29 18:11:32 +02:00
Jimmy
6341154aeb
Skip debucachestats test on python < 3.9
...
Refactor the magic tag creation thing to add python version checking support.
Makes `_check_version()` support checking plain tuples to so that I don't have
to copy the operator dict.
Now most of the branches of the if/else are the same, meh.
2022-03-26 16:06:42 +13:00
Florian Bruhin
b8c2c8d381
Simplify socket usage
2022-03-14 11:27:41 +01:00
Florian Bruhin
1a737b8bc1
tests: Catch async ERR_INVALID_URL
2022-03-07 14:24:43 +01:00
Florian Bruhin
7f1d92b596
Fix sandboxing test on Qt 5.12/QtWebKit/Windows
2022-03-06 23:05:13 +01:00
Florian Bruhin
2e5eab3dcc
Fix lint
2022-03-06 22:56:50 +01:00
Florian Bruhin
44e00c5992
Handle missing support in sandbox test
2022-03-04 09:44:29 +01:00
Florian Bruhin
941627d778
Refactor tests to use new sandbox setting
2022-03-04 09:39:06 +01:00
Florian Bruhin
8fe1de2fdc
Add qt.chromium.sandboxing setting and sandboxing test
2022-03-03 21:16:04 +01:00
Axel Dahlberg
caaa6b6fda
feat(tabbedbrowser) add option to select mode based on url pattern
2022-02-19 12:32:28 +01:00
Florian Bruhin
9c4169c7b7
tests: Remove some unused imports
2022-02-11 13:12:43 +01:00
Florian Bruhin
02f331b89c
tests: Update webserver started regex
...
Needed for webserver_sub_ssl.py with bleeding edge CI as it excludes the trailing slash, probably recent Flask/Werkzeug change.
2022-01-29 09:37:53 +01:00
Florian Bruhin
9ce7b48f46
Merge remote-tracking branch 'origin/pr/6626'
2022-01-05 16:33:20 +01:00
Florian Bruhin
f4714a9300
Use flake8-pytest-style
2022-01-04 10:30:24 +01:00
Florian Bruhin
26d308d95d
pylint: Enable docparams checker
2021-12-03 13:36:20 +01:00
Florian Bruhin
b84d68e8ee
pylint: Enable for_any_all extension
2021-12-03 12:04:59 +01:00
Florian Bruhin
100e87ff0e
pylint: Remove now-useless suppressions
2021-12-02 17:43:45 +01:00
Florian Bruhin
ed2342a430
pylint: Handle consider-using-with
2021-12-02 17:30:47 +01:00
Florian Bruhin
aef42047b7
Add hint test for tabindex-negative
2021-12-01 21:35:39 +01:00
Florian Bruhin
470fede771
tests: Move invisible.html to hints/html
2021-12-01 17:21:31 +01:00
Florian Bruhin
546caffcba
Merge remote-tracking branch 'origin/pr/6798'
2021-12-01 16:44:55 +01:00
Florian Bruhin
568b1e253a
Merge remote-tracking branch 'origin/pr/6796'
2021-11-22 18:05:36 +01:00
Tim Gadanidis
73aed03a7f
Skip failing tests on Windows
2021-11-22 11:32:43 -05:00
Tim Gadanidis
a50f6dc2ea
Add tests for closing last tab when giving/taking
2021-11-21 00:00:22 -05:00
Florian Bruhin
4ace7502c5
Update docs/changelog
2021-11-13 19:04:45 +01:00
Florian Bruhin
60f281eb30
Merge remote-tracking branch 'origin/pr/6810'
2021-11-13 19:01:54 +01:00
harish3124
f0757198c0
Fix Tests
2021-11-11 15:50:07 +05:30
harish3124
b2bddd9f39
Added Tests and Docs 📰
2021-11-11 15:27:05 +05:30
Philipp Albrecht
7fcfb9b635
Enable overriding of backend auto-detection
...
One can override the auto-detection mechanism by passing
the backend via --qute-bdd-backend=<backend> or by setting the
environment variable QUTE_BDD_BACKEND=<backend>.
2021-11-05 15:50:41 +01:00
Tim Gadanidis
087c84c0d5
Fix back-to-forward test search direction test
...
Test originally expected "Baz" instead of "baz", which is what should
actually be found if starting at the bottom and then searching forward
(wrapping around).
2021-11-04 17:15:17 -04:00
Tim Gadanidis
437141ddea
Test resetting direction on duplicate searches
2021-11-04 16:10:53 -04:00
Tim Gadanidis
4899cf269e
Update duplicate search test
2021-11-02 12:16:07 -04:00
Charlotte Van Petegem
6121673c1a
Switch to tab when clicking on notification
2021-10-09 14:00:30 +02:00
Nicholas Boyd Isacsson
1892831255
Try to fix :tab-clone --private test
2021-09-10 17:19:11 +02:00
Nicholas Boyd Isacsson
2e0549fe9f
Update test cases for :tab-clone --private
2021-09-10 15:53:54 +02:00
phesch
57f0155fa0
Match counter: fix lints, implement suggestions
2021-09-08 21:19:32 +02:00
Florian Bruhin
d0ae710f66
tests: Ignore some more Chromium outputs
2021-07-13 18:14:25 +02:00
Florian Bruhin
2047218361
Revert "Fix enum stringification for Python 3.10 a7+"
...
This reverts commit e2c5fe6262 .
See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF
2021-07-12 16:03:41 +02:00
Florian Bruhin
631c8d43a3
tests: Ignore another Chromium message
2021-06-24 23:37:51 +02:00
Florian Bruhin
714df8a15f
More history test stabilization
2021-06-24 20:41:15 +02:00
Florian Bruhin
1dddbe697e
tests: Speculatively stabilize history tests
...
If we're not waiting for the async INSERT in the SQL database, it can happen
that :debug-dump-history gets called before the history entry was addeded to the
actual database.
See #5390
2021-06-15 16:53:58 +02:00
Florian Bruhin
83fb5fef86
Fix prefers_reduced_motion on Windows
...
See #6530
2021-06-09 11:08:04 +02:00
Florian Bruhin
96149c7e28
Add content.prefers_reduced_motion
...
Closes #6530
2021-06-09 10:22:17 +02:00
Florian Bruhin
e6261ad92e
tests: Fix flakiness in test_invocations.py
...
We don't need to check the log inside the test, as the quteproc fixture does
that for us anyways.
Also, looks like a new harmless message turned up.
2021-06-07 11:11:45 +02:00
Florian Bruhin
b4b65b8cd1
Make dark mode tests work correctly on ARM/aarch64
...
Fixes #6489
2021-06-01 16:48:04 +02:00
Florian Bruhin
03fa938383
tests: Update import path for pytestqt SignalBlocker
2021-05-29 23:23:08 +02:00
Florian Bruhin
1830f784df
Fix tests/lint
...
We need to set XDG_RUNTIME_DIR properly in the tests so that the log is empty.
2021-05-28 16:50:58 +02:00
Florian Bruhin
40477e826c
log: Handle JSONLogger in change_console_formatter
...
Fixes #6482
2021-05-28 15:46:35 +02:00
Florian Bruhin
7961cf7355
RIP Freenode
2021-05-26 09:34:37 +02:00
Florian Bruhin
468d1f5dc1
tests: Avoid deprecated SSL protocol value
...
See https://docs.python.org/3.10/whatsnew/3.10.html#ssl
2021-05-05 20:35:43 +02:00
Florian Bruhin
0ee169e497
Fix tests on Windows
2021-04-23 11:10:53 +02:00
Florian Bruhin
c7b3559d82
Fix :spawn -u -o
...
Fixes #6407
2021-04-23 10:42:34 +02:00
Florian Bruhin
908abb6566
notifications: Fix image padding assertion
...
The underlying Chromium pads images so that scanlines align on 4-byte
boundaries. Thus, with an image size of e.g. 239x239, we'll have 3 bytes
of padding (239 mod 4 = 3; 240 mod 4 = 0).
Fixes #6375
2021-04-09 17:14:26 +02:00
Florian Bruhin
e2c5fe6262
Fix enum stringification for Python 3.10 a7+
...
https://bugs.python.org/issue40066
https://mail.python.org/archives/list/python-dev@python.org/message/CHQW6THTDYNPPFWQ2KDDTUYSAJDCZFNP/
b775106d94
2021-04-08 09:51:16 +02:00
Florian Bruhin
c39c66aec4
Simplify pathlib usage in webserver_sub_ssl
2021-04-06 14:00:13 +02:00
Florian Bruhin
ac9388fb1b
tests: Fix accidental network access
...
Running :adblock-update also updates ABP lists and thus tries downloading easylist.
2021-03-31 13:10:09 +02:00
Florian Bruhin
545a295cf0
ci: Move test_mkvenv.py to update-dependencies
...
It requires some time and network access, so no need to run it as part of the automated tests.
2021-03-31 13:10:09 +02:00
Florian Bruhin
aea69ff3df
tests: Ignore mDNS errors
...
They happen with data/crashers/webrtc.html in Flatpak and are harmless.
2021-03-31 13:10:09 +02:00
Florian Bruhin
40c72f849d
flatpak: Skip download dispatcher tests
2021-03-31 13:10:09 +02:00
Florian Bruhin
ca1a204514
notifications: Make test page more human-friendly
2021-03-27 20:54:53 +01:00
Florian Bruhin
f1f0dc73df
notifications: Add basic tests for message notifications
2021-03-27 15:50:50 +01:00
Florian Bruhin
89ffeeb79d
notifications: Include origin
2021-03-27 15:35:25 +01:00
Florian Bruhin
063fb9f4bc
notifications: Name default action
...
Like Chromium does
2021-03-27 15:35:25 +01:00
Florian Bruhin
2285fddc61
notifications: Fix Qt 5.13 and 5.14
2021-03-27 15:34:30 +01:00
Florian Bruhin
34c4dc3abd
notifications: Fix lint
2021-03-27 15:32:38 +01:00
Florian Bruhin
38dee6b225
notifications: Update tests for increasing IDs
...
This is a bit of a bigger change (and makes the tests a bit less
strict), but it's needed because qutebrowser assumes that IDs will be
unique (i.e. it'll never get a notification ID which is equal to the ID
for a notification being shown).
This means we'll need to keep the notification server around and clean
up notifications between tests.
2021-03-27 15:30:57 +01:00
Florian Bruhin
9eb009dc1b
notifications: Fix getting capabilities in tests
2021-03-27 15:30:57 +01:00
Florian Bruhin
a0f7c36a54
notifications: Use _as_uint32 everywhere
2021-03-27 15:30:57 +01:00
Florian Bruhin
1dcd0d5483
notifications: Implement closing via web
2021-03-27 15:30:57 +01:00
Florian Bruhin
3ab707405a
notifications: Basic separation into presenter and adapter
2021-03-27 15:30:02 +01:00
Florian Bruhin
0754bc2d90
notifications: Verify image dimensions in tests
2021-03-27 15:30:02 +01:00
Florian Bruhin
9cda31f7f6
notifications: Fix handling of padded images
2021-03-27 15:30:02 +01:00
Florian Bruhin
d1e9247536
notifications: multiple -> replacing in tests
2021-03-27 15:30:02 +01:00
Florian Bruhin
b6dc805138
notifications: Adjust tests for new image handling
...
Also check image validity in tests
2021-03-27 15:30:02 +01:00
Florian Bruhin
df26a06cb5
notifications: Clearer test images
2021-03-27 15:30:02 +01:00
Florian Bruhin
d2e69454ce
notifications: Rename/consolidate settings
2021-03-27 15:30:02 +01:00
Florian Bruhin
b63185f18d
notifications: Fix getting permission in test HTML
2021-03-27 15:30:02 +01:00
Florian Bruhin
a60cafec3d
notifications: Drop Qt 5.13 support in libnotify presenter
...
Seems to segfault when showing the second notification, despite our
workarounds for Qt 5.14.
Partial stacktrace:
0x00007fffeeacfdb2 in std::_Function_handler<void (std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >), meth_QWebEngineProfile_setNotificationPresenter::{lambda(std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >)#1}>::_M_invoke(std::_Any_data const&, std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >) ()
from .../site-packages/PyQt5/QtWebEngineWidgets.so
0x00007fffee89ff62 in QWebEngineProfilePrivate::showNotification(QSharedPointer<QtWebEngineCore::UserNotificationController>&) ()
from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5
0x00007fffe6f45921 in ?? () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineCore.so.5
It's unlikely this is something we can work around, so let's just
require Qt 5.14 instead.
2021-03-27 15:30:02 +01:00
Florian Bruhin
384928c378
notifications: Fix handling of custom actions on foreign notifications
2021-03-25 15:41:56 +01:00
Florian Bruhin
a21adf8bd3
notifications: Use consistent language in BDD files
2021-03-25 15:41:56 +01:00
Florian Bruhin
844435f821
notifications: Fix and test support for PyQtWebEngine 5.14
2021-03-25 15:41:56 +01:00
Florian Bruhin
54a0dc1e38
notifications: Replace @qtwebengine_py_5_15 by @pyqtwebengine>=5.15
2021-03-25 15:41:56 +01:00
Florian Bruhin
76842dbd53
notifications: Fetch capabilities early and avoid restart
2021-03-25 15:41:21 +01:00
Florian Bruhin
66758d61d3
notifications: Split up HTML files
2021-03-25 15:39:06 +01:00
Florian Bruhin
d0fbea696e
notifications: Skip DBus tests early on Windows
...
Otherwise, the QDBusConnection dtor shows:
QEventDispatcherWin32::wakeUp: Failed to post a message (Invalid window handle.)
which causes a segfault on exit with pytest-qt:
Exception #: 0XC0000005
Stack:
python39!PyEval_AcquireThread+0x1a4
python39!PyGILState_Ensure+0x5d
QtCore+0x8b342
Qt5Core!qt_message_output+0x18e
Qt5Core!qErrnoWarning+0xb2
Qt5Core!QThread::exit+0x7d
Qt5DBus!QDBusConnection::~QDBusConnection+0x49
Qt5DBus!QDBusVirtualObject::qt_metacast+0x2320
ucrtbase!execute_onexit_table+0x156
ucrtbase!execute_onexit_table+0x7b
ucrtbase!execute_onexit_table+0x34
Qt5DBus!QDBusVirtualObject::qt_metacast+0x1979
Qt5DBus!QDBusVirtualObject::qt_metacast+0x1a9e
ntdll!RtlActivateActivationContextUnsafeFast+0x11d
ntdll!LdrShutdownProcess+0x141
ntdll!RtlExitUserProcess+0xad
KERNEL32!FatalExit+0xb
ucrtbase!exit+0x1dc
ucrtbase!exit+0x7f
python+0x12bf
KERNEL32!BaseThreadInitThunk+0x14
ntdll!RtlUserThreadStart+0x21
2021-03-25 12:07:11 +01:00
Florian Bruhin
4f27e6e0ea
notifications: Show error in test HTML if no permission given
2021-03-25 12:07:11 +01:00
Florian Bruhin
ff3f94e66e
notifications: Reformat test HTML
2021-03-25 12:07:11 +01:00
Florian Bruhin
4c3d7b25af
notifications: Add some structure to test HTML
2021-03-25 12:07:11 +01:00
Florian Bruhin
1739449c78
notifications: Move test files
2021-03-25 12:07:11 +01:00
Florian Bruhin
a058219b2c
notifications: Don't send unnecessary alpha channel
2021-03-25 12:07:11 +01:00
Florian Bruhin
2c8ce1b038
notifications: Replace existing notifications
2021-03-25 12:07:11 +01:00
Florian Bruhin
1aaa1c8160
notifications: Handle clicking a notification
2021-03-25 12:07:11 +01:00
Florian Bruhin
a107ac2cfc
notifications: Don't depend on notificationserver for all tests
2021-03-24 16:37:34 +01:00
Florian Bruhin
069666bcd1
notifications: Improve error checking
2021-03-24 16:34:21 +01:00
Florian Bruhin
c0a3332553
notifications: Add desktop-entry hint
2021-03-24 16:23:03 +01:00
Florian Bruhin
b11a634cbc
notifications: Review spec
2021-03-24 16:23:03 +01:00
Florian Bruhin
7c5441c86c
notifications: Reorder test methods
2021-03-24 16:23:03 +01:00
Florian Bruhin
0601e89742
notifications: Do stricter arg checking in tests
2021-03-24 16:23:03 +01:00
Florian Bruhin
b8605d4bea
notifications: Use itertools.count for tests
2021-03-24 16:23:03 +01:00
Florian Bruhin
dccb3be69c
notifications: Don't duplicate constants
...
notification.py is now always importable
2021-03-24 16:23:03 +01:00
Florian Bruhin
1d1979ed2f
notifications: Skip tests without DBus available
2021-03-24 16:23:03 +01:00
Florian Bruhin
a2ff76e40b
notifications: Fix lint
2021-03-24 16:23:03 +01:00
Florian Bruhin
0386be571f
notifications: Post-merge fixups
2021-03-24 16:22:55 +01:00
Florian Bruhin
2f592f7ce6
Merge remote-tracking branch 'origin/pr/5457' into dev
2021-03-24 14:12:36 +01:00
Florian Bruhin
ff63d0c1b0
Change default binding for T
...
See #6314 and #2907
2021-03-24 09:29:41 +01:00
Florian Bruhin
0267654cd7
Merge remote-tracking branch 'origin/pr/6233'
2021-03-23 20:28:05 +01:00
Florian Bruhin
0c0cbdab24
Use tmp_path_factory in test_dirbrowser
2021-03-23 17:44:08 +01:00
Florian Bruhin
b3c2e840bb
Remove unnecessary .touch()
...
Not needed if we're using write_text anyways
2021-03-23 17:35:03 +01:00
Florian Bruhin
38eebcd2cc
Merge remote-tracking branch 'origin/pr/6261'
2021-03-23 17:32:06 +01:00
Florian Bruhin
c64733d244
Clean up and fix pathlib conversions
...
Subprocess arguments should be strings
2021-03-23 17:29:42 +01:00
Florian Bruhin
24ca7b7919
Merge remote-tracking branch 'origin/pr/6262'
2021-03-23 17:22:25 +01:00
Florian Bruhin
0bb6704122
Merge remote-tracking branch 'origin/pr/6287'
2021-03-23 14:23:39 +01:00
Florian Bruhin
127d6058d5
Fix lint/tests
2021-03-23 12:53:23 +01:00
Axel Dahlberg
b09c54eb92
Make tests os independent
2021-03-23 09:21:02 +01:00
Axel Dahlberg
3373ffe604
Validate selected files/folder
2021-03-22 17:59:38 +01:00
Axel Dahlberg
dd3989aa68
Merge branch 'feature/6218-pick-directory' of github.com:AckslD/qutebrowser into feature/6218-pick-directory
2021-03-21 12:33:21 +01:00
Axel Dahlberg
12fac3c7a0
Assert selected file exists
2021-03-21 12:33:14 +01:00
Axel Dahlberg
4a3b7dfea6
Merge branch 'master' into feature/6218-pick-directory
2021-03-21 12:07:07 +01:00
Axel Dahlberg
28d828e35b
skip select dir test for qtwebkit
2021-03-21 12:04:23 +01:00
Florian Bruhin
147eb058b9
Add content.tls.certificate_errors = ask-block-thirdparty
...
Fixes #3418
2021-03-19 17:59:47 +01:00
Florian Bruhin
16513e9004
tests: Don't disable cert verification for QtWebKit
...
This was added in d385206ea0 'to not hang on unexpected SSL errors', but there is no reason those should happen in tests.
2021-03-19 17:59:47 +01:00
Florian Bruhin
de803571a9
Rename ssl_strict
...
Closes #5156
2021-03-19 17:59:47 +01:00
Nicholas Boyd Isacsson
1b650b4fae
Update tab-only call in sessions tests
2021-03-18 16:39:03 +01:00
Nicholas Boyd Isacsson
b65dd6b3c3
Add tests for tab-only --pinned
2021-03-18 16:29:04 +01:00
Nicholas Boyd Isacsson
9639980aa5
Fix clean_open_tabs test method
2021-03-18 16:29:04 +01:00
Florian Bruhin
32d3f1d256
tests: Also accept PARTIAL_CONTENT for favicon
...
Seems to be used with bleeding-edge Flask/Werkzeug versions
See #6298
2021-03-17 14:18:14 +01:00
Florian Bruhin
0b621cb0ce
Improve error messages for GUIProcess
2021-03-15 20:23:24 +01:00
Lembrun
3c4a523ba1
Removed useless exists_ok
2021-03-14 11:06:37 +01:00
Lembrun
e444e3c9f8
Added data back
2021-03-14 10:28:21 +01:00
Lembrun
b4f6d58803
Merge branch 'master' into pathlib-/end2end/fixtures
2021-03-14 09:51:21 +01:00
Lembrun
9799ee4ec6
Simplified with path.open to read_text directly
2021-03-14 09:50:36 +01:00
Florian Bruhin
2a7e053495
Fix lint
2021-03-12 19:39:28 +01:00
Florian Bruhin
903e5e2943
tests: Further improve and stabilize screenshots
2021-03-12 19:10:25 +01:00
Florian Bruhin
54d2ca2a07
Stabilize darkmode mathml test
2021-03-12 18:12:45 +01:00
Florian Bruhin
861ee80371
tests: Number screenshots for every test
2021-03-12 18:01:17 +01:00
Florian Bruhin
366bbe3f11
tests: Print screenshot paths
2021-03-12 17:45:39 +01:00
Florian Bruhin
5518ead68d
Add site-specific quirk for Wikipedia in dark mode
...
Fixes #6260
2021-03-12 10:29:22 +01:00
Lembrun
f7aebf2fd5
Minor changes #2
2021-03-11 20:26:14 +01:00
Lembrun
529e902b58
Minor changes
2021-03-11 19:56:36 +01:00
Florian Bruhin
648b90a719
Fix test_preferred_colorscheme_with_dark_mode with QtWebEngine 5.15.4
...
Fixes #6259
2021-03-11 19:37:15 +01:00
Lembrun
c7b6b68c0d
Changed pathlib.Path(tmpdir) to pathlib.Path(tmp_path)
2021-03-11 19:35:03 +01:00
Lembrun
ed1f6e5a2f
Removed useless casting
2021-03-11 19:32:01 +01:00
Lembrun
98041af474
Merge branch 'master' into pathlib-/test/end2end
2021-03-11 19:24:11 +01:00
Lembrun
35e6a1e6a2
Merge branch 'master' into pathlib-/end2end/fixtures
2021-03-11 19:23:38 +01:00
Lembrun
f2bfa3e34c
Changed joinpath
2021-03-11 16:50:38 +01:00
Florian Bruhin
4709d46936
Add custom VersionNumber class
...
Qt's API is kind of painful, and we need some custom functionality
anyways. Wrap QVersionNumber with our own class instead of piling up
workarounds.
2021-03-11 16:45:40 +01:00
Lembrun
f2f2acd5ba
Fixed joinpath plus cleaner path
2021-03-11 13:23:09 +01:00
Lembrun
b65c881407
Fixed linting
2021-03-10 20:23:51 +01:00
Lembrun
87ae59cb89
Merge branch 'master' into pathlib-/end2end/fixtures
2021-03-10 19:11:49 +01:00
Lembrun
6d0b7cb12b
Replaced os.path objects by pathlib equivalent in tests/end2end/
2021-03-10 17:02:29 +01:00
Florian Bruhin
321a350b8f
Add renderer process status to all error messages
...
Might help debug issues such as #6235
2021-03-09 17:28:43 +01:00
Axel Dahlberg
2e319a664c
Changes based on feedback
2021-03-09 11:17:59 +01:00
Florian Bruhin
45387d18a5
Fix some tests with non-english locales
...
See #6234
2021-03-08 11:26:39 +01:00
Axel Dahlberg
815b1c2391
Handle folder selection with external command
2021-03-05 15:39:49 +01:00
Lembrun
5106735992
Replace os.path by pathlib equivalent in end2end/fixtures
2021-03-03 16:59:08 +01:00
Axel Dahlberg
7db764f095
Merge branch 'master' into feature/6109-file-picker-stdout
2021-03-03 05:07:00 -08:00
$MYNAME
82ba01647b
Better handling of filepicker commands, updated test
2021-03-03 14:03:03 +01:00
Florian Bruhin
da389f6e3c
Add period
2021-03-02 10:06:09 +01:00
Florian Bruhin
0fa0848d03
Fix session test
2021-03-02 10:05:03 +01:00
Florian Bruhin
7294840bc5
Merge remote-tracking branch 'origin/pr/6222'
2021-03-02 10:04:54 +01:00
pspiagicw
cdb1de6384
Changed so that test should pass
2021-03-02 08:07:14 +05:30
Florian Bruhin
024e7ec38d
tests: Make unwritable download test work on other locales
...
Looks like the error message is localized.
2021-03-01 21:45:31 +01:00