Modernize and re-enable browser_notification_do_not_disturb.js
Categories
(Toolkit Graveyard :: Notifications and Alerts, task, P1)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
Details
Attachments
(2 files)
This was disabled via bug 1352791 for failing periodically. I'm going to try to get this re-enabled.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Thanks for taking this!
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9c7d3f6a68bf
https://hg.mozilla.org/mozilla-central/rev/a0a1d1b45d0d
Assignee | ||
Comment 6•5 years ago
|
||
For the code archeologists from the future who might want to know why it was necessary to add the if (!xpc::IsInAutomation()) {
condition around the QUERY_USER_NOTIFICATION_STATE qstate;
in nsAlertsService.cpp
: the qstate
was sometimes QUNS_QUIET_TIME
, at least according to my testing. Here's the documentation on QUNS_QUIET_TIME:
Introduced in Windows 7. The current user is in "quiet time", which is the first hour after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for each user after an operating system upgrade or clean installation.
Applications should set the NIIF_RESPECT_QUIET_TIME flag in their notifications or balloon tooltip, which prevents those items from being displayed while the current user is in the quiet-time state.
Note that during quiet time, if the user is in one of the other blocked modes (QUNS_NOT_PRESENT, QUNS_BUSY, QUNS_PRESENTATION_MODE, or QUNS_RUNNING_D3D_FULL_SCREEN) SHQueryUserNotificationState returns only that value, and does not report QUNS_QUIET_TIME.
Comment 7•5 years ago
|
||
That would make sense since I believe we now use a new OS account for each test run and therefore "the first hour after a new user logs into his or her account for the first time" would apply.
Updated•1 year ago
|
Description
•