OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Script execution in sandbox="allow-scripts" iframe</title> |
| 5 <link rel="author" title="Kinuko Yasuda" href="mailto:kinuko@chromium.org"> |
| 6 <link rel="help" href="http://www.w3.org/html/wg/drafts/html/master/browsers
.html#sandboxing"> |
| 7 <script src="/resources/testharness.js"></script> |
| 8 <script src="/resources/testharnessreport.js"></script> |
| 9 </head> |
| 10 |
| 11 <body> |
| 12 <h1>Script execution in sandbox="allow-scripts" iframe</h1> |
| 13 <script type="text/javascript"> |
| 14 var t = async_test("Running script from sandbox='allow-scripts' iframe is
allowed") |
| 15 var called = 0; |
| 16 function calledFromIframe() { |
| 17 called++; |
| 18 } |
| 19 function loaded() { |
| 20 assert_equals(called, 1); |
| 21 t.done(); |
| 22 } |
| 23 </script> |
| 24 |
| 25 <iframe src="/html/browsers/sandboxing/inner-iframe.html" style="visibility:
hidden;display:none" sandbox="allow-scripts allow-same-origin" id="sandboxedfram
e" onload="loaded();"></iframe> |
| 26 |
| 27 <div id="log"></div> |
| 28 </body> |
| 29 </html> |
OLD | NEW |