mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Update web-platform-tests to revision 3a7b40eb73bf5359adf0d378b71d36488885057f
This commit is contained in:
parent
536c60afe1
commit
f05c813634
112 changed files with 2252 additions and 926 deletions
|
@ -6,19 +6,19 @@ promise_test(async t => {
|
|||
await test_driver.set_permission(
|
||||
{ name: 'notifications' }, 'denied', false);
|
||||
|
||||
let status = new IdleDetector();
|
||||
await promise_rejects_dom(t, 'NotAllowedError', status.start());
|
||||
let detector = new IdleDetector();
|
||||
await promise_rejects_dom(t, 'NotAllowedError', detector.start());
|
||||
}, "Deny notifications permission should work.");
|
||||
|
||||
promise_test(async t => {
|
||||
await test_driver.set_permission(
|
||||
{ name: 'notifications' }, 'granted', false);
|
||||
|
||||
let status = new IdleDetector();
|
||||
await status.start();
|
||||
let detector = new IdleDetector();
|
||||
await detector.start();
|
||||
|
||||
assert_true(['active', 'idle'].includes(status.state.user),
|
||||
'status has a valid user state');
|
||||
assert_true(['locked', 'unlocked'].includes(status.state.screen),
|
||||
'status has a valid screen state');
|
||||
assert_true(['active', 'idle'].includes(detector.userState),
|
||||
'has a valid user state');
|
||||
assert_true(['locked', 'unlocked'].includes(detector.screenState),
|
||||
'has a valid screen state');
|
||||
}, "Grant notifications permission should work.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue