Bug 1685822 [wpt PR 27117] - [Import Maps] Add tests for rejecting multiple import...
[gecko.git] / dom / security / test / csp / file_bug886164_6.html
blobf6567b470ec243715e8b02f0c18a480cfd710ef1
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="/tests/SimpleTest/EventUtils.js"></script>
6 </head>
7 <script type="text/javascript">
8 function ok(result, desc) {
9 window.parent.postMessage({ok: result, desc}, "*");
12 function doStuff() {
13 ok(true, "documents sandboxed with allow-scripts should be able to run inline scripts");
15 document.getElementById('a_form').submit();
17 // trigger the javascript: url test
18 sendMouseEvent({type:'click'}, 'a_link');
20 </script>
21 <script src='file_iframe_sandbox_pass.js'></script>
22 <body onLoad='ok(true, "documents sandboxed with allow-scripts should be able to run script from event listeners");doStuff();'>
23 I am sandboxed but with "allow-scripts"
24 <img src="http://example.org/tests/dom/security/test/csp/file_CSP.sjs?testid=img6_bad&type=img/png"> </img>
25 <script src='http://example.org/tests/dom/security/test/csp/file_CSP.sjs?testid=script6_bad&type=text/javascript'></script>
27 <form method="get" action="file_iframe_sandbox_form_fail.html" id="a_form">
28 First name: <input type="text" name="firstname">
29 Last name: <input type="text" name="lastname">
30 <input type="submit" onclick="doSubmit()" id="a_button">
31 </form>
33 <a href = 'javascript:ok(true, "documents sandboxed with allow-scripts should be able to run script from javascript: URLs");' id='a_link'>click me</a>
34 </body>
35 </html>