diff options
author | toofar <toofar@spalge.com> | 2024-06-23 11:37:15 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2024-06-23 20:11:25 +1200 |
commit | 39f8ce51309b24b86c95002c4cca730ce26f39e5 (patch) | |
tree | 2cec95a10af9b0d7c7192229c38d81d694047ca8 /README.asciidoc | |
parent | 52632d0f994edbf8682e76790142007ac026cfd2 (diff) | |
download | qutebrowser-39f8ce51309b24b86c95002c4cca730ce26f39e5.tar.gz qutebrowser-39f8ce51309b24b86c95002c4cca730ce26f39e5.zip |
XFail permission tests that have changed behavior on 6.8
WebEngine now has it's own mechanism to remember permission, and it's
turned on by default. We can't disable it until PyQt picks up the new
`QWebEngineProfile::setPersistentPermissionsPolicy()`. So the first test
that prompts for a permission will persist that setting and later ones
will fail because they don't get the prompt they expect.
For now lets set them to xfail while we figure out what to do with
permission persisting for actual users. That we we can reduce the noise
in the test results!
The WebEngine permissions persistence mechanism doesn't seem to
respect whatever we are doing to separate storage per-basedir. Testing
with a temp basedir like so:
python3 -m qutebrowser -T https://web-push-book.gauntface.com/demos/notification-examples/
I see this file has been created under my home directory:
$ cat ~/.local/share/qutebrowser/qutebrowser/QtWebEngine/Default/permissions.json
{"Notifications":{"https://web-push-book.gauntface.com/":true}}
I've raised an issue upstream about that here: https://bugreports.qt.io/browse/QTBUG-126595
We've got two things to think about regarding how to deal with this new
on-by-default feature:
1. what do we do for the tests? We can Disable the feature (if on new
enough PyQt) or add a test setup step that ... restarts the browser
and deletes the permissions.json. That's not great
2. what do we do for real users? See below
By default I would recommend disabling the webengine one since we
already have our own. BUT we can't actually disable it until PyQt
updates with the new APIs, which can take a while, and it's pretty
likely people will be using the new Qt version before PyQt updates. So
it would be best to figure out what we can do before that! Can we make
it respect the basedir data path? Can we make it write to some fake file
we throwaway? chmod +i?
Hopefully Qt makes the permission JSON respect the data path we set and
then at the very least we can remove the JSON file after a permission is
set. It'll still be a change in behavior for users on Qt 6.8 and PyQt
6.7 though as it'll likely remember permissions within a browser
instance by default, which isn't the case for our implementation
currently.
Related to: https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2175949686
Diffstat (limited to 'README.asciidoc')
0 files changed, 0 insertions, 0 deletions