Commit Graph

2168 Commits

Author SHA1 Message Date
toofar bab8596a68 Merge pull request #7879 from michaelfm1211/main
Move URL to yankable string conversion to urlutils
2024-06-22 16:30:35 +12:00
Florian Bruhin af1d537970 Try stabilizing 'Clicking on focused element'
The problem was that 'qute-input focused' wasn't logged. Let's see if this helps.
2024-05-25 13:19:42 +02:00
Florian Bruhin 4fadca2ae7 tests: Make ssl message matching fuzzier
Windows seems to struggle with the dash
2024-05-25 09:34:01 +12:00
Florian Bruhin 72d7e2327b Update for new pylint/astroid releases
- Add a couple new "raise utils.Unreachable" to avoid
  possibly-used-before-assignment issues.
- Simplify an "if" for the same reason
- Remove an unneeded "return"
- Use "NoReturn" to prepare for pylint knowing about it in the future:
  https://github.com/pylint-dev/pylint/issues/9674
- Add some ignores for used-before-assignment false-positives
- Ignore new undefined-variable messages for Qt wrapers
- Ignore a new no-member warning for KeySequence:
  https://github.com/pylint-dev/astroid/issues/2448#issuecomment-2130124755
2024-05-24 21:46:04 +02:00
Evan Chen 310c865f29
Fix some spelling errors 2024-05-09 10:58:04 -04:00
Florian Bruhin a8f4feabb7 Exit command mode in editor tests
Similarly to 24d01ad257, 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.
2024-04-30 20:34:50 +02:00
toofar bdbbb93cd2 fix lint, add cheroot log ignores
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.
2024-04-28 12:43:40 +12:00
toofar 817091c61d Revert "delay fake-key" and add waits in e2e tests instead
Previously (a209c86c55) 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 9f050c7460.

Revert "Wait for evidence of Tab key press in tests before proceeding"

This reverts commit d47d247941.
2024-04-27 18:05:44 +12:00
toofar d47d247941 Wait for evidence of Tab key press in tests before proceeding
In the previous commit 9f050c7460 "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.
2024-04-27 15:20:00 +12:00
toofar 24d01ad257 Exit mode before edit tests.
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.
2024-04-27 13:44:38 +12:00
toofar 44a63d9b3a Wait for evidence of click in e2e before proceeding
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.
2024-04-27 13:44:03 +12:00
toofar 7c2116751f Ignore new mesa "error" log
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-09 08:23:27 +12:00
toofar 26dcc4a7a9 Add a :window-only for some qt5 end2end tests
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-06 12:05:31 +13:00
Florian Bruhin 713a4e5ec2 Fix caret tests on Qt 6 and Windows 2024-03-27 19:49:09 +01:00
Florian Bruhin 7a969a2d54 Add caret browsing debug logging 2024-03-27 16:55:18 +01:00
Florian Bruhin 481542844d tests: Avoid using autofocus for click_element tests
Similarly to the last commit (982b8bdcec),
we run into a race between autofocus triggering and the test trying to
click the focused element.

This also affects the "when there is none" test, which loses the focus
before it has been set, thus ending up with a focused element but expecting
none.

We fix both in one go by manually focusing things with a tab keypress
instead of using autofocus.

See #8145 and #5390.
2024-03-27 13:05:28 +01:00
Florian Bruhin 982b8bdcec Fix input.insert_mode.auto_load race / test_auto_load flakiness
Fixes #8145, see #5390.

As long as we don't have a solution to get notified about focus happening
(#2471 possibly?), it looks like there is no better way to get notified
about this, so a delay will need to do for now.
2024-03-27 12:34:30 +01:00
Florian Bruhin 0b220117e2 tests: Fix glob matching 2024-03-26 14:30:20 +01:00
Florian Bruhin 6ee7a23c7e tests: Ignore new SSL error message
Seems to break in bleeding edge tests
2024-03-26 14:15:09 +01:00
Florian Bruhin a45cfb89cb tests: Add new ignored error messages 2024-03-25 23:05:25 +01:00
Florian Bruhin 1ad6b68d33 tests: Ignore yet another mesa (?) warning
As shown in detail by toofar in dff25d10bc,
mesa 23.3 seems to trigger some new error messages.

On my setup locally, it also triggers the warning that's ignored here.

Why that's not the case on CI or for others is unclear to me, I gave up
trying to understand graphics stuff on Linux.

I'll just presume this is the same underlying cause, and refer to the
commit message of the commit above for more details.
2024-01-10 14:33:26 +01:00
toofar dff25d10bc Ignore mesa "error" logs
Mesa upgraded from 23.2.1-2 to 23.3.1-1 a couple of days ago. Since then
there has been some non-fatal InvalidLine errors in the CI jobs (eg
https://github.com/qutebrowser/qutebrowser/actions/runs/7281982007/job/19843511920)

Based on https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293 I'm
assuming these log messages don't actually indicate errors and the tests
pass when they are ignore.

Weirdly, I'm only seeing these errors related to the
`tests/end2end/test_invocations.py::test_misconfigured_user_dirs` test,
I'm not sure why. It doesn't look much different from the ones around
it.

Possibly we could ignore these lines just for that test, or maybe play
round with it more to find out why it is different. But since the lines
are non fatal I'll just ignore them everywhere. I'm a little worried
about that because they are quite generic, but at least they are still
logged when they are ignored.

They might change these error logs messages to be warning log messages
based on that issue. But it'll probably still fail the tests since we
match on all log lines?

The "always try zink" change was introduced in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25640
It looks like there might be a `LIBGL_KOPPER_DISABLE` which may skip
this behaviour. Not I'm not sure, the commit message says:

> don't load non-sw zink without dri3 support
> this is going to be broken, so don't bother trying
> also add LIBGL_KOPPER_DRI2 so people can continue to footgun if they
> really really want to

I assume we aren't trying to run with non-sw zink but with non-zink sw?
idk

Maybe we should be setting force_software_rendering=software-opengl or
LIBGL_ALWAYS_SOFTWARE instead so that it never tries to use the vulkan
backed zink?
2023-12-21 15:21:19 +13:00
toofar b643e7b411 Try getting sandbox page text again
On CI now the sandbox test is failing on windows when we pop the header
line with an index error. It looks like the only line present on the
page is "Sandbox Status". It was working on CI the other day! Grrr

Hopefully it's a timing issue and the JS just hasn't finished running
yet? Not sure if just loading it again is the most reliable. Ideally we
would be listening for some event...

Pretty low effort but if this makes the test stop being flaky and we
don't have to look at it again that's fine with me.
2023-11-24 21:47:01 +13:00
Florian Bruhin 723a5db8f2 tests: Disable disable-features=PaintHoldingCrossOrigin
This seems to help with severe flakiness around clicking elements / JS
execution on Qt 6.4+.

See https://bugreports.qt.io/browse/QTBUG-112017
and #5390
2023-11-21 16:30:27 +01:00
toofar 7444179a23 Update parsing of sandbox page on windows in tests
In the linux branch when it was doing:

    header, *lines, empty, result = text.split("\n")
    assert not empty

It was complaining that "empty" was "}", because the windows sandbox
page has JSON at the bottom now. The whole things looks to have changed
completely. I'm actually surprised it was working before, why would it
have been saying seccomp was enabled on windows?

Anyway, I did the debug-dump-text --plain that quteproc is doing in a VM
and tested this with sandboxing off an on. No idea how stable that will
be!

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-18 21:27:32 +13:00
Florian Bruhin 01883a7ec4 tests: Ignore another spurious libva error 2023-09-25 16:59:56 +02:00
Michael M 1b815695c8
change {yank_url} to {url:yank} 2023-09-18 09:01:39 -05:00
Michael M b402a9e4b5
Merge branch 'main' into main 2023-09-13 23:11:34 -05:00
Michael M 38e5513f4f
add more test 2023-09-13 23:10:02 -05:00
Florian Bruhin ae2e679dfc tests: Ignore some more irrelevant messages 2023-09-06 16:38:46 +02:00
Philipp Albrecht ff6668f295 Generalize (testdata) substitution in end2end tests
We replace the `(testdata)` placeholder with `testutils.abs_datapath()` in a few end2end
tests. So far we only needed to replace `(testdata)` with an OS path (e.g. in
`tests/end2end/features/spawn.feature`). By introducing `(testdata)` to an end2end test
in `tests/end2end/features/hints.feature`, we required a new use case: replacing
`(testdata)` as part of a valid file:// URI.

```
When I open file://(testdata)/some/file.txt
```

Replacing `(testdata)` in above BDD step with a plain OS path resulted in invalid URIs,
e.g. for the path "C:\\Users" above BDD step results in this invalid URI:

```
When I open file://C:\Users/some/file.txt
```

We deal with this by first isolating the `(testdata)` substitution in a single place.
Having `(testdata)` substitutions in a single place, we simply special-case the substitution
of file:// paths, which will be part of a URI.
Successful substitution for above BDD step looks like the following:

```
When I open file:///C:/Users/some/file.txt
```
2023-09-05 12:20:02 +02:00
Philipp Albrecht 43ca14aa53 Allow hinted navigation from file:// to remote origins
As of Qt 6 navigating from local to remote origins requires user interaction. This broke
following links to remote origins via hints from a local file (e.g. `bookmarks.html`),
because hints use JavaScript to open links by default.

Example:

1. Have a local `bookmarks.html`:
   ```html
   <!DOCTYPE html>
   <html>
       <head>
           <meta charset="utf-8">
           <title>My bookmarks</title>
       </head>
       <body>
           <a href="https://example.com/" id="link">some bookmark</a>
       </body>
   </html>
   ```
2. Open that local `bookmarks.html` in qutebrowser (e.g. `:open path/to/bookmarks.html`)
3. Start hinting
4. Follow a link to a bookmark (e.g. https://example.com/)
5. Instead of the link opening, be presented with `Your internet access is blocked`
   error

To fix this, we simply force a user interaction for all hints on file:// URLs (like we
did for `qute://` URLs in 8defe1ae44).

We skip the end2end test for webkit, because webkit does not support URLSearchParams[1]
used in `tests/end2end/data/hints/link_inject.html`

[1] https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
2023-08-28 13:17:08 +02:00
Philipp Albrecht 3974725932 Normalize end2end data directory path
Given the following scenario:
```
When I open file://(testdata)/some/file.html
Then file://(testdata)/some/file.html should be loaded
```
If the end2end data directory is not normalized, the scenario fails because we try to
compare

```
file:///home/palbrecht/dev/qutebrowser/tests/helpers/../end2end/data/hints/link_inject.html?port=50…
```

to

```
file:///home/palbrecht/dev/qutebrowser/tests/end2end/data/hints/link_inject.html?port=50…
```

Normalizing the path resolves the `..` and fixes the issue.
2023-08-28 13:17:08 +02:00
Philipp Albrecht 21751603b4 Support opening file:// URLs in end2end tests
This is required to use BDD steps like the following:
```
When I open file://path/to/file.html
```

If we don't treat `file:` as a special scheme, we implicitly convert it to an invalid
URL:
```
http://localhost:48595/file:///path/to/file.html
```
2023-08-23 09:27:31 +02:00
Philipp Albrecht 42dfc82fb8 Use (testdata) in "I open {path}" BDD step 2023-08-23 09:26:07 +02:00
Florian Bruhin 856d483724 Fix test on QtWebKit 2023-08-18 01:00:30 +02:00
Florian Bruhin 300bf173b8 Fix tests for new navigation request log output 2023-08-17 23:37:48 +02:00
Florian Bruhin a2697feb48 Work around back/forward navigation from qute://bookmark
With Qt 6.3+, user interaction is required to navigate outside of qute:// from a
qute:// page.

Follow-up to 8defe1ae44.
Also see 216a9f9a9b

Fixes #7815

See #7220 - should be revisited once we have a qute-bookmarks:// instead where
we can adjust permissions when registering the URL handler.
2023-08-17 23:00:04 +02:00
Philipp Albrecht 5faae69f77 Skip invalid history items when saving a session
Opening a download in a new tab leaves a "dead" tab (see example of a "dead" tab below)
behind. When saving a session containing such a "dead" tab, we end up with entries in
the session like this one:
```yaml
  - active: true
    history:
    - active: true
      last_visited: '1970-01-01T02:00:00'
      pinned: false
      scroll-pos:
        x: 0
        y: 0
      title: ''
      url: ''
      zoom: 1.0
```

When loading a session containing such a "dead" tab, qutebrowser does not restore any
history of that session and logs the following error:
```
ERROR: Failed to load session default: PyQt6.QtCore.QUrl('') is not valid
```

As pointed out by @The-Compiler in this comment[1], the behavior of
`QWebEngineHistoryItem::isValid()`[2] changed somehow between Qt 6.4 and 6.5.
`QWebEngineHistoryItem::isValid()` now returns `True` for "dead" tabs, even though the
history item is not valid (i.e. `url().isValid()` returns `False`).

To fix this we simply add an additional check if the URL is valid before adding a tab to
the session to be saved.

[1] https://github.com/qutebrowser/qutebrowser/issues/7696#issuecomment-1672854592
[2] https://github.com/qt/qtwebengine/blob/v6.5.2/src/core/api/qwebenginehistory.cpp#L69-L75
2023-08-16 09:39:51 +02:00
Florian Bruhin cbdf18919c Skip too flaky cross-origin focus test 2023-08-15 20:33:58 +02:00
Florian Bruhin 3fd8e12949 Merge remote-tracking branch 'origin/pr/7809' 2023-08-15 20:04:30 +02:00
Florian Bruhin b55a9f794b Rewrite cross-origin navigation test to use scrolling
Hopefully makes it more reliable
2023-08-15 19:29:45 +02:00
Florian Bruhin 66254e7e6e Fix bookmark tests, part 2 2023-08-15 16:51:08 +02:00
Florian Bruhin f819a189d4 Fix bookmark tests 2023-08-15 16:32:08 +02:00
Florian Bruhin 37d3f30f8b Fix issues with qute://start searching test 2023-08-15 16:27:22 +02:00
Florian Bruhin ec7664e93f Merge branch 'qt6-kbd-focus' 2023-08-15 16:26:44 +02:00
Florian Bruhin 19609fdb07 Add a test for keyboard focus after cross-origin navigation
Fails without the fix on main on QtWebEngine 6.4 (works on 6.2).
Works fine after the fix.

See #7820
2023-08-15 16:26:34 +02:00
Florian Bruhin f7846fc7aa tests: Don't encode headers set via Flask
See 5ff0a573f4

With that commit, encoding the header ourselves means that we'll actually be
navigating to the path `/b'data/...'` instead of `/data/...`.
2023-08-15 16:22:37 +02:00
Florian Bruhin 57421dcd99 Further stabilize urlmark end2end tests 2023-08-14 18:26:06 +02:00
Florian Bruhin 22e662e9b0 tests: Fix log ignore for newer Qt
Seems to show as 50 instead of 65 somehow...
2023-08-14 17:52:30 +02:00
Philipp Albrecht d5faeef14c Rename :edit-command to :cmd-edit
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case we additionally renamed the command slightly to fit better with the `cmd-` prefix.
2023-08-11 09:02:17 +02:00
Philipp Albrecht 86925b58cb Rename :repeat-command to :cmd-repeat-last
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case we additionally renamed the command slightly to fit better with the `cmd-` prefix.
2023-08-11 09:02:12 +02:00
Philipp Albrecht f354d3ab91 Rename :run-with-count to :cmd-run-with-count
Group commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:02:08 +02:00
Philipp Albrecht 20de484de5 Rename :set-cmd-text to :cmd-set-text
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case renaming the command slightly was a better fit.
2023-08-11 09:02:02 +02:00
Philipp Albrecht 80b4d2f243 Rename :later to :cmd-later
Group commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:02:01 +02:00
Philipp Albrecht 2fe4864b78 Rename :repeat to :cmd-repeat
Grouping commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:00:27 +02:00
Florian Bruhin fc843f3944 Fix lint/tests 2023-08-10 16:53:52 +02:00
Florian Bruhin 8defe1ae44 Require user interaction for hints on qute:// pages
With Qt 6.3+, user interaction is required to navigate outside of qute:// from a
qute:// page.

Fixes #7815

See #7220 - should be revisited once we have a qute-bookmarks:// instead where
we can adjust permissions when registering the URL handler.
2023-08-10 15:30:34 +02:00
Florian Bruhin 0b200207dd Add --all to :{quick,book}mark-del
Needed mostly for urlmarks BDD tests so they can clear things between tests.
Hopefully with --all, this won't be accidentally triggered by users.

Preparation for #7815
2023-08-10 15:30:26 +02:00
Florian Bruhin 9e21e2e86b tests: Handle PermissionError for waitpid in test_restart
While not documented that way:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/cwait?view=msvc-170

It looks like that Windows sometimes sets errno to EACCES here (causing a
PermissionError):

>           os.waitpid(pid, 0)  # pid, options... positional-only :(
E           PermissionError: [Errno 13] Permission denied

I have no idea why it happens, but it results in flaky tests on CI.
We aren't particularly interested in this (we just want to make sure the process
is cleaned up before the next test runs...), so let's just ignore this.
2023-08-10 13:25:26 +02:00
Florian Bruhin 7bf5abbc69 Add a test for :restart 2023-07-23 16:32:49 +02:00
Florian Bruhin e909f57f4f Fix lint/tests 2023-07-23 14:10:10 +02:00
Florian Bruhin a537ac3e49 reuse: Replace last copyright texts 2023-07-23 12:59:11 +02:00
Florian Bruhin 3eb826f664 reuse: Update remaining copyright texts
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) ([^<]*)<([^>]*)>/SPDX-FileCopyrightText: \2<\3>/'
2023-07-23 12:52:01 +02:00
Florian Bruhin 0718b25796 reuse: Initial copyright text update for myself
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) Florian Bruhin \(The Compiler\) <mail@qutebrowser\.org>/SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>/'
2023-07-23 12:49:05 +02:00
Florian Bruhin b2aaba6043 reuse: Adjust most license headers
git ls-files | xargs grep -l "is free software"  | xargs reuse annotate --license="GPL-3.0-or-later" --skip-unrecognised
2023-07-23 12:11:07 +02:00
Florian Bruhin 9330e9fd91 Fix funny remaining master branch reference 2023-07-23 12:08:22 +02:00
Florian Bruhin ec34865168 Move master branch references to main
Closes #7097
2023-07-23 11:38:19 +02:00
Philipp Albrecht e3a58e84c6 Don't crash on --logfilter 2023-07-20 15:09:48 +02:00
Philipp Albrecht 45f6cf01c3 Don't show warning when jumping to next/prev without matches 2023-07-05 11:16:55 +02:00
Philipp Albrecht d9e8b638bf Remove vim modelines
We're deprecating vim modelines in favor of `.editorconfig`.

Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:

```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```

Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:

```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
2023-06-30 11:03:06 +02:00
Florian Bruhin 5fa878c7d1 py38: Run modified pyupgrade
Modified to leave f-strings alone for now, and also not do some other
stuff we should do separately:

    diff --git i/pyupgrade/_main.py w/pyupgrade/_main.py
    index 4292174..37547b3 100644
    --- i/pyupgrade/_main.py
    +++ w/pyupgrade/_main.py
    @@ -294,7 +294,8 @@ def _fix_tokens(contents_text: str) -> str:
                    token.utf8_byte_offset == 0 and
                    token.line < 3 and
                    token.name == 'COMMENT' and
    -                tokenize.cookie_re.match(token.src)
    +                tokenize.cookie_re.match(token.src) and
    +                False
            ):
                del tokens[i]
                assert tokens[i].name == 'NL', tokens[i].name
    diff --git i/pyupgrade/_plugins/fstrings.py w/pyupgrade/_plugins/fstrings.py
    index e648075..eb44c0c 100644
    --- i/pyupgrade/_plugins/fstrings.py
    +++ w/pyupgrade/_plugins/fstrings.py
    @@ -88,7 +88,7 @@ def _format_params(call: ast.Call) -> set[str]:
        return params

    -@register(ast.Call)
    +# @register(ast.Call)
    def visit_Call(
            state: State,
            node: ast.Call,
    diff --git i/pyupgrade/_plugins/open_mode.py w/pyupgrade/_plugins/open_mode.py
    index a20b95c..0388781 100644
    --- i/pyupgrade/_plugins/open_mode.py
    +++ w/pyupgrade/_plugins/open_mode.py
    @@ -28,7 +28,7 @@ def _permute(*args: str) -> tuple[str, ...]:
        return tuple(''.join(p) for s in args for p in itertools.permutations(s))

    -MODE_REMOVE = frozenset(_permute('U', 'r', 'rU', 'rt'))
    +MODE_REMOVE = frozenset(_permute('U', 'rU', 'rt'))
    MODE_REPLACE_R = frozenset(_permute('Ub'))
    MODE_REMOVE_T = frozenset(_plus(_permute('at', 'rt', 'wt', 'xt')))
    MODE_REMOVE_U = frozenset(_permute('rUb'))

Then run with:

    git ls-files | grep -E '(\.py|misc/userscripts)' | xargs ~/tmp/pyupgrade/.venv/bin/pyupgrade --py38-plus

And manually reverted some changes (e.g. it picking up bash userscripts)
2023-06-26 14:39:54 +02:00
Florian Bruhin 93c7fdd60c Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
Florian Bruhin 9e9b57772e tests: Resurrect :print --pdf test 2023-06-26 13:50:19 +02:00
Florian Bruhin e15223211c Fix :print --pdf with subdirectories
Fixes #5160
2023-06-26 13:50:19 +02:00
Florian Bruhin 036af85199 Revert "Work around Python 3.12 test issues"
Fixed with newest PyQt snapshot.
This reverts commit c62e9aba5b.
2023-06-25 21:48:12 +02:00
Florian Bruhin c62e9aba5b Work around Python 3.12 test issues
See #7727
2023-06-09 20:06:40 +02:00
Florian Bruhin e70f5b0318 Merge branch 'process-message-improvements' 2023-05-31 12:23:33 +02:00
Florian Bruhin 68e61a239d ci: Ignore spurious QPainter messages 2023-05-31 12:08:10 +02:00
Florian Bruhin 58436a2955 Fix lint/tests 2023-05-29 13:56:04 +02:00
Florian Bruhin 3e4d021070 tests: Fix relative URL for caret test
Similar issue as with ab7245732e
2023-04-07 15:45:20 +02:00
Florian Bruhin 54026a3217 tests: Ignore another Qt 6.5 debug message
See https://github.com/qutebrowser/qutebrowser/issues/7624
2023-04-06 22:55:53 +02:00
Florian Bruhin fd4217ffd2 tests: Make download error more forgiving
For unknown reasons, on nightly CI we now get TWO errors:

<qutebrowser.browser.webkit.certificateerror.CertificateErrorWrapper errors=['NoPeerCertificate', 'SelfSignedCertificate'] string='The peer did not present any certificate\nThe certificate is self-signed, and untrusted'>
2023-03-29 15:15:11 +02:00
toofar c5803587c1 tests: Add text content to another HTML file
I saw this test fail on windows at some point with what looked like the
same issue. (Couldn't find an element to click.)

ref; #7621
2023-03-25 18:38:27 +13:00
toofar cb0b51c094 tests: wait for flaky iframes to load via JS
TL;DR: I think I stabilized a couple of hinting iframe tests and applied
that change to all the iframe usages in the end2end tests in the hopes
that it would resolve some other flaky tests.

I was facing some tests that hinted elements in iframes failing
intermittently recently. They were most consistently failing on the
windows runner. This is similar to the trend described in the comment
linked from #1525.

The tests failing recently where:

    tests (py39-pyqt515, windows-2019, 3.9)
    test_using_hintfollow_inside_an_iframe
    test_using_hintfollow_inside_an_iframe_button

    tests (py311-pyqt515, ubuntu-20.04, 3.11)
    test_using_hintfollow_inside_an_iframe
    test_using_hintfollow_inside_an_iframe_button

They are failing because hints don't get generated for the elements in
the iframe. I can see hints do get generated for the iframe itself
though.
Examining the logs in 5.15 it seems that there is a
`cur_load_finished(True) (tab *)` log line after we run :hint. I suspect
that this is the load finished signal for the iframe.
I attempted to change the bdd open_path function to wait for the current
message it's looking for and then additionally look for that
cur_load_finished signal, but then it starts failing locally when the
iframe load signal actually comes before the parent frame one. Just
looking for the cur_load_finished signal itself also always found it
immediately ("already found"), probably from the parent frame.

So instead of trying to deal with that indeterminate ordering or
trying to change the signals to say what frame they are coming from, I
added javascript to all the pages used in iframes that run on load, and
changed all the tests to watch for log messages from the JS.

It's not the most maintainable solution, perhaps if we generated our
test files with jinja we could have some "subframe loaded" boilerplate,
get a message to log from a query param, look at metadata from test
files for the open_path checking etc.

I then searched for all the iframe usages in the test data and applied
that change to all of those files and all the tests that used them. A
few of those tests also had `flaky` annotations on them. I removed those
annotations for now in the hopes that there were affected by the same
problem. And that I actually managed to work around it correctly.

ref: #7621
2023-03-25 18:37:58 +13:00
Florian Bruhin fe6687f2ea tests: Stabilize "Hinting an input after undoing a tab close"
Without this wait, the test is flaky, because sometimes the keys are pressed
before qutebrowser has entered insert mode.

When running:

    tox -e py311-pyqt64 -- tests/end2end/features/test_hints_bdd.py -k undoing --count 100

around 30% of the runs, we get:

============================== :click-element id qute-input-existing ==============================

[...]

----> Waiting for 'command called: *' in the log
[...]
17:56:54.042 DEBUG    commands   command:run:549 Calling qutebrowser.components.misccommands.click_element(<qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=197 url='http://localhost:50977/data/hints/link_input.html'>, 'id', 'qute-input-existing', target=<ClickTarget.normal: 1>, force_event=False, select_first=False)
17:56:54.043 DEBUG    ipc        ipc:_get_socket:373 In _get_socket with None socket!
----> found it

============================== :fake-key -g something ==============================

[...]

----> Waiting for '[*] contents: existingsomething' in the log
17:56:54.062 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.111 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.112 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.113 DEBUG    commands   command:run:535 command called: quickmark-save
[...]
17:56:54.143 DEBUG    webview    webenginetab:_js_cb_single:766 Got element from JS: {'attributes': {'id': 'qute-input-existing', 'value': 'existing'}, 'caret_position': 0, 'class_name': '', 'id': 0, 'is_content_editable': False, 'outer_xml': '<input id="qute-input-existing" value="existing">', 'rects': [{'bottom': 143, 'height': 21, 'left': 8, 'right': 166, 'top': 122, 'width': 158}], 'tag_name': 'INPUT', 'text': '', 'value': 'existing'}
17:56:54.143 DEBUG    webelem    webelem:click:422 Clicking <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'> with click_target ClickTarget.normal, force_event False
17:56:54.143 DEBUG    webelem    webelem:is_editable:257 Checking if element is editable: <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'>
17:56:54.143 DEBUG    webelem    webelem:click:434 Clicking via JS focus()
17:56:54.144 DEBUG    webelem    webelem:is_editable:257 Checking if element is editable: <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'>
17:56:54.144 DEBUG    modes      modeman:enter:366 Entering mode KeyMode.insert (reason: clicking input)

With the change, the test passes 100/100 times.
2023-03-23 18:10:22 +01:00
Florian Bruhin 0510ffcfa9 tests: Remove before_first_request for webserver_sub_ssl
This was first introduced in adbdfcbad3,
most likely because we got logging from the built-in Werkzeug webserver.

It doesn't seem to be needed anymore, possibly since
41c4ee3e2f where we started using CherryPy
for the SSL server too.

This should fix nighly bleeding tests, because the before_first_request
decorator got removed in Flask:

https://github.com/pallets/flask/pull/4621
https://github.com/pallets/flask/pull/4995
2023-03-20 17:23:55 +01:00
toofar 294e73660c Re-focus tabs created from :undo
There's some weird issue with Qt6.4 and 6.5 where a webengine view gets
its widget swapped out when it gets history deserialized into it. While
it's swapping widgets it has no so the focus gets passed to some other
widget should never even have focus.

There's probably more comprehensive ways we could handle this, by
overriding the WebEngineView layout, or by overriding focusNextPrevChild
on the parent to put out own logic into the "child is going, pass focus
to parent" logic chain.

But all that seems like a bit too much of a headache for this very
focussed issue. We want the new tab to get focus, so lets re-focus it.
Technically we could just focus the last tab that we open, if we are
undoing multiple, but the existing logic is to open each of them in turn
as foreground tabs and this reinforces that.

Closes: #7623
2023-03-19 13:23:18 +13:00
toofar cb9f3fa141 tests: skip special URL deserializing tests on win
Not sure why its failing on windows, but it only really needs to run in
one environment anyway.
Previously this was using chrome://gpu but that was failing on CI due to
it invoking some vulkan stuff the didn't work without a GPU. I changed
it to chrome://sandbox/ for no good reason, but it seems to be working
fine on ubuntu at least.

Follow up to 151d808940
2023-03-18 19:13:26 +13:00
toofar c55f899c83 tests: add some text to another test HTML file
This one is for 6.5. Interesting that it was fine on 6.4.

I haven't gone and added text to all the test file because I'm hoping
it'll be something that upstream addresses in short order. So I'm only
adding text to files used by failing tests.

See d413b87c3f #7621 and #7624
2023-03-18 17:32:48 +13:00
toofar fa70b4a319 tests: ignore new blink "message rejected" log 2023-03-18 17:29:25 +13:00
toofar 151d808940 change "special url" in tests to avoid vulkan error
On GH actions I'm seeing an "unexpected line" failure around creating a
vulkan context when loading chrome://gpu

    ERROR tests/end2end/features/test_tabs_bdd.py::test_cloning_a_tab_with_a_special_url - end2end.fixtures.testprocess.InvalidLine:
    1829
    Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    1830
        at CheckVkSuccessImpl (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    1831
        at CreateVkInstance (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:360)
    1832
        at Initialize (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:235)
    1833
        at Create (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:165)
    1834
        at operator() (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:420)

I'm not sure its actually failing the test, we are just seeing the error
in the logs and flagging it.
Instead of adding the logs to an ignore list I'm going to switch the
page we use so that if the error comes up for real we'll be sure to see
the logs.
2023-03-18 16:47:12 +13:00
toofar d413b87c3f Add some text to test HTML pages.
With 6.4 and 6.5 it looks like pages without text on them only render
after a delay (on the order of hundreds of milliseconds).

ref: #7621
2023-03-18 16:47:12 +13:00
toofar 856fe781a1 Merge remote-tracking branch 'upstream/qt6-v2' into master-qt6 2023-03-18 16:24:58 +13:00
Florian Bruhin 4793070db3 Merge branch 'qt6-v2' into master-qt6 2023-03-17 20:30:13 +01:00
Florian Bruhin 9b7348a880 Qt 6.5: Always use new dark mode values for newer Qt's
I don't quite understand why the value changed from #00000 to #121212
there with Qt 6.3, but it looks like the change is here to stay.

Instead of keeping #000000 the default and adding an override for every
new Qt release, let's just switch over and add an override for the old
versions (5.15 and 6.2), so this won't break again for every new release.

See #7624
2023-03-17 17:27:37 +01:00
Florian Bruhin 2d45f6f002 tests: Ignore more Qt 6.5 / debug build messages
See #7624
2023-03-17 17:27:29 +01:00
Florian Bruhin 6e48c9f1a9 Revert "lint: add stacklevel kwarg to warnings"
This reverts commit 47be6f3aeb.

This doesn't really make sense in test files, as the warning would point
inside some internal pytest code, which is not helpful.

Instead, let's just disable the corresponding flake8 warning in tests.
2023-03-14 11:57:24 +01:00
toofar 47be6f3aeb lint: add stacklevel kwarg to warnings
flake8-bugbear B028 No explicit stacklevel keyword argument found. The
warn method from the warnings module uses a stacklevel of 1 by default.
This will only show a stack trace for the line on which the warn method
is called. It is therefore recommended to use a stacklevel of 2 or
greater to provide more information to the user.

Semgrep helped:

    semgrep --lang=py -e 'warnings.warn($ARG)' --replacement 'warnings.warn($ARG, stacklevel=2)' $FILES -a
    semgrep --lang=py -e 'warnings.warn($ARG1, $ARG2)' --replacement 'warnings.warn($ARG1, $ARG2, stacklevel=2)' $FILES -a

Although it did lose the f-string on one of them.
2023-02-26 13:39:35 +13:00
toofar ce134c9662 lint: superfluous-parens and useless-suppression
Unnecessary parens after '=' keyword
2023-02-06 19:50:22 +13:00
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