file_iframe_sandbox_a_if14.html (947B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for Bug 886262</title> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 </head> 8 9 <script> 10 window.addEventListener("message", receiveMessage); 11 12 function receiveMessage(event) 13 { 14 window.parent.parent.postMessage({ok: event.data.ok, desc: "objects containing " + event.data.desc}, "*"); 15 } 16 17 function doStuff() { 18 try { 19 window.parent.parent.ok_wrapper(false, "an object inside a sandboxed iframe should NOT be same origin with the iframe's parent"); 20 } 21 catch (e) { 22 window.parent.parent.postMessage({ok: true, desc: "an object inside a sandboxed iframe is not same origin with the iframe's parent"}, "*"); 23 } 24 } 25 </script> 26 27 <body onload='doStuff()'> 28 I'm a <object> inside an iframe which is sandboxed with 'allow-scripts allow-forms' 29 30 <object data="file_iframe_sandbox_a_if15.html"></object> 31 </body> 32 33 </html>