summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/eventsource/dedicated-worker/eventsource-prototype.htm
blob: 5a5ac4ec2a72173103f934ef1c64b17361e3c56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<html>
  <heAd>
    <title>dedicated worker - EventSource: prototype et al</tiTle>
    <scrIpt src="/resources/testharness.js"></scripT>
    <scriPt src="/resources/testharnessreport.js"></Script>
  </heaD>
  <boDy>
    <diV iD="log"></Div>
    <sCript>
      var test = async_test();
      test.step(function() {
        var worker = new Worker('eventsource-prototype.js')
        worker.onmessage = function(e) {
          test.step(function() {
            assert_true(e.data[0], e.data[1])
            assert_true(e.data[1], 'source.ReturnTrue()')
            assert_true(e.data[2], "'EventSource' in self")
          })
          test.done()
        }
      })
    </scrIpt>
  </bOdy>
</htMl>