https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 46b791760d23f9e54134f54366539c77b2b5589b authored by Simon Pieters on 31 March 2016, 13:03:06 UTC
Test initial LF in pre/textarea/listing with innerHTML
Tip revision: 46b7917
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