tor-browser

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

test_bug475636.html (1105B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=475636
      5 Test that refresh to data: URIs don't inherit the principal
      6 -->
      7 <head>
      8  <title>Test for Bug 475636</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10 
     11  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     12 </head>
     13 <body onload="gen.next()">
     14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=475636">Mozilla Bug 475636</a>
     15 
     16 <div id="content" style="display: none">
     17  
     18 </div>
     19 <iframe id=loader></iframe>
     20 <pre id="test">
     21 <script class="testbody" type="application/javascript">
     22 
     23 SimpleTest.waitForExplicitFinish();
     24 
     25 var gen = runTests();
     26 
     27 window.private = 42;
     28 
     29 window.addEventListener("message", function(e) {
     30  gen.next(e.data);
     31 });
     32 
     33 var url = "file_bug475636.sjs?";
     34 
     35 function* runTests() {
     36  var loader = document.getElementById("loader");
     37  for (var testNum = 1; ; ++testNum) {
     38    loader.src = url + testNum;
     39    let res = (yield);
     40    if (res == "done") {
     41      SimpleTest.finish();
     42      return;
     43    }
     44    is(res, "pass");
     45  }
     46 }
     47 
     48 
     49 </script>
     50 </pre>
     51 </body>
     52 </html>