| <html> |
| <head> |
| <script src="../js/resources/js-test-pre.js"></script> |
| <script src="../js/resources/js-test-post-function.js"></script> |
| <script> |
| if (window.layoutTestController) |
| window.layoutTestController.dumpAsText(); |
| |
| var disallowedExecuted = 0; |
| var allowedExecuted = 0; |
| |
| window.onload = function() |
| { |
| shouldBe("disallowedExecuted", "0"); |
| shouldBe("allowedExecuted", "2"); |
| |
| isSuccessfullyParsed(); |
| } |
| </script> |
| </head> |
| |
| <body> |
| |
| <iframe sandbox="allow-same-origin allow-scripts" |
| src="javascript: ++window.top.allowedExecuted;"> |
| </iframe> |
| <iframe sandbox="allow-same-origin" |
| src="javascript: ++window.top.disallowedExecuted;"> |
| </iframe> |
| |
| <iframe id="frame" src="resources/sandboxed-iframe-script-dynamic.html"> |
| </iframe> |
| |
| <script> |
| description("Verify that sandboxed frames with sandbox="allow-scripts" can execute scripts, " |
| + "but other sandboxed frames cannot. Also verify that removing the " |
| + "sandbox="allow-scripts" attribute at runtime prevents new scripts from launching, " |
| + "but existing ones keep running."); |
| var successfullyParsed = true; |
| </script> |
| </body> |
| </html> |