test_CSP_sandbox.html 867 B

123456789101112131415161718192021222324252627
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=1106713
  5. -->
  6. <head>
  7. <title>Test for Bug 1106713</title>
  8. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  10. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  11. </head>
  12. <body>
  13. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1106713">Mozilla Bug 1106713</a>
  14. <script type="text/javascript">
  15. SimpleTest.waitForExplicitFinish();
  16. function go() {
  17. var ifr = document.getElementById('iframe1').contentWindow;
  18. ok(!ifr.scriptExecuted, "script is not allowed to run");
  19. SimpleTest.finish();
  20. }
  21. </script>
  22. <iframe src='file_CSP_sandbox.html' sandbox="allow-same-origin" onload="go()" id="iframe1"></iframe>
  23. </body>
  24. </html>