file_iframe_sandbox_a_if15.html (1143B)
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 doStuff() { 11 try { 12 window.parent.parent.parent.ok_wrapper(false, "an object inside a frame or object inside a sandboxed iframe should NOT be same origin with the iframe's parent"); 13 } 14 catch (e) { 15 window.parent.parent.parent.postMessage({ok: true, desc: "an object inside a frame or object inside a sandboxed iframe is not same origin with the iframe's parent"}, "*"); 16 } 17 18 // Check that sandboxed forms browsing context flag NOT set by attempting to submit a form. 19 document.getElementById('a_form').submit(); 20 } 21 </script> 22 23 <body onload='doStuff()'> 24 I'm a <object> inside a <frame> or <object> inside an iframe which is sandboxed with 'allow-scripts allow-forms' 25 26 <form method="get" action="file_iframe_sandbox_form_pass.html" id="a_form"> 27 First name: <input type="text" name="firstname"> 28 Last name: <input type="text" name="lastname"> 29 <input type="submit" id="a_button"> 30 </form> 31 </body> 32 </html>