tor-browser

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

file_blob_top_nav_block_modals.html (546B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5 </head>
      6 <body>
      7 <script>
      8  // If the alert box is blocked correctly by the CSP then postMessage will
      9  // send the message and test passes.
     10  var text = "<script>alert(document.domain);window.opener.postMessage("+
     11             "{\"test\": \"block_top_nav_alert_test\", \"msg\": "+
     12             "\"blob top nav alert blocked by CSP\"}, \"*\")<\/script>";
     13  var blob = new Blob([text], {type : 'text/html'});
     14  var url = URL.createObjectURL(blob);
     15  location.href=url;
     16 </script>
     17 </body>
     18 </html>