OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p> | 4 <p> |
5 Tests that the <iframe sandbox> attribute influences whether | 5 Tests that the <iframe sandbox> attribute influences whether |
6 notification permissions will be inherit by an iframe. | 6 notification permissions will be inherit by an iframe. |
7 </p> | 7 </p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 if (window.testRunner) { | 10 if (window.testRunner) { |
| 11 testRunner.setPermission('notifications', 'granted', location.or
igin, location.origin); |
11 testRunner.grantWebNotificationPermission(location.origin, true)
; | 12 testRunner.grantWebNotificationPermission(location.origin, true)
; |
12 testRunner.dumpAsText(); | 13 testRunner.dumpAsText(); |
13 testRunner.dumpChildFramesAsText(); | 14 testRunner.dumpChildFramesAsText(); |
14 } | 15 } |
15 </script> | 16 </script> |
16 | 17 |
17 <h1>Normal iframe. Should inherit permissions.</h1> | 18 <h1>Normal iframe. Should inherit permissions.</h1> |
18 <iframe src="resources/display-permission.html"></iframe> | 19 <iframe src="resources/display-permission.html"></iframe> |
19 | 20 |
20 <h1>Sandboxed iframe with allow-same-origin. Should inherit permissions.
</h1> | 21 <h1>Sandboxed iframe with allow-same-origin. Should inherit permissions.
</h1> |
21 <iframe src="resources/display-permission.html" sandbox="allow-scripts a
llow-same-origin"></iframe> | 22 <iframe src="resources/display-permission.html" sandbox="allow-scripts a
llow-same-origin"></iframe> |
22 | 23 |
23 <h1>Sandboxed iframe without allow-same-origin. Should not inherit permi
ssions.</h1> | 24 <h1>Sandboxed iframe without allow-same-origin. Should not inherit permi
ssions.</h1> |
24 <iframe src="resources/display-permission.html" sandbox="allow-scripts">
</iframe> | 25 <iframe src="resources/display-permission.html" sandbox="allow-scripts">
</iframe> |
25 </body> | 26 </body> |
26 </html> | 27 </html> |
OLD | NEW |