tor-browser

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

file_iframe_sandbox_c_if7.html (743B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Test for Bug 341604</title>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7 </head>
      8 <script type="text/javascript">
      9  function ok(result, desc) {
     10    window.parent.postMessage({ok: result, desc}, "*");
     11  }
     12 
     13  function doStuff() {
     14    try {
     15      var thing = indexedDB.open("sandbox");
     16      ok(false, "documents sandboxed without allow-same-origin should NOT be able to access indexedDB");
     17    }
     18 
     19    catch(e) {
     20      ok(true, "documents sandboxed without allow-same-origin should NOT be able to access indexedDB");
     21    }  
     22  }
     23 </script>
     24 <body onLoad='doStuff();'>
     25  I am sandboxed but with "allow-scripts"
     26 </body>
     27 </html>