https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 2594ec0bcf0af2bc546e78dde66aa382bf039a80 authored by Aryeh Gregor on 18 April 2016, 17:32:41 UTC
Update for whatwg/dom@537e579f
Tip revision: 2594ec0
request-accept.htm
<!DOCTYPE html>
<html>
  <head>
    <title>EventSource: Accept header</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/accept.event_stream?pipe=sub")
        source.onmessage = function(e) {
          test.step(function() {
            assert_equals(e.data, "text/event-stream")
            this.close()
          }, this)
          test.done()
        }
      })
    </script>
  </body>
</html>

back to top