https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 35bf9454005e238dcac8129c9d4394ed592db8fd authored by Ovidio Henriquez on 21 March 2018, 23:50:55 UTC
bluetooth: FakeBluetoothChooserServerClient impl.
Tip revision: 35bf945
eventsource-prototype.htm
<!--
onconnect = function(e) {
try {
  var port = e.ports[0]
  EventSource.prototype.ReturnTrue = function() { return true }
  var source = new EventSource("../resources/message.py")
  port.postMessage([true, source.ReturnTrue(), 'EventSource' in self])
  source.close()
} catch(e) {
  port.postMessage([false, String(e)])
}
}
/*-->
<!DoCtYpE hTMl>
<html>
  <heAd>
    <title>shared 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 SharedWorker('#')
        worker.port.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>
<!--*/ //-->
back to top