file_iframe_sandbox_a_if18.html (822B)
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 function doTest() { 11 try { 12 window.parent.parent.ok_wrapper(false, "an iframe in an iframe SHOULD copy its parent's sandbox flags when its sandbox flags are changed"); 13 } 14 catch (e) { 15 window.parent.parent.postMessage({ok: true, desc: "an iframe in an iframe copies its parent's sandbox flags when its sandbox flags are changed"}, "*"); 16 } 17 } 18 </script> 19 20 <body onload="doTest()"> 21 I'm an iframe whose sandbox flags have been changed to include allow-same-origin. 22 I should not be able to call a function in my parent's parent because my parent's 23 iframe does not have allow-same-origin set. 24 </body> 25 </html>