https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 2289fd06b31cf5175c304e2d76ad792bd5e7d607 authored by Mike West on 15 September 2016, 08:21:03 UTC
Add IDL tests for SecurityPolicyViolationEvent.
Tip revision: 2289fd0
eventsource-onmessage.htm
<!DOCTYPE html>
<html>
  <head>
    <title>EventSource: onmessage</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 source = new EventSource("resources/message.py")
        source.onmessage = function(e) {
          test.step(function() {
            assert_equals("data", e.data)
            source.close()
          })
          test.done()
        }
      })
    </script>
  </body>
</html>

back to top