tor-browser

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

eventsource-onopen.htm (846B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>shared worker - EventSource: onopen (announcing the connection)</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7  </head>
      8  <body>
      9    <div id="log"></div>
     10    <script>
     11      var test = async_test()
     12      test.step(function() {
     13        var worker = new SharedWorker('eventsource-onopen.js')
     14        worker.port.onmessage = function(e) {
     15          test.step(function() {
     16            assert_true(e.data[0], e.data[1])
     17            assert_equals(e.data[1], EventSource.OPEN, 'source.readyState')
     18            assert_false(e.data[2], "'data' in e")
     19            assert_false(e.data[3], 'e.bubbles')
     20            assert_false(e.data[4], 'e.calcelable')
     21          })
     22          test.done()
     23        }
     24      })
     25    </script>
     26  </body>
     27 </html>