summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/eventsource/interfaces.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/eventsource/interfaces.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/eventsource/interfaces.html')
-rw-r--r--testing/web-platform/tests/eventsource/interfaces.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/web-platform/tests/eventsource/interfaces.html b/testing/web-platform/tests/eventsource/interfaces.html
new file mode 100644
index 000000000..8c3cc90b6
--- /dev/null
+++ b/testing/web-platform/tests/eventsource/interfaces.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<title>EventSource IDL tests</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/resources/WebIDLParser.js></script>
+<script src=/resources/idlharness.js></script>
+
+<h1>EventSource IDL tests</h1>
+<div id=log></div>
+
+<script type=text/plain>
+[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict)]
+interface EventSource : EventTarget {
+ readonly attribute DOMString url;
+ readonly attribute boolean withCredentials;
+
+ // ready state
+ const unsigned short CONNECTING = 0;
+ const unsigned short OPEN = 1;
+ const unsigned short CLOSED = 2;
+ readonly attribute unsigned short readyState;
+
+ // networking
+ attribute EventHandler onopen;
+ attribute EventHandler onmessage;
+ attribute EventHandler onerror;
+ void close();
+};
+
+dictionary EventSourceInit {
+ boolean withCredentials = false;
+};
+
+[TreatNonCallableAsNull]
+callback EventHandlerNonNull = any (Event event);
+typedef EventHandlerNonNull? EventHandler;
+</script>
+<script>
+"use strict";
+var idlArray;
+setup(function() {
+ idlArray = new IdlArray();
+ [].forEach.call(document.querySelectorAll("script[type=text\\/plain]"), function(node) {
+ if (node.className == "untested") {
+ idlArray.add_untested_idls(node.textContent);
+ } else {
+ idlArray.add_idls(node.textContent);
+ }
+ });
+}, {explicit_done:true});
+window.onload = function() {
+ idlArray.add_objects({
+ EventSource: ['new EventSource("http://foo")'],
+ });
+ idlArray.test();
+ done();
+};
+</script>