Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /fenced-frame/permission-notification.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Test permission of notification</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/utils.js"></script>
<script src="/common/utils.js"></script>
<body>
<script>
promise_test(async t => {
const permission_notification_key = token();
await test_driver.set_permission({name: 'notifications'}, 'granted', true);
attachFencedFrame(generateURL(
'resources/permission-notification-inner.html',
[permission_notification_key]));
const actual_result = await nextValueFromServer(permission_notification_key);
assert_equals(
actual_result, 'result: denied',
'notification permission should not be granted in the fenced frame.');
}, 'notification permission should not be granted');
</script>
</body>