| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 window.jsTestIsAsync = true; | 6 window.jsTestIsAsync = true; |
| 7 | 7 |
| 8 var allowedExecuted = 0; | 8 var allowedExecuted = 0; |
| 9 var disallowedExecuted = 0; | 9 var disallowedExecuted = 0; |
| 10 window.addEventListener('message', function () { | 10 window.addEventListener('message', function () { |
| 11 allowedExecuted++; | 11 allowedExecuted++; |
| 12 | 12 |
| 13 finish(); | 13 finish(); |
| 14 }); | 14 }); |
| 15 | 15 |
| 16 function finish() { | 16 function finish() { |
| 17 shouldBe("disallowedExecuted", "0"); | 17 shouldBe("disallowedExecuted", "0"); |
| 18 shouldBe("allowedExecuted", "1"); | 18 shouldBe("allowedExecuted", "1"); |
| 19 | 19 |
| 20 finishJSTest(); | 20 finishJSTest(); |
| 21 }; | 21 }; |
| 22 </script> | 22 </script> |
| 23 </head> | 23 </head> |
| 24 <body> | 24 <body> |
| 25 <iframe sandbox="allow-same-origin allow-scripts" | 25 <iframe sandbox="allow-same-origin allow-scripts" |
| 26 src="data:text/html,<script>alert('PASS: Executed script in data URL
');window.parent.postMessage({'pass': true}, '*');</script>"> | 26 src="data:text/html,<script>console.log('PASS: Executed script in da
ta URL');window.parent.postMessage({'pass': true}, '*');</script>"> |
| 27 </iframe> | 27 </iframe> |
| 28 <script> | 28 <script> |
| 29 description("Verify that sandboxed frames with sandbox='allow-scripts' c
an execute script from data: URLs."); | 29 description("Verify that sandboxed frames with sandbox='allow-scripts' c
an execute script from data: URLs."); |
| 30 </script> | 30 </script> |
| 31 </body> | 31 </body> |
| 32 </html> | 32 </html> |
| 33 | 33 |
| 34 | 34 |
| OLD | NEW |