tor-browser

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

test_setTimeoutWith0.html (478B)


      1 <html>
      2 <head>
      3  <title>Test for setTimeout and strings containing 0</title>
      4  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      6 </head>
      7 <body>
      8 <script>
      9 
     10 var x = 0;
     11 // eslint-disable-next-line no-implied-eval
     12 setTimeout("x++; '\x00'; x++;");
     13 setTimeout(function() {
     14  is(x, 2, "We want to see 2 here");
     15  SimpleTest.finish();
     16 });
     17 
     18 SimpleTest.waitForExplicitFinish();
     19 </script>
     20 </body>
     21 </html>