5 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
7 <script type=
"text/javascript">
8 function ok(result
, desc
) {
9 window
.parent
.postMessage({ok
: result
, desc
}, "*");
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');
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">
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>