file_iframe_sandbox_a_if4.html (1205B)
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 <script src="/tests/SimpleTest/EventUtils.js"></script> 8 </head> 9 10 <script type="text/javascript"> 11 function doStuff() { 12 try { 13 window.parent.ok_wrapper(false, "a document contained within a sandboxed document without 'allow-same-origin' should NOT be same domain with its parent"); 14 } catch(e) { 15 window.parent.parent.postMessage({type: "ok", ok: true, desc: "a document contained within a sandboxed document without 'allow-same-origin' should NOT be same domain with its parent"}, "*"); 16 } 17 18 try { 19 window.parent.parent.ok_wrapper(false, "a document contained within a sandboxed document without 'allow-same-origin' should NOT be same domain with the top level"); 20 } catch(e) { 21 window.parent.parent.postMessage({type: "ok", ok: true, desc: "a document contained within a sandboxed document without 'allow-same-origin' should NOT be same domain with the top level"}, "*"); 22 } 23 } 24 </script> 25 26 <body onLoad="doStuff()"> 27 I am not sandboxed but contained within a sandboxed document with 'allow-scripts' 28 </body> 29 </html>