Revision 3b85872e40d628f4704727db1c976c54f6d9e1dc authored by Ms2ger on 19 April 2016, 11:58:26 UTC, committed by jgraham on 19 April 2016, 11:58:26 UTC
Use a worker test for eventsource-eventtarget.
1 parent 46edd9e
format-field-event.htm
<!doctype html>
<html>
<head>
<title>EventSource: custom event name</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
var test = async_test(),
dispatchedtest = false
test.step(function() {
var source = new EventSource("resources/message.py?message=event%3Atest%0Adata%3Ax%0A%0Adata%3Ax")
source.addEventListener("test", function() { test.step(function() { dispatchedtest = true }) }, false)
source.onmessage = function() {
test.step(function() {
assert_true(dispatchedtest)
this.close()
}, this)
test.done()
}
})
</script>
</body>
</html>
Computing file changes ...