content/html/content/test/file_iframe_sandbox_c_if2.html

branch
TOR_BUG_9701
changeset 10
ac0c01689b40
equal deleted inserted replaced
-1:000000000000 0:a458d91d8c30
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for Bug 341604</title>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
7
8 </head>
9 <script type="text/javascript">
10 function ok(result, desc) {
11 window.parent.postMessage({ok: result, desc: desc}, "*");
12 }
13
14 function doStuff() {
15 ok(false, "documents sandboxed without allow-scripts should NOT be able to run inline scripts");
16 }
17 </script>
18 <script src='file_iframe_sandbox_fail.js'></script>
19 <body onLoad='window.parent.postmessage({ok: false, desc: "documents sandboxed without allow-scripts should NOT be able to run script from event handlers"}, "*");doStuff();'>
20 I am sandboxed with no permissions
21 <img src="about:blank" onerror='ok(false, "documents sandboxed without allow-scripts should NOT be able to run script from event handlers");')>
22 </body>
23 </html>

mercurial