tor-browser

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

test_private_field_worker.html (701B)


      1 <!DOCTYPE HTML>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>Test Private Fields</title>
      6    <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7    <script type="application/javascript">
      8      function go() {
      9        SimpleTest.waitForExplicitFinish();
     10 
     11        let worker = new Worker('private_field_worker.js');
     12 
     13        var allocated = 0;
     14        worker.onmessage = function(e) {
     15          is(e.data, allocated, "correctly allocated private field-containing-class");
     16          SimpleTest.finish();
     17        }
     18 
     19        worker.postMessage("allocate"); allocated++;
     20        worker.postMessage("count");
     21        info("Messages posted");
     22      }
     23      go();
     24    </script>
     25  </head>
     26 
     27 </html>