tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_iframe_sandbox_d_if18.html (909B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Test for Bug 838692</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="application/javascript">
     11  window.addEventListener("message", receiveMessage);
     12 
     13  function receiveMessage(event) {
     14    window.parent.postMessage(event.data, "*");
     15  }
     16 
     17  var testContext = "Test 18: navigate child with window.open(): ";
     18 
     19  function doTest() {
     20    try {
     21      window.open("file_iframe_sandbox_navigation_pass.html?" + escape(testContext), "foo");
     22    } catch(error) {
     23      window.parent.postMessage({ok: false, desc: testContext + " error thrown during window.open(..., \"foo\")"}, "*");
     24    }
     25  }
     26 </script>
     27 
     28 <body onload="doTest()">
     29  I am sandboxed with 'allow-scripts'
     30 
     31  <iframe name="foo" height="10" width="10"></iframe>
     32 </body>
     33 </html>