diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-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 'dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html')
-rw-r--r-- | dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html b/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html new file mode 100644 index 000000000..165d013d2 --- /dev/null +++ b/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html @@ -0,0 +1,102 @@ +<!doctype html> +<meta charset=utf-8> +<title>XMLHttpRequest IDL tests</title> +<div id=log></div> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/resources/WebIDLParser.js></script> +<script src=/resources/idlharness.js></script> +<script type=text/plain class=untested> +interface EventTarget { + void addEventListener(DOMString type, EventListener? callback, optional boolean capture /* = false */); + void removeEventListener(DOMString type, EventListener? callback, optional boolean capture /* = false */); + boolean dispatchEvent(Event event); +}; +</script> +<script type=text/plain> +[NoInterfaceObject] +interface XMLHttpRequestEventTarget : EventTarget { + // event handlers + [TreatNonCallableAsNull] attribute Function? onloadstart; + [TreatNonCallableAsNull] attribute Function? onprogress; + [TreatNonCallableAsNull] attribute Function? onabort; + [TreatNonCallableAsNull] attribute Function? onerror; + [TreatNonCallableAsNull] attribute Function? onload; + [TreatNonCallableAsNull] attribute Function? ontimeout; + [TreatNonCallableAsNull] attribute Function? onloadend; +}; + +interface XMLHttpRequestUpload : XMLHttpRequestEventTarget { + +}; + +/* +enum XMLHttpRequestResponseType { + "", + "arraybuffer", + "blob", + "document", + "json", + "text" +}; +*/ + +[Constructor] +interface XMLHttpRequest : XMLHttpRequestEventTarget { + // event handler + [TreatNonCallableAsNull] attribute Function? onreadystatechange; + + // states + const unsigned short UNSENT = 0; + const unsigned short OPENED = 1; + const unsigned short HEADERS_RECEIVED = 2; + const unsigned short LOADING = 3; + const unsigned short DONE = 4; + readonly attribute unsigned short readyState; + + // request + void open(DOMString method, DOMString url, optional boolean async/* = true*/, optional DOMString? user, optional DOMString? password); + void setRequestHeader(DOMString header, DOMString value); + attribute unsigned long timeout; + attribute boolean withCredentials; + readonly attribute XMLHttpRequestUpload upload; + void send(optional (ArrayBufferView or Blob or Document or DOMString or FormData)? data/* = null*/); + void abort(); + + // response + readonly attribute unsigned short status; + readonly attribute DOMString statusText; + DOMString? getResponseHeader(DOMString header); + DOMString getAllResponseHeaders(); + void overrideMimeType(DOMString mime); +/* attribute XMLHttpRequestResponseType responseType; */ + readonly attribute any response; + readonly attribute DOMString responseText; + readonly attribute Document? responseXML; +}; + +[Constructor, + Constructor(HTMLFormElement form)] +interface FormData { + void append(DOMString name, Blob value, optional DOMString filename); + void append(DOMString name, DOMString value); +}; +</script> +<script> +"use strict"; +var form = document.createElement("form"); +var 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); + } +}); +idlArray.add_objects({ + XMLHttpRequest: ['new XMLHttpRequest()'], + XMLHttpRequestUpload: ['(new XMLHttpRequest()).upload'], + FormData: ['new FormData()', 'new FormData(form)'] +}); +idlArray.test(); +</script> |