qutebrowser/tests/unit/browser/webengine
Florian Bruhin 74c7ff2641 tests: Properly delete webengine DownloadManager objects
We create the DownloadManager with parent=qapp, which means they will stick
around forever after the test finished.

While we disconnect the QWebEngineProfile::downloadRequested() signal,
we keep the DownloadManager around, which also keeps around its download-update
timers.

Those will then result in tests/unit/utils/usertypes/test_timer.py::test_early_timeout_check
being flaky, as their _validity_check_handler slot keeps getting called in the
background. Due to the globally mocked time.monotonic(), this results in
nonsensical error messages such as:

    Got logging message on logger misc with level WARNING:
    Timer download-update (id ...) triggered too early:
    interval 500 but only -1023.269s passed!

After this change, we now clean up those objects properly, thus fixing the
flakiness.

See #5390.
2025-05-07 14:06:03 +02:00
..
test_darkmode.py Use builtin list/dict/set/... types for annotations 2024-10-15 11:54:49 +02:00
test_spell.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_webengine_cookies.py reuse: Fix more copyright headers 2023-07-23 12:56:13 +02:00
test_webenginedownloads.py tests: Properly delete webengine DownloadManager objects 2025-05-07 14:06:03 +02:00
test_webengineinterceptor.py Fix lint/tests 2023-08-08 15:08:00 +02:00
test_webenginesettings.py Shorten Chromium version in UA by default 2025-03-12 15:25:55 +01:00
test_webenginetab.py Add test checking `Feature(8)` == ClipboardReadWrite 2024-11-17 19:48:40 +13:00
test_webview.py Use str.removeprefix() and str.removesuffix() 2024-10-13 18:24:44 +02:00