summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
47 hoursUpdate dependenciesupdate-dependenciesqutebrowser bot
2 daysMerge pull request #8182 from qutebrowser/dynamic-dark-modeFlorian Bruhin
Dynamic dark mode
2 daysMerge pull request #8181 from qutebrowser/fill-in-security-versionFlorian Bruhin
Improve Chromium (security) version output
7 daysUpdate changelogdynamic-dark-modeFlorian Bruhin
7 daysAdd more dark mode logic unit testsFlorian Bruhin
7 daysFix tests/lintFlorian Bruhin
7 daysSupport setting dark mode at runtime and with URL patternsFlorian Bruhin
See #3636, #5542, #7743
7 daysInfer Chromium security version when API is unavailablefill-in-security-versionFlorian Bruhin
We already had all this information in a comment anyways. I made it machine-readable using: s/#\s+(\d*)\.(\d*)\.(\d*): Security fixes up to ([^ ]*)\s+\((.*)\)/utils.VersionNumber(\1, \2, \3): (_BASES[XX], '\4'), # \5 plus some manual post-processing. Thanks to that, we can now get the security version from that data even on QtWebEngine < 6.3, if that information is known. When we fall back to a base version (e.g. 6.7.99 -> 6.7), we make sure to not pretend that we have the .0 state of things, though. Finally, we cross-check the information against the current Qt version if we have the API, which mostly ensures the data is accurate for human readers. See #7187 and #8139.
7 daysversion: Update security patch version commentsFlorian Bruhin
Mostly based on CHROMIUM_VERSION in QtWebEngine and chromereleases.googleblog.com.
7 daysMove pastebin button up for version infoFlorian Bruhin
7 daysSplit QtWebEngine version across multiple linesFlorian Bruhin
More readable now that we have more information in it. Also always show the source, now that we have the space for it, and "UA" isn't the obvious default anymore anyways.
7 daysMerge pull request #8179 from qutebrowser/update-dependenciesFlorian Bruhin
Update dependencies
7 daysExit command mode in editor testsFlorian Bruhin
Similarly to 24d01ad25729458f0584a35c6b4d9a36f0b5e580, failing Qt 5.15 tests showed some evidence of us being stuck in command mode in the next test file (hints.feature). On the first test there ("Scenario: Using :hint-follow outside of hint mode (issue 1105)"): 17:38:51.073 ERROR message message:error:63 hint-follow: This command is only allowed in hint mode, not command. but: end2end.fixtures.testprocess.WaitForTimeout: Timed out after 15000ms waiting for {'category': 'message', 'loglevel': 40, 'message': 'hint-follow: This command is only allowed in hint mode, not normal.'}. I agree with what has been said: This should never happen, because we restart the qutebrowser process between test files. I did some of the mentioned "more examination" but also don't have an explanation. To avoid more flaky tests, let's roll with another bandaid solution.
7 daysMake qt.machinery.Unavailable inherit ModuleNotFoundErrorFlorian Bruhin
With pytest 8.2, pytest.importorskip(...) now only considers ModuleNotFoundError rather than all ImportErrors, and warns otherwise: https://github.com/pytest-dev/pytest/pull/12220 While we could override this via pytest.importorskip(..., exc_type=machinery.Unavailable) this is a simpler solution, and it also makes more sense semantically: We only raise Unavailable when an import is being done that would otherwise result in a ModuleNotFoundError anyways (e.g. trying to import QtWebKit on Qt 6).
7 daysUpdate changelogFlorian Bruhin
8 daysPreload broken qutebrowser logo resourceFlorian Bruhin
When qutebrowser is running but its installation has been deleted/moved, it fails in somewhat mysterious but predictable ways. This is e.g. the case currently, when people upgrade their Archlinux packages and upgrade from Python 3.11 to 3.12. When doing that with qutebrowser open, on the next page load, it will: - Have a crashed renderer process, because (assumingly) the process executable is gone on disk. - Which then causes us trying to render an error page, but that fails due to broken_qutebrowser_logo.png being gone from disk. - The FileNotFoundError then causes jinja2 to import jinja2.debug at runtime, but that *also* fails because the jinja2 package is gone. We work around this by loading the PNG into RAM early, and then using the cached version instead. This amends b4a2352833bfb06c86c1afb8b088cead0ef7c6d5 which did the same with HTML/JS resources, but never for this PNG, which (looking at crash logs) seems to be a somewhat common breakage. Alternatives I've considered: - Catching the FileNotFoundError and not showing an error page at all. - Generating a PNG with an explanatory text via QPainter and returning that. However, with the renderer process crash happening in the first place for unknown reasons, it's unclear if the error page ever gets actually displayed... Let's roll with this for now, and if this causes a repeating renderer process crash, fix that separately (also see #5108).
8 daystabbedbrowser: Clean up QTBUG 91715 workaroundFlorian Bruhin
By returning early, we can move the logic up a bit and handle the normal case after.
9 daysUpdate dependenciesqutebrowser bot
9 daysMerge pull request #8173 from qutebrowser/update-dependenciestoofar
Update dependencies
10 daysfix lint, add cheroot log ignorestoofar
mypy: Mypy knows about the QDataStream.Status.SizeLimitExceeded attribute now, so we can remove the ignore. But mypy for pyqt5 doesn't know about it, so put the whole graceful block behind an additional conditional as well to hide it from pyqt5 mypy. cheroot: looks like the format of the error message we are already ignoring changed slightly. The `ssl/tls` bit changed to `sslv3`, at least in our setup.
11 daysUpdate dependenciesqutebrowser bot
11 daysMerge pull request #8168 from qutebrowser/update-dependenciestoofar
Update dependencies
11 daysUpdate dependenciesqutebrowser bot
11 daysRevert "delay fake-key" and add waits in e2e tests insteadtoofar
Previously (a209c86c55a4) I've added a delay in browser code before sending events to the page to account with a race condition where events weren't processed after navigating. Then I had to add extra checks to tests that had tight timing requirements. That was for click-element, this commit reverts an attempt at the same strategy for fake-key and instead adds wait statements in the tests that where hitting the original race condition (sending events "too soon" after a navigation). The reason for the different approach here is that after adding the delay in fake-key I had to add an extra "wait for log line" message to a few tests with tight timing requirements to watch for a Tab key press. That worked great for webengine but it made some tests start failing on webkit. We don't seem to get that log message on webkit. I've got no-idea why and frankly think I've spent way too much time on just a handful of tests already. It's unfortunate we have to add manually delays in the e2e tests. It makes me think if anyone else adds a test in the future with this combination of steps (open page, run fake-key) they'll run into the same issue and it'll be hard to spot. Oh well, we'll deal with that when it comes up. The tests that where failing on webkit are the ones in caret.feature touched in this commit. Reverts included in this commit: Revert "Delay fake-key events by 10ms" This reverts commit 9f050c7460c42f317ceaa20b320e97d371a2c0a0. Revert "Wait for evidence of Tab key press in tests before proceeding" This reverts commit d47d247941c4b1fe3adac0dae8be301b36aec85b.
11 daysWait for evidence of Tab key press in tests before proceedingtoofar
In the previous commit 9f050c7460c4 "Delay fake-key events by 10ms" I delayed events for fake-key by 10ms to deal with a timing issue with sending events right after a navigation not being processed. Just like last time that's caused a few tests with tight timing constraints to break because they proceed to the next command before the fake-key events have taken effect. Maybe it would have been better to just put the waits in the e2e tests in the first case instead of in the production code? Well, we'll see. Maybe I'll never have to deal with this again.
11 daysDelay fake-key events by 10mstoofar
Similar to a209c86c55a4 "Delay QEvent driven mouse clicks by 10ms" it seems that sending fake-key QEvents immediately after a navigation causes the events to not be processed. This is causing e2e tests in keyinput.feature to fail in a flaky, but frequent, manner. This can also be resolved in some other ways like putting a wait in the e2e tests like so: When I open data/keyinput/log.html And I wait 0.01s And I run :fake-key <Escape> But relying on maintainers to remember to do that seems error prone. If this 10ms delay turns out to be something to get rid of we could try keep this delay to be used in less cases: 1. add some magic to e2e tests where it compares the previous and current line and if it sees an open and a click-element or fake-key line next to each other it delays for a bit 2. in the application code in tab.send_event() store the time of last navigation and queue events for sending till after that The affected tests in this case where: tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_key_to_the_website tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_special_key_to_the_website tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website
11 daysExit mode before edit tests.toofar
Exit prompt mode on the last test in downloads.feature because it's preventing the next tests in editor.feature from running. Screenshots of the first failing test in editor.feature shows a prompt open and jsprompt open in the background. This shouldn't happen as there is a module level fixture in conftest.py that is supposed to close and re-open the browser process between each feature file. That bears more examination but for now this change looks pretty painless.
11 daysWait for evidence of click in e2e before proceedingtoofar
I've added a 10ms delay when sending a fake click via QEvents to help with a timing issue in the prompt e2e tests in Qt6.7. Apparently that throws off the tight timing of this one test! I guess the `:scroll bottom` comes before the iframe has been clicked. I'm a little worried that if we are depending on timing stuff like this we should be looking at a more thorough solution. Maybe the "and follow" suffix can trigger it to wait for "Clicked *editable element!"? Also I can try to reduce the delay in the click, but 10ms is pretty short already.
11 daysDelay QEvent driven mouse clicks by 10mstoofar
On CI with Qt 6.7 we are seeing several tests failing in a flaky, but frequent, manner. These tests all seem to be doing :click-element and sending a "fake" click, as in one driven by QEvents, to a button on the test page after opening the page in an existing tab. In the logs we see that the element was identified with JS correctly but we don't see any evidence of the actual click after that. I've been testing locally with `python3 -m pytest tests/end2end/features/test_prompts_bdd.py -k test_javascript_confirm`. Delaying the click event by as little as 5ms seems to make the tests consistently pass. I'm setting it to an arbitrary 10ms here for no good reason. It's unfortunate that we have to change production code to make tests pass, it's unlikely that a 10ms window will affect real usage, and the problem is only immediately after a navigation. If we can't find a better way to resolve this and want to get rid of the 10ms delay when no needed we could maybe look at when the last navigation time for the tab was to decide whether to delay or not. I also tried changing all the "open in" lines in the failing tests to be "open in new tab" and that seemed to make the flaky tests pass consistently too. But relying on people writing tests in a specific way wouldn't really be fixing the problem. Additionally, running just one test at a time (with `taskset -c 1 ...`) made all the tests pass consistently. So it seems like the root cause could have something to do with that, somehow. Or maybe just running the pytest process and the browser process on the same CPU causes enough of a delay to not trigger it. I don't know what the root cause of this change is, or if we can use a more event based way of knowing when the page (or its focus proxy) is ready to receive events. I've tried digging through events and debugging webengine and haven't got anywhere, hopefully this delay is painless enough that it'll do. To summarize, the page, or focus proxy, doesn't process events (all events, just mouse events?) immediately after navigating. I initially tried delaying all events in `tab.send_event()`, but that caused some caret tests to fail (the `selectionfollow_with_link_tabbing` e2e ones), not sure why. So I walked back to just delaying click events. I've seen some intermittent flakyness in `test_misc_bdd.py::test_clicking_on_focused_element` and `tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website` which may indicate that `:fake-key` needs the same treatment. We'll see how things stand once it's been stable on the main branch for a while instead of being muddled up in this investigation branch. I thought the issue might be that the RenderWidgetHostViewQt was being swapped out on the new page load and the old one being sent the event. So I added a bunch of debug logging to try to get a better view of that. None of this debug logging is showing up when the tests fail so it seems that isn't the case. The tests failing in the last four bleeding edge qt6 tests before these changes were (test, count): ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_special_key_to_the_website', 2), ('tests/end2end/features/test_prompts_bdd.py::test_using_contentjavascriptalert', 2), ('tests/end2end/features/test_editor_bdd.py::test_select_two_files_with_multiple_files_command', 2), ('tests/end2end/features/test_misc_bdd.py::test_clicking_first_element_matching_a_selector', 2), ('tests/end2end/features/test_misc_bdd.py::test_clicking_on_focused_element', 2), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_prompt_with_default', 2), ('tests/end2end/features/test_prompts_bdd.py::test_using_contentjavascriptprompt', 2), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__aborted', 2), ('tests/end2end/features/test_editor_bdd.py::test_file_selector_deleting_temporary_file', 1), ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website', 1), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__no', 1), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm_with_default_value', 1), ('tests/end2end/test_insert_mode.py::test_insert_mode[100-input.html-qute-input-keypress-awesomequtebrowser]', 1), ('tests/end2end/features/test_misc_bdd.py::test_clicking_an_element_by_position', 1), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__yes', 1), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm_with_invalid_value', 1), ('tests/end2end/test_insert_mode.py::test_insert_mode[125-input.html-qute-input-keypress-awesomequtebrowser]', 1), ('tests/end2end/features/test_editor_bdd.py::test_select_two_files_with_single_file_command', 1), ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_key_to_the_website', 1), ('tests/end2end/features/test_misc_bdd.py::test_clicking_an_element_by_id_with_dot', 1), ('tests/end2end/features/test_prompts_bdd.py::test_javascript_alert_with_value', 1) For debugging in GBD under test I ran the test process under GDB and passed a script to GDB to print out a message, and then continue, when it hit a breakpoint. Unfortunately, the tests always passed when run under GDB. For that I changed `_executable_args()` in quteprocess to return `"gdb", "-q -x handleMouseEvent-breakpoint -args".split() + [executable] + args` where `handleMouseEvent-breakpoint` is: set breakpoint pending on set debuginfod enabled off break RenderWidgetHostViewQtDelegateClient::handleMouseEvent commands call (void) fprintf(stderr, "Entering handleMouseEvent\n") continue end run The tests were consistently passing, but erroring on the invalid gdb log lines.
2024-04-20Merge pull request #8139 from ↵toofar
qutebrowser/feat/7187_chromium_security_patch_in_version Show chromium security patch version in :version
2024-04-16Avoid quitting when closing KDE file dialogFlorian Bruhin
See https://bugreports.qt.io/browse/QTBUG-124386 Fixes #8143
2024-04-16Merge pull request #8164 from qutebrowser/update-dependenciesFlorian Bruhin
Update dependencies
2024-04-15Update dependenciesqutebrowser bot
2024-04-13update changelog for #8162toofar
2024-04-13Ignore DIR_APP_DICTIONARIES message in release smoke test tootoofar
We've already ignored this in the tests, it started showing up in the nightly builds a few days ago, only on macos for some reason.
2024-04-13Merge pull request #8162 from NocturnalNessa/small_fix_for_tor_identity_scripttoofar
Changed line 35 of tor_identity userscript to stop it throwing an err…
2024-04-11Changed line 35 of tor_identity userscript to stop it throwing an error when ↵Vanessa Frank
'--control-port' is passed
2024-04-09Adjust changelog URLsFlorian Bruhin
2024-04-09flake8: Remove redundant pytest style optionsFlorian Bruhin
Default since flake8-pytest-style 2.0.0: https://github.com/m-burst/flake8-pytest-style#change-log
2024-04-09mypy: Remove show_error_codesFlorian Bruhin
Default since 0.991: https://mypy-lang.blogspot.com/2022/11/mypy-0990-released.html
2024-04-09Merge pull request #8152 from qutebrowser/update-dependenciestoofar
Update dependencies
2024-04-09Ignore new mesa "error" logtoofar
This only shows up on the webkit CI job. Probably something to do with the fact that we are using webkit builds from the distant archives. I'm sure it'll break for real one of these days.
2024-04-09Add backports.tarfile changelog linktoofar
It's a new externalised dependency of jaraco.context, doesn't seem to have a RTD site yet. ref: https://github.com/jaraco/jaraco.context/commit/e13fc7f2b379683c326153a3d6f4d2800f812fd0
2024-04-09Move webkit.http to webkit.httpheaderstoofar
flake8 got a new warning about a module name shadowing a builtin module: https://github.com/gforcada/flake8-builtins/pull/121 Probably would have been safe enough to ignore it. But I don't think moving it is that hard anyway. Hopefully I didn't miss anything!
2024-04-08Update dependenciesqutebrowser bot
2024-04-06Pin eslint for now until we support v9+toofar
See https://github.com/qutebrowser/qutebrowser/issues/8159
2024-04-06Add a :window-only for some qt5 end2end teststoofar
A couple of tests seem to be failing because there is two windows open and they don't expect it. I haven't fixed the root cause, I looked through the logs and couldn't see why a second window was open. But if this makes the tests pass, I guess we can address that if someone reports it. Also changed `_get_scroll_values()` to handle multiple tabs/windows being open too while I was there. Example logs: https://github.com/qutebrowser/qutebrowser/actions/runs/8548730512/job/23422922448 Sessions file from the test logs: Current session data: windows: - geometry: !!binary | AdnQywADAAAAAAAyAAAAMgAAA1EAAAKJAAAAMgAAADIAAANRAAACiQAAAAAAAAAAAyAAAAAyAAAA MgAAA1EAAAKJ tabs: - active: true history: - active: true last_visited: '2024-04-04T03:21:00' pinned: false scroll-pos: x: 0 y: 0 title: about:blank url: about:blank zoom: 1.0 - active: true geometry: !!binary | AdnQywADAAAAAAAyAAAAMgAAA1EAAAKJAAAAMgAAADIAAANRAAACiQAAAAAAAAAAAyAAAAAyAAAA MgAAA1EAAAKJ tabs: - active: true history: - active: true last_visited: '2024-04-04T03:21:03' pinned: false scroll-pos: x: 0 y: 40 title: Scrolling url: http://localhost:39235/data/scroll/simple.html zoom: 1.0
2024-04-06Ignore more 6.7 DIR_APP_DICTIONARIOES log messagestoofar
In the bleeding edge CI tests I'm seeing: IGNORED: Path override failed for key base::DIR_APP_DICTIONARIES and path '/__w/qutebrowser/qutebrowser/.tox/bleeding/lib/python3.11/sitePath override failed for key base::DIR_APP_DICTIONARIES and path '/__w/qutebrowser/qutebrowser/.tox/bleeding/lib/python3.11/site-packages/PyQt6/Qt6/libexec/qtwebengine_dictionaries' INVALID: -packages/PyQt6/Qt6/libexec/qtwebengine_dictionaries' Where the second line looks like maybe spill over from the first one that is for some reason being printed twice and interleaved! Maybe different processes or threads? I did a regex for "line ending with this and with no spaces in it" which is hopefully safe enough to not pick up a wrong line accidentally.
2024-03-27Add role="switch" to default hints.selectorsFlorian Bruhin
See https://www.reddit.com/r/qutebrowser/comments/1bomb3h/closing_popups_within_a_webpage_and_toggling/
2024-03-27Fix derpFlorian Bruhin