OLD | NEW |
---|---|
(Empty) | |
1 <?php | |
2 header("Content-Security-Policy: suborigin foobar1"); | |
3 ?> | |
4 <!DOCTYPE html> | |
5 <html> | |
6 <head> | |
7 <title>Notifications are denied in suborigins.</title> | |
8 <script src="/resources/testharness.js"></script> | |
9 <script src="/resources/testharnessreport.js"></script> | |
10 </head> | |
11 <script> | |
12 async_test(function (test) { | |
13 testRunner.grantWebNotificationPermission(location.origin, true); | |
Mike West
2015/04/13 10:03:35
It would be good to discuss this kind of thing wit
| |
14 Notification.requestPermission(function (status) { | |
15 assert_equals(status, 'default'); | |
16 | |
17 var notification = new Notification('My Notification'); | |
18 notification.addEventListener('show', function() { | |
19 assert_unreached('The notification is not expected to be shown.'); | |
20 }); | |
21 | |
22 notification.addEventListener('error', function() { | |
23 test.done(); | |
24 }); | |
25 }); | |
26 }, 'Notification creation fails when requested from a suborigin.'); | |
27 </script> | |
28 </script> | |
29 <iframe id="iframe" src="resources/childsuborigin.php?suborigin=foobar2"></ifram e> | |
30 </html> | |
OLD | NEW |