tor-browser

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

test_viewsource_unlinkable.html (630B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 -->
      5 <head>
      6  <title>Test for view-source linkability</title>
      7  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      8  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      9 
     10 <script type="text/javascript">
     11 function runTest() {
     12  SimpleTest.doesThrow(function() {
     13    window.open('view-source:' + location.href, "_blank");
     14  }, "Trying to access view-source URL from unprivileged code should throw.");
     15  SimpleTest.finish();
     16 }
     17 </script>
     18 </head>
     19 <body onload="runTest();">
     20 <p id="display"></p>
     21 <div id="content" style="display: none"></div>
     22 <pre id="test">
     23 </pre>
     24 </body>
     25 </html>