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.setPermission('notifications', 'granted', location.or
igin, location.origin); |
12 testRunner.grantWebNotificationPermission(location.origin, true)
; | |
13 testRunner.dumpAsText(); | 12 testRunner.dumpAsText(); |
14 testRunner.dumpChildFramesAsText(); | 13 testRunner.dumpChildFramesAsText(); |
15 } | 14 } |
16 </script> | 15 </script> |
17 | 16 |
18 <h1>Normal iframe. Should inherit permissions.</h1> | 17 <h1>Normal iframe. Should inherit permissions.</h1> |
19 <iframe src="resources/display-permission.html"></iframe> | 18 <iframe src="resources/display-permission.html"></iframe> |
20 | 19 |
21 <h1>Sandboxed iframe with allow-same-origin. Should inherit permissions.
</h1> | 20 <h1>Sandboxed iframe with allow-same-origin. Should inherit permissions.
</h1> |
22 <iframe src="resources/display-permission.html" sandbox="allow-scripts a
llow-same-origin"></iframe> | 21 <iframe src="resources/display-permission.html" sandbox="allow-scripts a
llow-same-origin"></iframe> |
23 | 22 |
24 <h1>Sandboxed iframe without allow-same-origin. Should not inherit permi
ssions.</h1> | 23 <h1>Sandboxed iframe without allow-same-origin. Should not inherit permi
ssions.</h1> |
25 <iframe src="resources/display-permission.html" sandbox="allow-scripts">
</iframe> | 24 <iframe src="resources/display-permission.html" sandbox="allow-scripts">
</iframe> |
26 </body> | 25 </body> |
27 </html> | 26 </html> |
OLD | NEW |