diff options
Diffstat (limited to 'testing/web-platform/tests/eventsource/eventsource-eventtarget.htm')
-rw-r--r-- | testing/web-platform/tests/eventsource/eventsource-eventtarget.htm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/eventsource/eventsource-eventtarget.htm b/testing/web-platform/tests/eventsource/eventsource-eventtarget.htm new file mode 100644 index 000000000..6e600fc7b --- /dev/null +++ b/testing/web-platform/tests/eventsource/eventsource-eventtarget.htm @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> + <head> + <title>EventSource: addEventListener()</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.addEventListener("message", listener, false) + }) + function listener(e) { + test.step(function() { + assert_equals("data", e.data) + this.close() + }, this) + test.done() + } + </script> + </body> +</html> + |