tor-browser

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

file_iframe_sandbox_d_if20.html (747B)


      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 </head>
      8 
      9 <script type="application/javascript">
     10  var testContext = "Test 19: navigate _parent with window.open(): ";
     11 
     12  function doTest() {
     13    try {
     14      window.open("file_iframe_sandbox_navigation_fail.html?" + escape(testContext), "_parent");
     15      window.parent.parent.postMessage({type: "attempted"}, "*");
     16    } catch(error) {
     17      window.parent.parent.postMessage({ok: true, desc: testContext + "as expected, error thrown during window.open(..., \"_parent\")"}, "*");
     18    }
     19  }
     20 </script>
     21 
     22 <body onload="doTest()">
     23  I am sandboxed with 'allow-scripts'
     24 </body>
     25 </html>