Remove dom.webnotifications.requireuserinteraction pref
Categories
(Core :: DOM: Notifications, task)
Tracking
()
People
(Reporter: gregp, Unassigned)
References
(Blocks 1 open bug)
Details
The user activation requirement for prompting users to enable notifications has been enabled for about 4 years now (bug 1593644). Let's remove this feature rollout pref
Reporter | ||
Comment 1•1 year ago
|
||
Fixing this bug will require updating some GeckoView tests and mochitests to not rely on this pref. Not sure if there's some helper method that simulates user activation which could be used instead.
Comment 2•1 year ago
|
||
We can port mochitests to WPT instead, which mochitest fails there?
Reporter | ||
Comment 3•1 year ago
•
|
||
Hmm, seems I got confused earlier. There's only one plain mochitest that touches this pref and its setting it to true
, so it shouldn't be an issue.
https://searchfox.org/mozilla-central/search?q=dom[-_.]webnotifications[-_.]requireuserinteraction&path=.html®exp=true
There's a few browser tests that will fail, like this one.
https://searchfox.org/mozilla-central/rev/ea550f0d1afaf7747ebd988325ea10cf4e3e4de4/browser/base/content/test/fullscreen/browser_fullscreen_permissions_prompt.js#38
It looks like this test is just making sure that the browser exits fullscreen when a doorhanger appears. we could update the test to request geolocation access, which should cause a doorhanger to appear, fulfilling the requirements of the test.
There's also some GV tests that fail with the pref removed
https://searchfox.org/mozilla-central/rev/ea550f0d1afaf7747ebd988325ea10cf4e3e4de4/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/PermissionDelegateTest.kt#663
Comment 4•1 year ago
|
||
we could update the test to request geolocation access
Does it not require user interaction? That's interesting, does the spec not require it?
Updated•1 year ago
|
Reporter | ||
Comment 5•1 year ago
|
||
(In reply to Kagami [:saschanaz] from comment #4)
Does it not require user interaction? That's interesting, does the spec not require it?
Yeah requesting geolocation access does require user interaction, I'm not sure why i suggested that, It wont work.
Reporter | ||
Comment 6•1 year ago
|
||
Ok I just found this ChromeOnly notifyUserGestureActivation method, perhaps we could use it.
https://searchfox.org/mozilla-central/rev/ea550f0d1afaf7747ebd988325ea10cf4e3e4de4/dom/webidl/Document.webidl#563
Comment 7•1 year ago
|
||
BTW, note that this is still nonstandard. I don't think we'll want to unship this, but perhaps worth keeping the flag? https://github.com/whatwg/notifications/issues/108
Reporter | ||
Comment 8•1 year ago
|
||
Sounds good, I'll hold off on doing this then.
Updated•7 months ago
|
Description
•