Bug 1685822 [wpt PR 27117] - [Import Maps] Add tests for rejecting multiple import...
[gecko.git] / dom / security / test / csp / test_subframe_run_js_if_allowed.html
blobfbf5a885cd3ab5c65de535e18ff88cf9348562e9
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=702439
6 This test verifies that child iframes of CSP documents are
7 permitted to execute javascript: URLs assuming the policy
8 allows this.
9 -->
10 <head>
11 <title>Test for Bug 702439</title>
12 <script src="/tests/SimpleTest/SimpleTest.js"></script>
13 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
14 </head>
15 <body>
16 <iframe id="i"></iframe>
17 <script class="testbody" type="text/javascript">
18 var javascript_link_ran = false;
20 // check that the script in the child frame's javascript: URL ran
21 function checkResult()
23 is(javascript_link_ran, true,
24 "javascript URL didn't execute");
26 SimpleTest.finish();
29 SimpleTest.waitForExplicitFinish();
30 document.getElementById('i').src = 'file_subframe_run_js_if_allowed.html';
31 </script>
32 </body>
33 </html>