Adjust permission tests for changes to 6.8 permission storage feature

Qt have updated their permission storage feature so it respects our
the setting our basedir feature uses, so now all the tests that use
"Given I have a fresh instance" are passing.

The remaining failing ones do pass if I make them run in a fresh
instance, but I am leaving them as xfail because a) opening a new
instance is slow b) the new upstream behaviour causes a regression in
the qutebrowser behavior (you don't get re-prompted where you would have
been previously) so I feel like it is correct for some tests to be
failing! We have to set AskEveryTime at some point and we can address
them then.
This commit is contained in:
toofar 2024-09-06 19:53:06 +12:00
parent 3331a4cc6a
commit a05cbe4f30
3 changed files with 16 additions and 16 deletions

View File

@ -41,7 +41,7 @@ markers =
qt6_only: Tests which should only run with Qt 6
qt5_xfail: Tests which fail with Qt 5
qt6_xfail: Tests which fail with Qt 6
qt68_beta1_skip: Fails on Qt 6.8 beta 1
qt68_beta4_skip: Fails on Qt 6.8 beta 4
qt_log_level_fail = WARNING
qt_log_ignore =
# GitHub Actions

View File

@ -187,8 +187,8 @@ def pytest_collection_modifyitems(config, items):
'Skipped on Windows',
pytest.mark.skipif,
utils.is_windows),
('qt68_beta1_skip', # WORKAROUND: Qt6.8b1 https://bugreports.qt.io/browse/QTBUG-126595
"Fails on Qt 6.8 beta 1",
('qt68_beta4_skip', # WORKAROUND: https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2184542226
"Fails on Qt 6.8 beta 4",
pytest.mark.xfail,
machinery.IS_QT6 and version.qtwebengine_versions(
avoid_init=True

View File

@ -96,7 +96,7 @@ Feature: Prompts
Then the javascript message "Alert done" should be logged
And the javascript message "notification permission granted" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: Async question interrupted by async one
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -112,7 +112,7 @@ Feature: Prompts
Then the javascript message "notification permission granted" should be logged
And "Added quickmark test for *" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: Async question interrupted by blocking one
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -251,7 +251,7 @@ Feature: Prompts
And I run :click-element id button
Then the javascript message "geolocation permission denied" should be logged
@qt68_beta1_skip
@qt68_beta4_skip
Scenario: geolocation with ask -> false
When I set content.geolocation to ask
And I open data/prompt/geolocation.html in a new tab
@ -260,7 +260,7 @@ Feature: Prompts
And I run :prompt-accept no
Then the javascript message "geolocation permission denied" should be logged
@qt68_beta1_skip
@qt68_beta4_skip
Scenario: geolocation with ask -> false and save
When I set content.geolocation to ask
And I open data/prompt/geolocation.html in a new tab
@ -270,7 +270,7 @@ Feature: Prompts
Then the javascript message "geolocation permission denied" should be logged
And the per-domain option content.geolocation should be set to false for http://localhost:(port)
@qt68_beta1_skip
@qt68_beta4_skip
Scenario: geolocation with ask -> abort
When I set content.geolocation to ask
And I open data/prompt/geolocation.html in a new tab
@ -281,7 +281,7 @@ Feature: Prompts
# Notifications
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: Always rejecting notifications
Given I have a fresh instance
When I set content.notifications.enabled to false
@ -289,7 +289,7 @@ Feature: Prompts
And I run :click-element id button
Then the javascript message "notification permission denied" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: Always accepting notifications
Given I have a fresh instance
When I set content.notifications.enabled to true
@ -297,7 +297,7 @@ Feature: Prompts
And I run :click-element id button
Then the javascript message "notification permission granted" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: notifications with ask -> false
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -307,7 +307,7 @@ Feature: Prompts
And I run :prompt-accept no
Then the javascript message "notification permission denied" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: notifications with ask -> false and save
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -318,7 +318,7 @@ Feature: Prompts
Then the javascript message "notification permission denied" should be logged
And the per-domain option content.notifications.enabled should be set to false for http://localhost:(port)
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: notifications with ask -> true
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -328,7 +328,7 @@ Feature: Prompts
And I run :prompt-accept yes
Then the javascript message "notification permission granted" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: notifications with ask -> true and save
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -350,7 +350,7 @@ Feature: Prompts
And I run :mode-leave
Then the javascript message "notification permission aborted" should be logged
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: answering notification after closing tab
Given I have a fresh instance
When I set content.notifications.enabled to ask
@ -524,7 +524,7 @@ Feature: Prompts
# https://github.com/qutebrowser/qutebrowser/issues/1249#issuecomment-175205531
# https://github.com/qutebrowser/qutebrowser/pull/2054#issuecomment-258285544
@qtwebkit_skip @qt68_beta1_skip
@qtwebkit_skip
Scenario: Interrupting SSL prompt during a notification prompt
Given I have a fresh instance
When I set content.notifications.enabled to ask