tor-browser

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

eval-scripts-setInterval-blocked.sub.html (993B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5    <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.-->
      6    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self';">
      7    <title>eval-scripts-setInterval-blocked</title>
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10    <script src='../support/logTest.sub.js?logs=["PASS","violated-directive=script-src"]'></script>
     11    <script src='../support/alertAssert.sub.js?alerts=[]'></script>
     12 </head>
     13 <script>
     14  window.addEventListener('securitypolicyviolation', function(e) {
     15    log("violated-directive=" + e.violatedDirective);
     16  });
     17 
     18  var id = setInterval("alert_assert('FAIL')", 0);
     19  if (id != 0)
     20    log('FAIL: Return value for string (should be 0): ' + id);
     21 
     22  var id = setInterval(function() {
     23    clearInterval(id);
     24    log('PASS');
     25  }, 0);
     26 
     27  if (id == 0)
     28    log('FAIL');
     29 </script>
     30 
     31 </html>