Import W3C XMLHttpRequest tests
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Oct 2015 07:39:22 +0000 (07:39 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Oct 2015 07:39:22 +0000 (07:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142163

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/ImportExpectations: skipping import of some XHR tests that are failing or timing out.
* web-platform-tests/XMLHttpRequest/FormData-append-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/FormData-append.html: Added.
* web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.html: Added.
* web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.js: Added.
(test_withCredentials.):
(test_withCredentials):
* web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.js: Added.
* web-platform-tests/XMLHttpRequest/abort-after-receive-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-after-receive.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-after-send.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-after-timeout-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-after-timeout.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-during-done-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-during-done.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-during-open-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-during-open.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-during-unsent-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-during-unsent.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-during-upload.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-event-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-event-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-event-listeners-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-event-listeners.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-event-order.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-upload-event-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-upload-event-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/abort-upload-event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-upload-event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm: Added.
* web-platform-tests/XMLHttpRequest/data-uri-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/data-uri.htm: Added.
* web-platform-tests/XMLHttpRequest/event-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/event-error-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-error.html: Added.
* web-platform-tests/XMLHttpRequest/event-load-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-load.htm: Added.
* web-platform-tests/XMLHttpRequest/event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/event-loadstart-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-loadstart.htm: Added.
* web-platform-tests/XMLHttpRequest/event-progress-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-progress.htm: Added.
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm: Added.
* web-platform-tests/XMLHttpRequest/event-timeout-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-timeout.htm: Added.
* web-platform-tests/XMLHttpRequest/event-upload-progress-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-upload-progress.htm: Added.
* web-platform-tests/XMLHttpRequest/folder.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-blob-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-blob.htm: Added.
* web-platform-tests/XMLHttpRequest/formdata-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata.htm: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies.htm: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-status-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-status.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-error-state.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-server-date-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-server-date.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-special-characters-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-special-characters.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state.htm: Added.
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/interfaces.html: Added.
* web-platform-tests/XMLHttpRequest/open-after-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-after-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/open-method-bogus-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-method-bogus.htm: Added.
* web-platform-tests/XMLHttpRequest/open-method-case-insensitive-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-method-case-insensitive.htm: Added.
* web-platform-tests/XMLHttpRequest/open-method-case-sensitive-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-method-case-sensitive.htm: Added.
* web-platform-tests/XMLHttpRequest/open-method-insecure-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-method-insecure.htm: Added.
* web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm: Added.
* web-platform-tests/XMLHttpRequest/open-open-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-open-send.htm: Added.
* web-platform-tests/XMLHttpRequest/open-open-sync-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-open-sync-send.htm: Added.
* web-platform-tests/XMLHttpRequest/open-referer-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-referer.htm: Added.
* web-platform-tests/XMLHttpRequest/open-send-open-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-send-open.htm: Added.
* web-platform-tests/XMLHttpRequest/open-sync-open-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-sync-open-send.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-about-blank-window-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-about-blank-window.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-base-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-base-inserted-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-base-inserted.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-base.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-bogus.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-encoding.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-fragment-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-fragment.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-javascript-window-2-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-javascript-window-2.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-javascript-window-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-javascript-window.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-5-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-5.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-worker-simple-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-worker-simple.htm: Added.
* web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-done-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-done-state.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-loading-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-loading-state.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm: Added.
* web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip.htm: Added.
* web-platform-tests/XMLHttpRequest/readme.txt: Added.
* web-platform-tests/XMLHttpRequest/resources/accept-language.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/accept.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth1/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth1/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/auth2/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth2/corsenabled.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth2/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/auth3/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth3/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/auth4/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth4/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/auth5/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth5/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/auth6/auth.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/auth6/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/authentication.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/chunked.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/conditional.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/content.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/corsenabled.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/delay.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/echo-method.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/folder.txt: Added.
* web-platform-tests/XMLHttpRequest/resources/form.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/gzip.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/headers.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/image.gif: Added.
* web-platform-tests/XMLHttpRequest/resources/img.jpg: Added.
* web-platform-tests/XMLHttpRequest/resources/infinite-redirects.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/init.htm: Added.
* web-platform-tests/XMLHttpRequest/resources/inspect-headers.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/invalid-utf8-html.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/nocors/folder.txt: Added.
* web-platform-tests/XMLHttpRequest/resources/nocors/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/XMLHttpRequest/resources/redirect.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/requri.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/shift-jis-html.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/status.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/trickle.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/upload.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/utf16.txt: Added.
* web-platform-tests/XMLHttpRequest/resources/w3c-import.log: Added.
* web-platform-tests/XMLHttpRequest/resources/well-formed.xml: Added.
* web-platform-tests/XMLHttpRequest/resources/win-1252-xml.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js: Added.
(xhr.new.XMLHttpRequest.xhr.onreadystatechange):
(true.xhr.send.xhr2.new.XMLHttpRequest.xhr2.onreadystatechange):
(true.xhr2.send.xhr3.new.XMLHttpRequest.xhr3.onreadystatechange):
* web-platform-tests/XMLHttpRequest/resources/workerxhr-simple.js: Added.
(xhr.new.XMLHttpRequest.xhr.onreadystatechange):
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-aborted.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-abortedonmain.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overrides.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overridesexpires.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-runner.js: Added.
(testResultCallbackHandler):
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-simple.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconmain.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconworker.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-twice.js: Added.
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout.js: Added.
(catch):
(message):
(is):
(ok):
(RequestTracker):
(RequestTracker.prototype.handleEvent):
(RequestTracker.prototype.startXHR):
(RequestTracker.prototype.getMessage):
(AbortedRequest):
(AbortedRequest.prototype.handleEvent):
(AbortedRequest.prototype.abortReq):
(AbortedRequest.prototype.startXHR):
(AbortedRequest.prototype.noEventsFired):
(AbortedRequest.prototype.getMessage):
(SyncRequestSettingTimeoutAfterOpen.startXHR):
(SyncRequestSettingTimeoutBeforeOpen.startXHR):
(TestCounter.testComplete):
(TestCounter.next):
(runTestRequests):
* web-platform-tests/XMLHttpRequest/resources/zlib.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/response-data-arraybuffer-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-data-arraybuffer.htm: Added.
* web-platform-tests/XMLHttpRequest/response-data-blob-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-data-blob.htm: Added.
* web-platform-tests/XMLHttpRequest/response-data-deflate-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-data-deflate.htm: Added.
* web-platform-tests/XMLHttpRequest/response-data-gzip-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-data-gzip.htm: Added.
* web-platform-tests/XMLHttpRequest/response-data-progress-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-data-progress.htm: Added.
* web-platform-tests/XMLHttpRequest/response-invalid-responsetype-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-invalid-responsetype.htm: Added.
* web-platform-tests/XMLHttpRequest/response-json-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-json.htm: Added.
* web-platform-tests/XMLHttpRequest/response-method-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/response-method.htm: Added.
* web-platform-tests/XMLHttpRequest/responseText-status-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responseText-status.html: Added.
* web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsetext-decoding.htm: Added.
* web-platform-tests/XMLHttpRequest/responsetype-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsetype.html: Added.
* web-platform-tests/XMLHttpRequest/responsexml-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm: Added.
* web-platform-tests/XMLHttpRequest/responsexml-media-type-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-media-type.htm: Added.
* web-platform-tests/XMLHttpRequest/responsexml-non-document-types-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-non-document-types.htm: Added.
* web-platform-tests/XMLHttpRequest/responsexml-non-well-formed-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsexml-non-well-formed.htm: Added.
* web-platform-tests/XMLHttpRequest/security-consideration.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/security-consideration.sub.html: Added.
* web-platform-tests/XMLHttpRequest/send-accept-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-accept-language-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-accept-language.htm: Added.
* web-platform-tests/XMLHttpRequest/send-accept.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm: Added.
* web-platform-tests/XMLHttpRequest/send-conditional-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-conditional.htm: Added.
* web-platform-tests/XMLHttpRequest/send-content-type-charset-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-content-type-charset.htm: Added.
* web-platform-tests/XMLHttpRequest/send-content-type-string-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-content-type-string.htm: Added.
* web-platform-tests/XMLHttpRequest/send-data-arraybuffer-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-data-arraybuffer.htm: Added.
* web-platform-tests/XMLHttpRequest/send-data-blob-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-data-blob.htm: Added.
* web-platform-tests/XMLHttpRequest/send-data-es-object-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-data-es-object.htm: Added.
* web-platform-tests/XMLHttpRequest/send-data-formdata-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-data-formdata.htm: Added.
* web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-document.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-empty-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-empty.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-get-head.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-none-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-none.htm: Added.
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub.htm: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart.htm: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-no-response-event-order.htm: Added.
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub.htm: Added.
* web-platform-tests/XMLHttpRequest/send-receive-utf16-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-receive-utf16.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-bogus-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-bogus.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-infinite-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-infinite.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-no-location-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-to-cors-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors.htm: Added.
* web-platform-tests/XMLHttpRequest/send-redirect.htm: Added.
* web-platform-tests/XMLHttpRequest/send-response-event-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-response-event-order.htm: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart.htm: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-progress-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-response-upload-event-progress.htm: Added.
* web-platform-tests/XMLHttpRequest/send-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-send.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-blocks-async-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-blocks-async.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-response-event-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-response-event-order.htm: Added.
* web-platform-tests/XMLHttpRequest/send-sync-timeout-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-sync-timeout.htm: Added.
* web-platform-tests/XMLHttpRequest/send-timeout-events-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-timeout-events.htm: Added.
* web-platform-tests/XMLHttpRequest/send-usp-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-usp.html: Added.
* web-platform-tests/XMLHttpRequest/send-usp.js: Added.
(encode):
(do_test.):
* web-platform-tests/XMLHttpRequest/send-usp.worker.js: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-after-send-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-after-send.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-before-open-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-before-open.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader.htm: Added.
* web-platform-tests/XMLHttpRequest/status-async-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/status-async.htm: Added.
* web-platform-tests/XMLHttpRequest/status-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/status-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/status-error-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/status-error.htm: Added.
* web-platform-tests/XMLHttpRequest/timeout-cors-async-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/timeout-cors-async.htm: Added.
* web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/timeout-sync.htm: Added.
* web-platform-tests/XMLHttpRequest/w3c-import.log: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget.htm: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync.htm: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error.htm: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent.htm: Added.
* web-platform-tests/w3c-import.log:

LayoutTests:

* TestExpectations: Marking xhr timeout tests as slow.
* platform/gtk/TestExpectations: Marking some XHR tests as failing.timing out.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

410 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/ImportExpectations
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/folder.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/readme.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/accept-language.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/accept.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth1/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth1/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth2/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth2/corsenabled.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth2/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth3/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth3/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth4/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth4/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth5/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth5/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth6/auth.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/auth6/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/authentication.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/chunked.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/conditional.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/content.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/corsenabled.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/delay.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/echo-method.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/folder.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/form.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/gzip.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/headers.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/image.gif [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/img.jpg [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/infinite-redirects.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/init.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/inspect-headers.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/invalid-utf8-html.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/nocors/folder.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/nocors/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/redirect.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/requri.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/shift-jis-html.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/status.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/trickle.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/upload.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/utf16.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/well-formed.xml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/win-1252-xml.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/workerxhr-simple.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-aborted.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-abortedonmain.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overrides.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overridesexpires.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-runner.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-simple.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconmain.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconworker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-twice.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/resources/zlib.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-arraybuffer-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-arraybuffer.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-blob-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-blob.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-deflate-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-deflate.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-gzip-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-gzip.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-progress-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-data-progress.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-invalid-responsetype-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-invalid-responsetype.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-json-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-json.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-method-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/response-method.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responseText-status-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responseText-status.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsetext-decoding.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsetype-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsetype.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-basic-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-basic.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-media-type-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-media-type.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-non-document-types-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-non-document-types.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-non-well-formed-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsexml-non-well-formed.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/security-consideration.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/security-consideration.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-accept-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-accept-language-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-accept-language.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-accept.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-conditional-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-conditional.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-content-type-charset-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-content-type-charset.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-content-type-string-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-content-type-string.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-arraybuffer-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-arraybuffer.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-blob-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-blob.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-es-object-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-es-object.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-formdata-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-formdata.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-document.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-empty-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-empty.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-get-head-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-get-head.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-none-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-entity-body-none.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-no-response-event-order.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-non-same-origin.sub.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-receive-utf16-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-receive-utf16.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-infinite-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-infinite.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-no-location-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-cors-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-event-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-event-order.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-progress-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-response-upload-event-progress.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-blocks-async-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-blocks-async.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-response-event-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-response-event-order.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-timeout-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-sync-timeout.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-timeout-events-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-timeout-events.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-after-send-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-after-send.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-before-open-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-before-open.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-async-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-async.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-basic-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-basic.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/status-error.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/timeout-cors-async-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/timeout-cors-async.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/timeout-sync.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-basic-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-basic.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent.htm [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/w3c-import.log
LayoutTests/platform/gtk/TestExpectations

index 195f49e552c107431d0cf29ee9802d98f236751a..f9f5f2e8aa8fff5a48de09d71c22014a5df38090 100644 (file)
@@ -1,3 +1,13 @@
+2015-10-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        Import W3C XMLHttpRequest tests
+        https://bugs.webkit.org/show_bug.cgi?id=142163
+
+        Reviewed by Darin Adler.
+
+        * TestExpectations: Marking xhr timeout tests as slow.
+        * platform/gtk/TestExpectations: Marking some XHR tests as failing.timing out.
+
 2015-10-24  Alexey Proskuryakov  <ap@apple.com>
 
         Add a test expectation for imported/blink/transitions/unprefixed-perspective.html
index fc201bb63b7aea440866acaa8fe4dd855f1c213d..aa2522ebb99709ea6d68311a2e05a2eb0590bccb 100644 (file)
@@ -277,6 +277,21 @@ webkit.org/b/148546 [ Debug ] imported/w3c/web-platform-tests/dom/ranges/Range-s
 webkit.org/b/148736 [ Debug ] imported/w3c/web-platform-tests/html/dom/interfaces.html [ Skip ]
 webkit.org/b/148822 [ Debug ] imported/w3c/web-platform-tests/html/semantics/interfaces.html [ Skip ]
 
+# W3C XMLHttpRequest tests
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html [ Slow ]
+imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html [ Slow ]
+
 # New W3C ref tests that are failing.
 webkit.org/b/148847 imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html [ ImageOnlyFailure ]
 webkit.org/b/148853 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01.html [ ImageOnlyFailure ]
index e717c62555abb3dd31c78c7f29f28ca5272a86ee..d26e4dce9c60296ad632a2aaba09fcb94cae8d30 100644 (file)
@@ -1,3 +1,475 @@
+2015-10-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        Import W3C XMLHttpRequest tests
+        https://bugs.webkit.org/show_bug.cgi?id=142163
+
+        Reviewed by Darin Adler.
+
+        * resources/ImportExpectations: skipping import of some XHR tests that are failing or timing out.
+        * web-platform-tests/XMLHttpRequest/FormData-append-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/FormData-append.html: Added.
+        * web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.html: Added.
+        * web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.js: Added.
+        (test_withCredentials.):
+        (test_withCredentials):
+        * web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.js: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-receive-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-receive.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-timeout-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-after-timeout.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-done-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-done.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-open-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-open.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-unsent-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-unsent.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-during-upload.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-abort-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-abort.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-listeners-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-listeners.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-event-order.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-upload-event-abort-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-upload-event-abort.htm: Added.
+        * web-platform-tests/XMLHttpRequest/abort-upload-event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/abort-upload-event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm: Added.
+        * web-platform-tests/XMLHttpRequest/data-uri-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/data-uri.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-abort-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-abort.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-error-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-error.html: Added.
+        * web-platform-tests/XMLHttpRequest/event-load-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-load.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-loadstart-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-loadstart.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-progress-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-progress.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-timeout-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-timeout.htm: Added.
+        * web-platform-tests/XMLHttpRequest/event-upload-progress-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/event-upload-progress.htm: Added.
+        * web-platform-tests/XMLHttpRequest/folder.txt: Added.
+        * web-platform-tests/XMLHttpRequest/formdata-blob-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/formdata-blob.htm: Added.
+        * web-platform-tests/XMLHttpRequest/formdata-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/formdata.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getallresponseheaders-status-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getallresponseheaders-status.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-error-state.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-server-date-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-server-date.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-special-characters-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-special-characters.htm: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state.htm: Added.
+        * web-platform-tests/XMLHttpRequest/interfaces-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/interfaces.html: Added.
+        * web-platform-tests/XMLHttpRequest/open-after-abort-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-after-abort.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-during-abort-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-during-abort.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-bogus-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-bogus.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-case-insensitive-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-case-insensitive.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-case-sensitive-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-case-sensitive.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-insecure-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-insecure.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-open-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-open-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-open-sync-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-open-sync-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-referer-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-referer.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-send-open-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-send-open.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-sync-open-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-sync-open-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-about-blank-window-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-about-blank-window.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base-inserted-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base-inserted.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-base.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-bogus.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-encoding.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-fragment-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-fragment.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-javascript-window-2-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-javascript-window-2.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-javascript-window-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-javascript-window.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-5-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-5.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-multi-window.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-worker-simple-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-url-worker-simple.htm: Added.
+        * web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-done-state-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-done-state.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-loading-state-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-loading-state.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-xml.htm: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm: Added.
+        * web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip.htm: Added.
+        * web-platform-tests/XMLHttpRequest/readme.txt: Added.
+        * web-platform-tests/XMLHttpRequest/resources/accept-language.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/accept.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth1/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth1/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/auth2/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth2/corsenabled.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth2/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/auth3/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth3/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/auth4/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth4/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/auth5/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth5/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/auth6/auth.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/auth6/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/authentication.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/chunked.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/conditional.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/content.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/corsenabled.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/delay.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/echo-method.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/folder.txt: Added.
+        * web-platform-tests/XMLHttpRequest/resources/form.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/gzip.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/headers.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/image.gif: Added.
+        * web-platform-tests/XMLHttpRequest/resources/img.jpg: Added.
+        * web-platform-tests/XMLHttpRequest/resources/infinite-redirects.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/init.htm: Added.
+        * web-platform-tests/XMLHttpRequest/resources/inspect-headers.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/invalid-utf8-html.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/nocors/folder.txt: Added.
+        * web-platform-tests/XMLHttpRequest/resources/nocors/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
+        * web-platform-tests/XMLHttpRequest/resources/redirect.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/requri.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/shift-jis-html.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/status.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/trickle.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/upload.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/utf16.txt: Added.
+        * web-platform-tests/XMLHttpRequest/resources/w3c-import.log: Added.
+        * web-platform-tests/XMLHttpRequest/resources/well-formed.xml: Added.
+        * web-platform-tests/XMLHttpRequest/resources/win-1252-xml.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js: Added.
+        (xhr.new.XMLHttpRequest.xhr.onreadystatechange):
+        (true.xhr.send.xhr2.new.XMLHttpRequest.xhr2.onreadystatechange):
+        (true.xhr2.send.xhr3.new.XMLHttpRequest.xhr3.onreadystatechange):
+        * web-platform-tests/XMLHttpRequest/resources/workerxhr-simple.js: Added.
+        (xhr.new.XMLHttpRequest.xhr.onreadystatechange):
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-aborted.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-abortedonmain.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overrides.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-overridesexpires.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-runner.js: Added.
+        (testResultCallbackHandler):
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-simple.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconmain.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-synconworker.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout-twice.js: Added.
+        * web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-timeout.js: Added.
+        (catch):
+        (message):
+        (is):
+        (ok):
+        (RequestTracker):
+        (RequestTracker.prototype.handleEvent):
+        (RequestTracker.prototype.startXHR):
+        (RequestTracker.prototype.getMessage):
+        (AbortedRequest):
+        (AbortedRequest.prototype.handleEvent):
+        (AbortedRequest.prototype.abortReq):
+        (AbortedRequest.prototype.startXHR):
+        (AbortedRequest.prototype.noEventsFired):
+        (AbortedRequest.prototype.getMessage):
+        (SyncRequestSettingTimeoutAfterOpen.startXHR):
+        (SyncRequestSettingTimeoutBeforeOpen.startXHR):
+        (TestCounter.testComplete):
+        (TestCounter.next):
+        (runTestRequests):
+        * web-platform-tests/XMLHttpRequest/resources/zlib.py: Added.
+        (main):
+        * web-platform-tests/XMLHttpRequest/response-data-arraybuffer-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-arraybuffer.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-blob-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-blob.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-deflate-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-deflate.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-gzip-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-gzip.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-progress-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-data-progress.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-invalid-responsetype-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-invalid-responsetype.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-json-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-json.htm: Added.
+        * web-platform-tests/XMLHttpRequest/response-method-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/response-method.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responseText-status-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responseText-status.html: Added.
+        * web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsetext-decoding.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responsetype-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsetype.html: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-basic-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-basic.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-media-type-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-media-type.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-non-document-types-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-non-document-types.htm: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-non-well-formed-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/responsexml-non-well-formed.htm: Added.
+        * web-platform-tests/XMLHttpRequest/security-consideration.sub-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/security-consideration.sub.html: Added.
+        * web-platform-tests/XMLHttpRequest/send-accept-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-accept-language-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-accept-language.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-accept.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-authentication-cors-basic-setrequestheader.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-conditional-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-conditional.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-content-type-charset-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-content-type-charset.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-content-type-string-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-content-type-string.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-arraybuffer-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-arraybuffer.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-blob-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-blob.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-es-object-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-es-object.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-formdata-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-formdata.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-data-unexpected-tostring.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-document-bogus.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-document.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-empty-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-empty.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-get-head-async.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-get-head-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-get-head.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-none-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-entity-body-none.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-loadstart.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-order-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-no-response-event-order.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-non-same-origin.sub.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-receive-utf16-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-receive-utf16.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-bogus-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-bogus.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-infinite-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-infinite.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-no-location-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-no-location.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-to-cors-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-redirect.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-event-order-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-event-order.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-loadstart.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-progress-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-response-upload-event-progress.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-blocks-async-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-blocks-async.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-load.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-loadend.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-no-response-event-order.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-response-event-order-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-response-event-order.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-timeout-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-sync-timeout.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-timeout-events-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-timeout-events.htm: Added.
+        * web-platform-tests/XMLHttpRequest/send-usp-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/send-usp.html: Added.
+        * web-platform-tests/XMLHttpRequest/send-usp.js: Added.
+        (encode):
+        (do_test.):
+        * web-platform-tests/XMLHttpRequest/send-usp.worker.js: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-after-send-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-after-send.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-before-open-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-before-open.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-bogus-name.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-bogus-value.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader.htm: Added.
+        * web-platform-tests/XMLHttpRequest/status-async-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/status-async.htm: Added.
+        * web-platform-tests/XMLHttpRequest/status-basic-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/status-basic.htm: Added.
+        * web-platform-tests/XMLHttpRequest/status-error-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/status-error.htm: Added.
+        * web-platform-tests/XMLHttpRequest/timeout-cors-async-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/timeout-cors-async.htm: Added.
+        * web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/timeout-sync.htm: Added.
+        * web-platform-tests/XMLHttpRequest/w3c-import.log: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-basic-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-basic.htm: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-eventtarget.htm: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync.htm: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error.htm: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-aborted.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overrides.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-simple.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-twice.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-synconworker.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent-expected.txt: Added.
+        * web-platform-tests/XMLHttpRequest/xmlhttprequest-unsent.htm: Added.
+        * web-platform-tests/w3c-import.log:
+
 2015-10-23  Chris Dumez  <cdumez@apple.com>
 
         RadioNodeList should be exposed on Window
index 72ce62fd30dee0a05a33fa18d66d29a91d5e1ad2..c5e312d58cc8cd6be697521c0974018169b3b0de 100644 (file)
@@ -51,7 +51,21 @@ web-platform-tests/FileAPI [ Skip ]
 web-platform-tests/IndexedDB [ Skip ]
 web-platform-tests/WebCryptoAPI [ Skip ]
 web-platform-tests/WebIDL [ Skip ]
-web-platform-tests/XMLHttpRequest [ Skip ]
+#web-platform-tests/XMLHttpRequest [ Pass ]
+web-platform-tests/XMLHttpRequest/abort-after-stop.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin.sub.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/open-url-worker-origin.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-after-setting-document-domain.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic-cors.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-entity-body-basic.htm [ Skip ]
+web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub.htm [ Skip ]
 web-platform-tests/ambient-light [ Skip ]
 web-platform-tests/animation-timing [ Skip ]
 web-platform-tests/app-uri [ Skip ]
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append-expected.txt
new file mode 100644 (file)
index 0000000..e46d73d
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Passing a String object to FormData.append should work. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append.html b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/FormData-append.html
new file mode 100644 (file)
index 0000000..f20009e
--- /dev/null
@@ -0,0 +1,28 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>FormData.append</title>
+<link rel=help href=https://xhr.spec.whatwg.org/#dom-formdata-append>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<script>
+function test_formdata(creator, verifier, description) {
+  async_test(description).step(function() {
+    var fd = creator();
+    var xhr = new XMLHttpRequest();
+    xhr.onload = this.step_func(function() {
+      verifier(xhr.responseText);
+      this.done();
+    });
+    xhr.open("POST", "resources/upload.py");
+    xhr.send(fd);
+  })
+}
+test_formdata(function() {
+  var fd = new FormData();
+  fd.append("name", new String("value"));
+  return fd;
+}, function(data) {
+  assert_equals(data, "name=value,\n");
+}, "Passing a String object to FormData.append should work.");
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials-expected.txt
new file mode 100644 (file)
index 0000000..414ade6
--- /dev/null
@@ -0,0 +1,9 @@
+
+PASS default value is false, set value is true 
+PASS can also be set in OPEN state 
+FAIL setting on synchronous XHR assert_throws: function "function () {
+        client.withCredentials = true
+      }" did not throw
+PASS setting withCredentials when not in UNSENT, OPENED state (asynchronous) 
+FAIL setting withCredentials when in DONE state (synchronous) assert_throws: function "function () { client.withCredentials = true }" did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.html b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.html
new file mode 100644 (file)
index 0000000..cafbbb6
--- /dev/null
@@ -0,0 +1,13 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>XMLHttpRequest#withCredentials</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src=XMLHttpRequest-withCredentials.js></script>
+<link rel="help" href="https://xhr.spec.whatwg.org/#the-withcredentials-attribute"
+      data-tested-assertations="following::ol/li[1] following::ol/li[2]
+                                following::ol/li[3] following::ol/li[4]">
+<div id="log"></div>
+<script>
+test_withCredentials(false)
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.js b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.js
new file mode 100644 (file)
index 0000000..5120d45
--- /dev/null
@@ -0,0 +1,48 @@
+function test_withCredentials(worker) {
+  test(function() {
+    var client = new XMLHttpRequest()
+    assert_false(client.withCredentials, "withCredentials defaults to false")
+    client.withCredentials = true
+    assert_true(client.withCredentials, "is true after setting")
+  }, "default value is false, set value is true")
+
+  test(function() {
+    var client = new XMLHttpRequest()
+    client.open("GET", "resources/delay.py?ms=1000", true)
+    client.withCredentials = true
+    assert_true(client.withCredentials, "set in OPEN state")
+  }, "can also be set in OPEN state")
+
+  test(function() {
+    var client = new XMLHttpRequest()
+    client.open("GET", "resources/delay.py?ms=1000", false)
+    if (worker) {
+      client.withCredentials = true
+      assert_true(client.withCredentials, "set in OPEN state")
+    } else {
+      assert_throws("InvalidAccessError", function() {
+        client.withCredentials = true
+      })
+      assert_false(client.withCredentials, "set in OPEN state")
+    }
+  }, "setting on synchronous XHR")
+
+  async_test(function() {
+    var client = new XMLHttpRequest()
+    client.open("GET", "resources/delay.py?ms=1000")
+    client.send()
+    assert_throws("InvalidStateError", function() { client.withCredentials = true })
+    client.onreadystatechange = this.step_func(function() {
+      assert_throws("InvalidStateError", function() { client.withCredentials = true })
+      if (client.readyState === 4) {
+        this.done()
+      }
+    })
+  }, "setting withCredentials when not in UNSENT, OPENED state (asynchronous)")
+
+  test(function() {
+    var client = new XMLHttpRequest()
+    client.open("GET", "resources/delay.py?ms=1000", false)
+    assert_throws("InvalidStateError", function() { client.withCredentials = true })
+  }, "setting withCredentials when in DONE state (synchronous)")
+}
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.js b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.js
new file mode 100644 (file)
index 0000000..6e89fec
--- /dev/null
@@ -0,0 +1,4 @@
+importScripts("/resources/testharness.js")
+importScripts("XMLHttpRequest-withCredentials.js")
+test_withCredentials(true);
+done()
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive-expected.txt
new file mode 100644 (file)
index 0000000..152c04d
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: abort() after successful receive should not fire "abort" event assert_unreached: abort() should not cause the abort event to fire Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-receive.htm
new file mode 100644 (file)
index 0000000..bd97b68
--- /dev/null
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() after successful receive should not fire "abort" event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]"/>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+
+      test.step(function() {
+        var client = new XMLHttpRequest();
+
+        client.onreadystatechange = test.step_func(function() {
+          if (client.readyState == 4) {
+            // abort should not cause the "abort" event to fire
+
+            client.abort();
+
+            assert_equals(client.readyState, 0);
+
+            setTimeout(function(){ // use a timeout to catch any implementation that might queue an abort event for later - just in case
+              test.step(function(){test.done();});
+            }, 200);
+          }
+        });
+
+        client.onabort = test.step_func(function () {
+            // this should not fire!
+
+            assert_unreached("abort() should not cause the abort event to fire");
+        });
+
+        client.open("GET", "resources/well-formed.xml", true);
+        client.send(null);
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt
new file mode 100644 (file)
index 0000000..db5d8c5
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort() after send() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-send.htm
new file mode 100644 (file)
index 0000000..c4885c9
--- /dev/null
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() after send()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[1] following-sibling::ol/li[3] following-sibling::ol/li[4] following-sibling::ol/li[4]/ol/li[1] following-sibling::ol/li[4]/ol/li[3] following-sibling::ol/li[4]/ol/li[4] following-sibling::ol/li[4]/ol/li[5] following-sibling::ol/li[4]/ol/li[6] following-sibling::ol/li[5]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[3]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsexml-attribute" data-tested-assertations="following::ol/li[3]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders" data-tested-assertations="following::ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="following::ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-status-attribute" data-tested-assertations="following::ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-statustext-attribute" data-tested-assertations="following::ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[1] following::dd[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            control_flag = false,
+            result = [],
+            expected = [1, 4, 'progress', 'abort', 'loadend'] // open() -> 1, abort() -> 4
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+            if(client.readyState == 4) {
+              control_flag = true
+              assert_equals(client.responseXML, null)
+              assert_equals(client.responseText, "")
+              assert_equals(client.status, 0)
+              assert_equals(client.statusText, "")
+              assert_equals(client.getAllResponseHeaders(), "")
+              assert_equals(client.getResponseHeader('Content-Type'), null)
+            }
+          })
+        }
+        client.open("GET", "resources/well-formed.xml", true)
+        client.send(null)
+        client.addEventListener('progress', logEvt)
+        client.addEventListener('abort', logEvt)
+        client.addEventListener('loadend', logEvt)
+        client.abort()
+        assert_true(control_flag)
+        assert_equals(client.readyState, 0)
+        assert_array_equals(result, expected)
+        test.done()
+        function logEvt (e) {
+          result.push(e.type)
+        }
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout-expected.txt
new file mode 100644 (file)
index 0000000..0a4b080
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: abort() after a timeout should not fire "abort" event assert_unreached: abort() should not cause the abort event to fire Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-after-timeout.htm
new file mode 100644 (file)
index 0000000..e8e84b1
--- /dev/null
@@ -0,0 +1,58 @@
+<!doctype html>
+<html>
+<head>
+    <title>XMLHttpRequest: abort() after a timeout should not fire "abort" event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]"/>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following::ol[1]/li[2]"/>
+</head>
+<body>
+<div id="log"></div>
+<script>
+    var test = async_test();
+
+    test.step(function() {
+        // timeout is 100ms
+        // the download would otherwise take 1000ms
+        // we check after 300ms to make sure abort does not fire an "abort" event
+
+        var timeoutFired = false;
+
+        var client = new XMLHttpRequest();
+
+        assert_true('timeout' in client, 'xhr.timeout is not supported in this user agent');
+
+        client.timeout = 100;
+
+        setTimeout(test.step_func(function() {
+            assert_true(timeoutFired);
+
+            // abort should not cause the "abort" event to fire
+            client.abort();
+
+            setTimeout(function(){ // use a timeout to catch any implementation that might queue an abort event for later - just in case
+              test.step(function(){test.done();});
+            }, 200);
+
+            assert_equals(client.readyState, 0);
+
+            test.done();
+        }), 300);
+
+        client.ontimeout = function () {
+            timeoutFired = true;
+        };
+
+        client.onabort = test.step_func(function () {
+            // this should not fire!
+
+            assert_unreached("abort() should not cause the abort event to fire");
+        });
+
+        client.open("GET", "/common/blank.html?pipe=trickle(d1)", true);
+        client.send(null);
+    });
+</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done-expected.txt
new file mode 100644 (file)
index 0000000..6afa7e9
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort() during DONE 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-done.htm
new file mode 100644 (file)
index 0000000..a8b604f
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() during DONE</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4] following-sibling::ol/li[5]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1, 4] // open() -> 1, send() -> 4
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+          })
+        }
+        client.open("GET", "resources/well-formed.xml", false)
+        client.send(null)
+        assert_equals(client.readyState, 4)
+        client.abort()
+        assert_equals(client.readyState, 0)
+        assert_array_equals(result, expected)
+        test.done()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open-expected.txt
new file mode 100644 (file)
index 0000000..d9df1a3
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort() during OPEN 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open.htm
new file mode 100644 (file)
index 0000000..60a6eee
--- /dev/null
@@ -0,0 +1,29 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() during OPEN</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4] following-sibling::ol/li[5]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following-sibling::ol/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "...")
+        client.onreadystatechange = function() {
+          test.step(function() {
+            assert_unreached()
+          })
+        }
+        client.abort()
+        assert_equals(client.readyState, 0)
+        assert_throws("InvalidStateError", function() { client.send("test") }, "calling send() after abort()")
+      })
+      test.done()
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent-expected.txt
new file mode 100644 (file)
index 0000000..ea7d264
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort() during UNSENT 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-unsent.htm
new file mode 100644 (file)
index 0000000..bc2f5ca
--- /dev/null
@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() during UNSENT</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4] following-sibling::ol/li[5]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            assert_unreached()
+          })
+        }
+        client.abort()
+        assert_equals(client.readyState, 0)
+      })
+      test.done()
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt
new file mode 100644 (file)
index 0000000..ad541d8
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: abort() while sending data assert_equals: expected 4 but got 0
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-upload.htm
new file mode 100644 (file)
index 0000000..afb2828
--- /dev/null
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() while sending data</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[7] following-sibling::ol/li[4]/ol/li[7]/ol/li[2] following-sibling::ol/li[4]/ol/li[7]/ol/li[3] following-sibling::ol/li[4]/ol/li[7]/ol/li[4]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#make-upload-progress-notifications" data-tested-assertations="following::ul[1]/li[1] following::ul[1]/li[2]/ol[1]/li[2] following::ul[1]/li[2]/ol[1]/li[3] following::ul[1]/li[2]/ol[1]/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test(document.title, {timeout:1100})
+      var result = []
+      var expected = ['progress on XHR Upload', 'abort on XHR Upload', 'loadend on XHR Upload', 'progress on XHR', 'abort on XHR', 'loadend on XHR']
+      function logEvt (e) {
+        var str = e.type+' on '
+        str += e.target instanceof XMLHttpRequest ? 'XHR' : 'XHR Upload'
+        result.push(str)
+      }
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.open("POST", "resources/delay.py?ms=1000")
+        client.addEventListener('progress', logEvt)
+        client.addEventListener('abort', logEvt)
+        client.addEventListener('loadend', function (e) {
+          logEvt(e)
+          test.step(function() {
+            assert_equals(client.readyState, 4)
+            assert_array_equals(result, expected)
+            test.done()
+          })
+        })
+        client.upload.addEventListener('loadend', logEvt)
+        client.upload.addEventListener('progress', logEvt)
+        client.upload.addEventListener('abort', logEvt)
+        client.send((new Array(10000)).join('a'))
+        client.abort()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort-expected.txt
new file mode 100644 (file)
index 0000000..1279415
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: The abort() method: do not fire abort event in OPENED state when send() flag is unset. send() throws after abort(). assert_unreached: when abort() is called, state is OPENED with the send() flag being unset, must not fire abort event per spec Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-abort.htm
new file mode 100644 (file)
index 0000000..2382241
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[5]" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <title>XMLHttpRequest: The abort() method: do not fire abort event in OPENED state when send() flag is unset. send() throws after abort().</title>
+</head>
+
+<body>
+    <div id="log"></div>
+
+    <script type="text/javascript">
+        var test = async_test()
+
+        test.step(function()
+        {
+            var xhr = new XMLHttpRequest()
+
+            xhr.onreadystatechange = function()
+            {
+                test.step(function()
+                {
+                    if (xhr.readyState == 1)
+                    {
+                        xhr.abort();
+                    }
+                });
+            };
+
+            xhr.onabort = function(e)
+            {
+                test.step(function()
+                {
+                    assert_unreached('when abort() is called, state is OPENED with the send() flag being unset, must not fire abort event per spec')
+                });
+            };
+
+            xhr.open("GET", "./resources/content.py", true); // This should cause a readystatechange event that calls abort()
+            assert_throws("InvalidStateError", function(){ xhr.send() })
+            test.done()
+        });
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners-expected.txt
new file mode 100644 (file)
index 0000000..7522e14
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort() should not reset event listeners 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-listeners.htm
new file mode 100644 (file)
index 0000000..1c50ed3
--- /dev/null
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort() should not reset event listeners</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[6] following-sibling::ol/li[7]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            test = function() {}
+        client.onreadystatechange = test
+        client.open("GET", "resources/well-formed.xml")
+        client.send(null)
+        client.abort()
+        assert_equals(client.onreadystatechange, test)
+      })
+      test.done()
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend-expected.txt
new file mode 100644 (file)
index 0000000..7f327fd
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: The abort() method: Fire a progress event named loadend 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-loadend.htm
new file mode 100644 (file)
index 0000000..8b8dfda
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[6]"/>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <title>XMLHttpRequest: The abort() method: Fire a progress event named loadend</title>
+</head>
+
+<body>
+    <div id="log"></div>
+
+    <script type="text/javascript">
+        var test = async_test(function(test)
+        {
+            var xhr = new XMLHttpRequest();
+
+            xhr.onloadstart = function()
+            {
+                test.step(function()
+                {
+                    if (xhr.readyState == 1)
+                    {
+                        xhr.abort();
+                    }
+                });
+            };
+
+            xhr.onloadend = function(e)
+            {
+                test.step(function()
+                {
+                    assert_true(e instanceof ProgressEvent);
+                    assert_equals(e.type, "loadend");
+                    test.done();
+                });
+            };
+
+            xhr.open("GET", "resources/content.py", true);
+            xhr.send();
+        });
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt
new file mode 100644 (file)
index 0000000..cfb5935
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: The abort() method: abort and loadend events assert_array_equals: lengths differ, expected 6 got 5
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-event-order.htm
new file mode 100644 (file)
index 0000000..b349a27
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[3] following-sibling::ol/li[4]/ol/li[5] following-sibling::ol/li[4]/ol/li[6] following-sibling::ol/li[4]/ol/li[7]/ol/li[3] following-sibling::ol/li[4]/ol/li[7]/ol/li[4] following-sibling::ol/li[5]" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <title>XMLHttpRequest: The abort() method: abort and loadend events</title>
+</head>
+
+<body>
+    <div id="log"></div>
+
+    <script type="text/javascript">
+        var test = async_test();
+
+        test.step(function()
+        {
+            var xhr = new XMLHttpRequest();
+            var expect = [1, 4, "upload.abort", "upload.loadend", "abort", "loadend"];
+            var actual = [];
+
+            xhr.onreadystatechange = function()
+            {
+                test.step(function()
+                {
+                     actual.push(xhr.readyState);
+                });
+            };
+            xhr.onloadstart = function()
+            {
+                test.step(function()
+                {
+                    var readyState = xhr.readyState;
+                    if (readyState == 1)
+                    {
+                        xhr.abort();
+                        VerifyResult();
+                    }else{
+                        assert_unreached('Loadstart event should not fire in readyState '+readyState);
+                    }
+                });
+            };
+
+            xhr.onloadend          = function(e){ actual.push(e.type); };
+            xhr.onabort            = function(e){ actual.push(e.type); };
+
+            xhr.upload.onloadend   = function(e){ actual.push("upload." + e.type); };
+            xhr.upload.onabort     = function(e){ actual.push("upload." + e.type); };
+
+            function VerifyResult()
+            {
+                test.step(function()
+                {
+                    assert_array_equals(actual, expect);
+                    assert_equals(xhr.readyState, 0, 'state should be UNSENT');
+                    test.done();
+                });
+            };
+
+            xhr.open("POST", "./resources/content.py", true);
+            xhr.send("Test Message");
+        });
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort-expected.txt
new file mode 100644 (file)
index 0000000..5d40e11
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: The abort() method: Fire a progress event named abort on the XMLHttpRequestUpload object 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-abort.htm
new file mode 100644 (file)
index 0000000..1d04544
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[7]/ol/li[3]" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <title>XMLHttpRequest: The abort() method: Fire a progress event named abort on the XMLHttpRequestUpload object</title>
+</head>
+
+<body>
+    <div id="log"></div>
+
+    <script type="text/javascript">
+        var test = async_test();
+
+        test.step(function()
+        {
+            var xhr = new XMLHttpRequest();
+
+            xhr.onloadstart = function()
+            {
+                test.step(function()
+                {
+                    if (xhr.readyState == 1)
+                    {
+                        xhr.abort();
+                    }
+                });
+            };
+
+            xhr.upload.onabort = function(e)
+            {
+                test.step(function()
+                {
+                    assert_true(e instanceof ProgressEvent);
+                    assert_equals(e.type, "abort");
+                    assert_equals(e.target, xhr.upload);
+                    test.done();
+                });
+            };
+
+            xhr.open("POST", "./resources/content.py", true);
+            xhr.send("Test Message");
+        });
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend-expected.txt
new file mode 100644 (file)
index 0000000..983788d
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: The abort() method: Fire a progress event named loadend on the XMLHttpRequestUpload object 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-upload-event-loadend.htm
new file mode 100644 (file)
index 0000000..5b10b65
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-abort()-method" data-tested-assertations="following-sibling::ol/li[4]/ol/li[7]/ol/li[4]" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <title>XMLHttpRequest: The abort() method: Fire a progress event named loadend on the XMLHttpRequestUpload object</title>
+</head>
+
+<body>
+    <div id="log"></div>
+
+    <script type="text/javascript">
+        var test = async_test();
+
+        test.step(function()
+        {
+            var xhr = new XMLHttpRequest();
+
+            xhr.onloadstart = function()
+            {
+                test.step(function ()
+                {
+                    if (xhr.readyState == 1)
+                    {
+                        xhr.abort();
+                    }
+                });
+            };
+
+            xhr.upload.onloadend = function(e)
+            {
+                test.step(function()
+                {
+                    assert_true(e instanceof ProgressEvent);
+                    assert_equals(e.type, "loadend");
+                    assert_equals(e.target, xhr.upload);
+                    test.done();
+                });
+            };
+
+            xhr.open("POST", "./resources/content.py", true);
+            xhr.send("Test Message");
+        });
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt
new file mode 100644 (file)
index 0000000..f68d75b
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: anonymous mode unsupported 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm
new file mode 100644 (file)
index 0000000..9cacf61
--- /dev/null
@@ -0,0 +1,40 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: anonymous mode unsupported</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+    /*
+      Older versions of the XMLHttpRequest spec had an 'anonymous' mode
+      The point of this mode was to handle same-origin requests like other-origin requests,
+      i.e. require preflight, drop authentication data (cookies and HTTP auth)
+      Also the Origin: and Referer: headers would not be sent
+
+      This mode was dropped due to lack of implementations and interest,
+      and this test is here just to assert failure if any implementation
+      supports this based on an older spec version.
+    */
+      document.cookie = 'test=anonymous-mode-unsupported'
+      test = async_test();
+      test.add_cleanup(function(){
+        // make sure we clean up the cookie again to avoid confusing other tests..
+        document.cookie = 'test=;expires=Fri, 28 Feb 2014 07:25:59 GMT';
+      })
+      test.step(function() {
+        var client = new XMLHttpRequest({anonymous:true})
+        client.open("GET", "resources/inspect-headers.py?filter_name=cookie")
+        client.onreadystatechange = test.step_func(function(){
+          if(client.readyState === 4){
+            assert_equals(client.responseText, 'cookie: test=anonymous-mode-unsupported\n', 'The deprecated anonymous:true should be ignored, cookie sent anyway')
+            test.done();
+          }
+        });
+        client.send(null)
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri-expected.txt
new file mode 100644 (file)
index 0000000..a013877
--- /dev/null
@@ -0,0 +1,22 @@
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/plain,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/html,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/html;charset=UTF-8,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:image/png,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/plain,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load data:text/plain,Hello, World!. Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: XMLHttpRequest cannot load data:text/plain,Hello, World!. Origin http://localhost:8800 is not allowed by Access-Control-Allow-Origin.
+CONSOLE MESSAGE: XMLHttpRequest cannot load data:text/plain,Hello, World!. Origin http://localhost:8800 is not allowed by Access-Control-Allow-Origin.
+CONSOLE MESSAGE: XMLHttpRequest cannot load data:text/plain,Hello, World!. Origin http://localhost:8800 is not allowed by Access-Control-Allow-Origin.
+
+FAIL XHR method GET with charset text/plain assert_equals: expected "Hello, World!" but got ""
+FAIL XHR method GET with charset text/plain (base64) assert_equals: expected "Hello, World!" but got ""
+FAIL XHR method GET with charset text/html assert_equals: expected "Hello, World!" but got ""
+FAIL XHR method GET with charset text/html;charset=UTF-8 assert_equals: expected "Hello, World!" but got ""
+FAIL XHR method GET with charset image/png assert_equals: expected "Hello, World!" but got ""
+FAIL XHR method POST with charset text/plain assert_equals: expected "OK" but got ""
+FAIL XHR method PUT with charset text/plain assert_equals: expected "OK" but got ""
+FAIL XHR method DELETE with charset text/plain assert_equals: expected "OK" but got ""
+FAIL XHR method HEAD with charset text/plain assert_equals: expected "OK" but got ""
+FAIL XHR method UNICORN with charset text/plain assert_equals: expected "OK" but got ""
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/data-uri.htm
new file mode 100644 (file)
index 0000000..f3edd3b
--- /dev/null
@@ -0,0 +1,53 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>XMLHttpRequest: data uri</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#data:-urls-and-http" data-tested-assertations="following::ul/li[1] following::ul/li[2] following::ul/li[4]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::ul/li[10]/dl/dt[2]" />
+<div id="log"></div>
+
+<script>
+  function do_test(method, uri, charset, testNamePostfix) {
+    if (typeof charset === 'undefined' || charset === null) charset = 'text/plain';
+    var test = async_test("XHR method " + method + " with charset " + charset+(testNamePostfix||''));
+    test.step(function() {
+      var client = new XMLHttpRequest();
+      client.onreadystatechange = test.step_func(function () {
+        if (client.readyState !== 4) {
+          return;
+        }
+
+        // Note: fetching a data URL with a non-GET method returns a network
+        // error per <http://fetch.spec.whatwg.org/#basic-fetch>.
+        if (method.toUpperCase() !== 'GET') {
+          assert_equals(client.status, 0);
+          assert_equals(client.responseText, '');
+          assert_equals(client.statusText, 'OK');
+          test.done();
+          return;
+        }
+
+        assert_equals(client.responseText, "Hello, World!");
+        assert_equals(client.status, 200);
+        assert_equals(client.getResponseHeader('Content-Type'), charset);
+        var allHeaders = client.getAllResponseHeaders();
+        assert_regexp_match(allHeaders, /content\-type\:/i, 'getAllResponseHeaders() includes Content-Type');
+        assert_false(/content\-length\:/i.test(allHeaders), 'getAllResponseHeaders() must not include Content-Length');
+        test.done();
+      });
+      client.open(method, uri);
+      client.send(null);
+    });
+  }
+  do_test('GET', "data:text/plain,Hello, World!");
+  do_test('GET', "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==", undefined, " (base64)");
+  do_test('GET', "data:text/html,Hello, World!", 'text/html');
+  do_test('GET', "data:text/html;charset=UTF-8,Hello, World!", 'text/html;charset=UTF-8');
+  do_test('GET', "data:image/png,Hello, World!", 'image/png');
+  do_test('POST', "data:text/plain,Hello, World!");
+  do_test('PUT', "data:text/plain,Hello, World!");
+  do_test('DELETE', "data:text/plain,Hello, World!");
+  do_test('HEAD', "data:text/plain,Hello, World!");
+  do_test('UNICORN', "data:text/plain,Hello, World!");
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort-expected.txt
new file mode 100644 (file)
index 0000000..a89c58e
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: abort event 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-abort.htm
new file mode 100644 (file)
index 0000000..ce8d937
--- /dev/null
@@ -0,0 +1,29 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: abort event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onabort" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-abort" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-abort" data-tested-assertations="following::ol//ol//ol/li[3]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      test.step(function() {
+        var client = new XMLHttpRequest();
+        client.onabort = test.step_func(function() {
+          test.done();
+        });
+        client.open("GET", "resources/well-formed.xml");
+        client.send(null);
+        client.abort();
+        setTimeout(test.step_func(function () {
+          assert_unreached("onabort not called after 4 ms");
+        }), 4);
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error-expected.txt
new file mode 100644 (file)
index 0000000..c9c618b
--- /dev/null
@@ -0,0 +1,4 @@
+Blocked access to external URL http://example.nonexist/
+
+PASS XMLHttpRequest Test: event - error 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error.html b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error.html
new file mode 100644 (file)
index 0000000..3f95bf5
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>XMLHttpRequest Test: event - error</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<meta name="assert" content="Check if event onerror is fired When the request has failed.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="log"></div>
+
+<script>
+
+async_test(function (t) {
+  var client = new XMLHttpRequest();
+  client.onerror = t.step_func(function(e) {
+    assert_true(e instanceof ProgressEvent);
+    assert_equals(e.type, "error");
+    t.done();
+  });
+
+  client.open("GET", "http://example.nonexist");
+  client.send("null");
+}, document.title);
+
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load-expected.txt
new file mode 100644 (file)
index 0000000..d044be7
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-load.htm
new file mode 100644 (file)
index 0000000..9098eeb
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset)</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onload" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-load" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::a[contains(@href,'#switch-done')]/.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#switch-done" data-tested-assertations="following::ol/li[6]" />
+<div id="log"></div>
+
+<script>
+  var test = async_test();
+  test.step(function() {
+    var client = new XMLHttpRequest();
+    client.onload = test.step_func(function(e) {
+      assert_true(e instanceof ProgressEvent);
+      assert_equals(e.type, "load");
+      assert_equals(client.readyState, 4);
+      test.done();
+    });
+    client.onreadystatechange = test.step_func(function() {
+      if (client.readyState !== 4) return;
+
+      setTimeout(test.step_func(function() {
+          assert_unreached("Didn't get load event within 4ms of readystatechange==4");
+      }), 4);
+    });
+    client.open("GET", "resources/well-formed.xml");
+    client.send(null);
+  });
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend-expected.txt
new file mode 100644 (file)
index 0000000..4cc92e8
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: loadend event 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadend.htm
new file mode 100644 (file)
index 0000000..b0c6213
--- /dev/null
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: loadend event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadend" data-tested-assertations="/../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadend" data-tested-assertations="/../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="/following-sibling::ol/li[10]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::a[contains(@href,'#switch-done')]/.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#switch-done" data-tested-assertations="following::ol[1]/li[7]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      test.step(function() {
+        var client = new XMLHttpRequest();
+        client.onloadend = test.step_func(function(e) {
+         assert_true(e instanceof ProgressEvent);
+         assert_equals(e.type, "loadend");
+         test.done();
+        });
+        client.onreadystatechange = function() {
+          if (client.readyState !== 4) return;
+          setTimeout(test.step_func(function() {
+            assert_unreached("onloadend not called after 100 ms");
+          }), 100);
+        };
+        client.open("GET", "resources/well-formed.xml");
+        client.send(null);
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart-expected.txt
new file mode 100644 (file)
index 0000000..bbed518
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: loadstart event 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-loadstart.htm
new file mode 100644 (file)
index 0000000..5149003
--- /dev/null
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: loadstart event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadstart" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadstart" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following-sibling::ol/li[9]/ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      test.step(function() {
+        var client = new XMLHttpRequest();
+        client.onloadstart = test.step_func(function(e) {
+          assert_true(e instanceof ProgressEvent);
+          assert_equals(e.type, "loadstart");
+          assert_equals(client.readyState, 1);
+          test.done();
+        });
+        setTimeout(test.step_func(function () {
+          assert_unreached("onloadstart not called after 500 ms");
+        }), 500);
+        client.open("GET", "resources/well-formed.xml");
+        client.send(null);
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress-expected.txt
new file mode 100644 (file)
index 0000000..22ade06
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress.htm
new file mode 100644 (file)
index 0000000..31b35b7
--- /dev/null
@@ -0,0 +1,29 @@
+<!doctype html>
+<html lang=en>
+<meta charset=utf-8>
+<title>XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset)</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onprogress" data-tested-assertations="../.." />
+<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-progress" data-tested-assertations="../.." />
+<link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::*//a[contains(@href,'#make-progress-notifications')]" />
+<link rel="help" href="https://xhr.spec.whatwg.org/#make-progress-notifications" data-tested-assertations=".." />
+<link rel="help" href="https://xhr.spec.whatwg.org/#switch-done" data-tested-assertations="following::li[5]" />
+<div id="log"></div>
+<script>
+  var test = async_test();
+  test.step(function() {
+    var client = new XMLHttpRequest();
+    client.onprogress = test.step_func(function(e) {
+      assert_true(e instanceof ProgressEvent);
+      assert_equals(e.type, "progress");
+      test.done();
+    });
+    client.onreadystatechange = test.step_func(function() {
+      if (client.readyState === 4)
+        assert_unreached("onprogress not called.");
+    });
+    client.open("GET", "resources/trickle.py");
+    client.send(null);
+  });
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded-expected.txt
new file mode 100644 (file)
index 0000000..19f4584
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: the LOADING state change should only happen once assert_equals: LOADING state change may only be emitted once expected 1 but got 10
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm
new file mode 100644 (file)
index 0000000..4368f8c
--- /dev/null
@@ -0,0 +1,38 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>XMLHttpRequest: the LOADING state change should only happen once</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::ol[1]/li[10]/dt[1]">
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[7] following::a[contains(@href,'#switch-loading')]/..">
+    <link rel="help" href="https://xhr.spec.whatwg.org/#switch-loading" data-tested-assertations="following::ol[1]/li[1] following::ol[1]/li[2]">
+</head>
+
+<div id="log"></div>
+
+<script>
+
+var test = async_test();
+
+test.step(function() {
+    var client = new XMLHttpRequest();
+    var countedLoading = 0;
+
+    client.onreadystatechange = test.step_func(function() {
+        if (client.readyState === 3) {
+            countedLoading += 1;
+        }
+
+        if (client.readyState === 4) {
+            assert_equals(countedLoading, 1, "LOADING state change may only be emitted once");
+
+            test.done();
+        }
+    });
+
+    client.open("GET", "resources/trickle.py?count=10"); // default timeout in trickle.py is 1/2 sec, so this request will take 5 seconds to complete
+    client.send(null);
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout-expected.txt
new file mode 100644 (file)
index 0000000..a054dd7
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: timeout event 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-timeout.htm
new file mode 100644 (file)
index 0000000..3368efc
--- /dev/null
@@ -0,0 +1,34 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: timeout event</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-timeout" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following-sibling::ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      test.step(function() {
+        var client = new XMLHttpRequest();
+        client.ontimeout = function() {
+          test.step(function() {
+            assert_equals(client.readyState, 4);
+            test.done();
+          });
+        };
+        client.timeout = 5;
+        client.open("GET", "resources/delay.py?ms=20000");
+        client.send(null);
+        setTimeout(test.step_func(function () {
+          assert_unreached("ontimeout not called.");
+        }), 10);
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-expected.txt
new file mode 100644 (file)
index 0000000..3e5bd69
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: upload progress event 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress.htm
new file mode 100644 (file)
index 0000000..98c76cc
--- /dev/null
@@ -0,0 +1,26 @@
+<!doctype html>
+<html lang=en>
+<meta charset=utf-8>
+<title>XMLHttpRequest: upload progress event</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onprogress" data-tested-assertations="../.." />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::*//a[contains(@href,'#make-upload-progress-notifications')] following::ol[1]/li[8]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#make-upload-progress-notifications" data-tested-assertations=".. ../following::ul/li[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-upload" data-tested-assertations=".." />
+
+<div id="log"></div>
+<script>
+  var test = async_test();
+  test.step(function() {
+    var client = new XMLHttpRequest();
+    client.upload.onprogress = test.step_func(function() {
+      test.done();
+    });
+    client.onreadystatechange = test.step_func(function() {
+      if (client.readyState === 4) assert_unreached("onprogress not called.");
+    });
+    client.open("POST", "resources/upload.py");
+    client.send("This is a test string.");
+  });
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/folder.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/folder.txt
new file mode 100644 (file)
index 0000000..bf1a1fd
--- /dev/null
@@ -0,0 +1 @@
+top
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob-expected.txt
new file mode 100644 (file)
index 0000000..4550be6
--- /dev/null
@@ -0,0 +1,5 @@
+
+PASS formdata with blob 
+PASS formdata with named blob 
+PASS formdata.append() should throw if value is string and file name is given 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-blob.htm
new file mode 100644 (file)
index 0000000..5efef7b
--- /dev/null
@@ -0,0 +1,46 @@
+<!doctype html>
+<html lang=en>
+<meta charset=utf-8>
+<title>XMLHttpRequest: upload formdata with blob</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#interface-formdata" data-tested-assertations="following::P[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-formdata" data-tested-assertations="following::P[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-formdata-append" data-tested-assertations=".. following::P[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-formdata-append" data-tested-assertations="following::P[2] following::UL[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-XMLHttpRequest-send-FormData" data-tested-assertations="following::DD[1]" />
+<div id="log"></div>
+<script>
+  function do_test (name, fd, expected) {
+    var test = async_test(name);
+    test.step(function() {
+      var client = new XMLHttpRequest();
+      client.onreadystatechange = test.step_func(function () {
+        if (client.readyState !== 4) return;
+        assert_equals(client.responseText, expected);
+        test.done();
+      });
+      client.open("POST", "resources/upload.py");
+      client.send(fd);
+    });
+  }
+
+  function create_formdata () {
+    var fd = new FormData();
+    for (var i = 0; i < arguments.length; i++) {
+      fd.append.apply(fd, arguments[i]);
+    }
+    return fd;
+  }
+
+  do_test("formdata with blob", create_formdata(['key', new Blob(['value'], {type: 'text/x-value'})]), '\nkey=blob:text/x-value:5,');
+  do_test("formdata with named blob", create_formdata(['key', new Blob(['value'], {type: 'text/x-value'}), 'blob.txt']), '\nkey=blob.txt:text/x-value:5,');
+  // If 3rd argument is given and 2nd is not a Blob, formdata.append() should throw
+  var test = async_test('formdata.append() should throw if value is string and file name is given'); // needs to be async just because the others above are
+  test.step(function(){
+    assert_throws(new TypeError(), function(){
+      create_formdata('a', 'b', 'c');
+    });
+  });
+  test.done();
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata-expected.txt
new file mode 100644 (file)
index 0000000..31c026a
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS empty formdata 
+PASS formdata with string 
+PASS formdata with named string 
+PASS formdata from form 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/formdata.htm
new file mode 100644 (file)
index 0000000..e0d0a4e
--- /dev/null
@@ -0,0 +1,43 @@
+<!doctype html>
+<html lang=en>
+<meta charset=utf-8>
+<title>XMLHttpRequest: upload formdata</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#interface-formdata" data-tested-assertations="following::P[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-formdata" data-tested-assertations=".. following::P[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-formdata-append" data-tested-assertations=".. following::UL[1]/LI[1] following::UL[1]/LI[2] following::UL[1]/LI[3]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-XMLHttpRequest-send-FormData" data-tested-assertations="following::DD[1]" />
+<div id="log"></div>
+<form id="form">
+  <input type="hidden" name="key" value="value">
+</form>
+<script>
+  function do_test (name, fd, expected) {
+    var test = async_test(name);
+    test.step(function() {
+      var client = new XMLHttpRequest();
+      client.onreadystatechange = test.step_func(function () {
+        if (client.readyState !== 4) return;
+        assert_equals(client.responseText, expected);
+        test.done();
+      });
+      client.open("POST", "resources/upload.py");
+      client.send(fd);
+    });
+  }
+
+  function create_formdata () {
+    var fd = new FormData();
+    for (var i = 0; i < arguments.length; i++) {
+      fd.append.apply(fd, arguments[i]);
+    };
+    return fd;
+  }
+
+  do_test("empty formdata", new FormData(), '\n');
+  do_test("formdata with string", create_formdata(['key', 'value']), 'key=value,\n');
+  do_test("formdata with named string", create_formdata(['key', new Blob(['value'], {type: 'text/plain'}), 'kv.txt']), '\nkey=kv.txt:text/plain:5,');
+  do_test("formdata from form", new FormData(document.getElementById('form')), 'key=value,\n');
+
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies-expected.txt
new file mode 100644 (file)
index 0000000..2d3f81f
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getAllResponseHeaders() excludes cookies 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cookies.htm
new file mode 100644 (file)
index 0000000..2cd8098
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getAllResponseHeaders() excludes cookies</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders" data-tested-assertations="/following::OL[1]/LI[1] /following::OL[1]/LI[3]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        assert_equals(client.getAllResponseHeaders(), "")
+        client.onreadystatechange = function() {
+          test.step(function() {
+            var headers = client.getAllResponseHeaders().toLowerCase()
+            if(client.readyState == 1) {
+              assert_equals(headers, "")
+            }
+            if(client.readyState > 1) {
+              assert_true(headers.indexOf("\r\n") != -1, "carriage return")
+              assert_true(headers.indexOf("content-type") != -1, "content-type")
+              assert_true(headers.indexOf("x-custom-header") != -1, "x-custom-header")
+              assert_false(headers.indexOf("set-cookie") != -1, "set-cookie")
+              assert_false(headers.indexOf("set-cookie2") != -1, "set-cookie2")
+            }
+            if(client.readyState == 4)
+              test.done()
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status-expected.txt
new file mode 100644 (file)
index 0000000..d22f3f0
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getAllResponseHeaders() excludes status 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-status.htm
new file mode 100644 (file)
index 0000000..ec1aa9a
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getAllResponseHeaders() excludes status</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders" data-tested-assertations="/following::OL[1]/LI[1] /following::OL[1]/LI[3]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        var headersUnsent = client.getAllResponseHeaders();
+         test.step(function() {
+           assert_equals(headersUnsent, "")
+         });
+        client.onreadystatechange = function() {
+          test.step(function() {
+            var headers = client.getAllResponseHeaders().toLowerCase()
+            if(client.readyState == 1) {
+              assert_equals(headers, "")
+            }
+            if(client.readyState > 1) {
+              assert_false(headers.indexOf("200 ok") != -1)
+              assert_false(headers.indexOf("http/1.") != -1)
+            }
+            if(client.readyState == 4)
+              test.done()
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive-expected.txt
new file mode 100644 (file)
index 0000000..b9f6d78
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getResponseHeader() case-insensitive matching 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm
new file mode 100644 (file)
index 0000000..8e0537e
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() case-insensitive matching</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="following::OL[1]/LI[4] following::OL[1]/LI[5] following::OL[1]/LI[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 4) {
+              assert_equals(client.getResponseHeader("x-custom-header"), "test")
+              assert_equals(client.getResponseHeader("X-Custom-Header"), "test")
+              assert_equals(client.getResponseHeader("X-CUSTOM-HEADER"), "test")
+              assert_equals(client.getResponseHeader("X-custom-HEADER"), "test")
+              assert_equals(client.getResponseHeader("X-CUSTOM-header-COMMA"), "1, 2")
+              assert_equals(client.getResponseHeader("X-CUSTOM-no-such-header-in-response"), null)
+              assert_true(client.getResponseHeader("CONTENT-TYPE").indexOf("text/plain") != -1)
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer-expected.txt
new file mode 100644 (file)
index 0000000..c9046bb
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getResponseHeader() and HTTP trailer 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm
new file mode 100644 (file)
index 0000000..3cbdb9c
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() and HTTP trailer</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="/following::OL[1]/LI[4] /following::OL[1]/LI[5] /following::OL[1]/LI[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 4) {
+              assert_equals(client.getResponseHeader('Trailer'), 'X-Test-Me')
+              assert_equals(client.getResponseHeader('X-Test-Me'), null)
+              assert_equals(client.getAllResponseHeaders().indexOf('Trailer header value'), -1)
+              assert_regexp_match(client.getAllResponseHeaders(), /Trailer:\sX-Test-Me/)
+              assert_equals(client.responseText, "First chunk\r\nSecond chunk\r\nYet another (third) chunk\r\nYet another (fourth) chunk\r\n")
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/chunked.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more-expected.txt
new file mode 100644 (file)
index 0000000..5d7e379
--- /dev/null
@@ -0,0 +1,9 @@
+CONSOLE MESSAGE: line 23: Refused to get unsafe header "set-cookie"
+CONSOLE MESSAGE: line 24: Refused to get unsafe header "set-cookie2"
+CONSOLE MESSAGE: line 23: Refused to get unsafe header "set-cookie"
+CONSOLE MESSAGE: line 24: Refused to get unsafe header "set-cookie2"
+CONSOLE MESSAGE: line 23: Refused to get unsafe header "set-cookie"
+CONSOLE MESSAGE: line 24: Refused to get unsafe header "set-cookie2"
+
+PASS XMLHttpRequest: getResponseHeader() custom/non-existent headers and cookies 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-cookies-and-more.htm
new file mode 100644 (file)
index 0000000..053fe44
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() custom/non-existent headers and cookies</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="following::OL[1]/LI[3] following::OL[1]/LI[5] following::OL[1]/LI[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 1) {
+              assert_equals(client.getResponseHeader("x-custom-header"), null)
+            }
+            if(client.readyState > 1) {
+              assert_equals(client.getResponseHeader("x-custom-header"), "test")
+              assert_equals(client.getResponseHeader("x-custom-header-empty"), "")
+              assert_equals(client.getResponseHeader("set-cookie"), null)
+              assert_equals(client.getResponseHeader("set-cookie2"), null)
+              assert_equals(client.getResponseHeader("x-non-existent-header"), null)
+            }
+            if(client.readyState == 4)
+              test.done()
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt
new file mode 100644 (file)
index 0000000..f996d31
--- /dev/null
@@ -0,0 +1,4 @@
+Blocked access to external URL http://www1.localhost:8800/XMLHttpRequest/resources/nocors/folder.txt
+
+PASS XMLHttpRequest: getResponseHeader() in error state (failing cross-origin test) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state.htm
new file mode 100644 (file)
index 0000000..c9695fd
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() in error state (failing cross-origin test)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="following::OL[1]/LI[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 1) {
+              assert_equals(client.getResponseHeader("x-custom-header"), null)
+            }
+            if(client.readyState > 1) {
+              assert_equals(client.getResponseHeader("x-custom-header"), null)
+            }
+            if(client.readyState == 4){
+              assert_equals(client.getResponseHeader("x-custom-header"), null)
+              test.done()
+            }
+          })
+        }
+        var url = location.protocol + "//" + 'www1.' + location.host + (location.pathname.replace(/getresponseheader-error-state\.htm/, 'resources/nocors/folder.txt'))
+        client.open("GET", url)
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date-expected.txt
new file mode 100644 (file)
index 0000000..b7389ff
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getResponseHeader() server and date 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-server-date.htm
new file mode 100644 (file)
index 0000000..409bc35
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() server and date</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="/following::OL[1]/LI[4] /following::OL[1]/LI[5] /following::OL[1]/LI[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 4) {
+              assert_true(client.getResponseHeader("Server") != null)
+              assert_true(client.getResponseHeader("Date") != null)
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters-expected.txt
new file mode 100644 (file)
index 0000000..1a407a0
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getResponseHeader() funny characters 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-special-characters.htm
new file mode 100644 (file)
index 0000000..980f848
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() funny characters</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="/following::OL[1]/LI[5] /following::OL[1]/LI[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState == 4) {
+              assert_equals(client.getResponseHeader("x-custom-header "), null)
+              assert_equals(client.getResponseHeader(" x-custom-header"), null)
+              assert_equals(client.getResponseHeader("x-custom-header-bytes"), "\xE2\x80\xA6")
+              assert_equals(client.getResponseHeader("x¾"), null)
+              assert_equals(client.getResponseHeader("x-custom-header\n"), null)
+              assert_equals(client.getResponseHeader("\nx-custom-header"), null)
+              assert_equals(client.getResponseHeader("x-custom-header:"), null)
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state-expected.txt
new file mode 100644 (file)
index 0000000..ec098f3
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: getResponseHeader() in unsent, opened states 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-unsent-opened-state.htm
new file mode 100644 (file)
index 0000000..e3bc272
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: getResponseHeader() in unsent, opened states</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getresponseheader" data-tested-assertations="/following::OL[1]/LI[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        assert_equals(client.getResponseHeader("x-custom-header"), null)
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState < 2) {
+              assert_equals(client.getResponseHeader("x-custom-header"), null)
+              assert_equals(client.getResponseHeader("CONTENT-TYPE"), null)
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/headers.py")
+        assert_equals(client.getResponseHeader("x-custom-header"), null)
+        assert_equals(client.getResponseHeader("Date"), null)
+        client.send(null)
+      })
+  </script>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt
new file mode 100644 (file)
index 0000000..c1a461d
--- /dev/null
@@ -0,0 +1,225 @@
+CONSOLE MESSAGE: line 198: callback not yet supported
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'onreadystatechange' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'readyState' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'timeout' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'withCredentials' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'upload' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'responseURL' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'status' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'statusText' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'responseType' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'responseXML' on a non-XMLHttpRequest object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'lengthComputable' on a non-ProgressEvent object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'loaded' on a non-ProgressEvent object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'total' on a non-ProgressEvent object.
+XMLHttpRequest IDL tests
+
+
+FAIL XMLHttpRequestEventTarget interface: existence and properties of interface object assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface object length assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: existence and properties of interface prototype object assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onloadstart assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onprogress assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onabort assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onerror assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onload assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute ontimeout assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestEventTarget interface: attribute onloadend assert_own_property: self does not have own property "XMLHttpRequestEventTarget" expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestUpload interface: existence and properties of interface object assert_equals: class string of XMLHttpRequestUpload expected "[object Function]" but got "[object XMLHttpRequestUploadConstructor]"
+PASS XMLHttpRequestUpload interface object length 
+FAIL XMLHttpRequestUpload interface: existence and properties of interface prototype object assert_own_property: should inherit from XMLHttpRequestEventTarget, but self has no such property expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequestUpload interface: existence and properties of interface prototype object's "constructor" property assert_true: XMLHttpRequestUpload.prototype.constructor is not writable expected true got false
+PASS XMLHttpRequestUpload must be primary interface of (new XMLHttpRequest()).upload 
+PASS Stringification of (new XMLHttpRequest()).upload 
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onloadstart" with the proper type (0) 
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onprogress" with the proper type (1) 
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onabort" with the proper type (2) 
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onerror" with the proper type (3) 
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onload" with the proper type (4) 
+FAIL XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "ontimeout" with the proper type (5) assert_inherits: property "ontimeout" not found in prototype chain
+PASS XMLHttpRequestEventTarget interface: (new XMLHttpRequest()).upload must inherit property "onloadend" with the proper type (6) 
+PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "addEventListener" with the proper type (0) 
+FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "removeEventListener" with the proper type (1) 
+FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS EventTarget interface: (new XMLHttpRequest()).upload must inherit property "dispatchEvent" with the proper type (2) 
+PASS EventTarget interface: calling dispatchEvent(Event) on (new XMLHttpRequest()).upload with too few arguments must throw TypeError 
+FAIL XMLHttpRequest interface: existence and properties of interface object assert_equals: class string of XMLHttpRequest expected "[object Function]" but got "[object XMLHttpRequestConstructor]"
+PASS XMLHttpRequest interface object length 
+FAIL XMLHttpRequest interface: existence and properties of interface prototype object assert_own_property: should inherit from XMLHttpRequestEventTarget, but self has no such property expected property "XMLHttpRequestEventTarget" missing
+FAIL XMLHttpRequest interface: existence and properties of interface prototype object's "constructor" property assert_true: XMLHttpRequest.prototype.constructor is not writable expected true got false
+FAIL XMLHttpRequest interface: attribute onreadystatechange assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS XMLHttpRequest interface: constant UNSENT on interface object 
+PASS XMLHttpRequest interface: constant UNSENT on interface prototype object 
+PASS XMLHttpRequest interface: constant OPENED on interface object 
+PASS XMLHttpRequest interface: constant OPENED on interface prototype object 
+PASS XMLHttpRequest interface: constant HEADERS_RECEIVED on interface object 
+PASS XMLHttpRequest interface: constant HEADERS_RECEIVED on interface prototype object 
+PASS XMLHttpRequest interface: constant LOADING on interface object 
+PASS XMLHttpRequest interface: constant LOADING on interface prototype object 
+PASS XMLHttpRequest interface: constant DONE on interface object 
+PASS XMLHttpRequest interface: constant DONE on interface prototype object 
+FAIL XMLHttpRequest interface: attribute readyState assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS XMLHttpRequest interface: operation open(ByteString,USVString) 
+PASS XMLHttpRequest interface: operation open(ByteString,USVString,boolean,USVString,USVString) 
+PASS XMLHttpRequest interface: operation setRequestHeader(ByteString,ByteString) 
+FAIL XMLHttpRequest interface: attribute timeout assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL XMLHttpRequest interface: attribute withCredentials assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL XMLHttpRequest interface: attribute upload assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS XMLHttpRequest interface: operation send([object Object],[object Object]) 
+PASS XMLHttpRequest interface: operation abort() 
+FAIL XMLHttpRequest interface: attribute responseURL assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL XMLHttpRequest interface: attribute status assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL XMLHttpRequest interface: attribute statusText assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS XMLHttpRequest interface: operation getResponseHeader(ByteString) 
+PASS XMLHttpRequest interface: operation getAllResponseHeaders() 
+PASS XMLHttpRequest interface: operation overrideMimeType(DOMString) 
+FAIL XMLHttpRequest interface: attribute responseType assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL XMLHttpRequest interface: attribute response assert_true: The prototype object must have a property "response" expected true got false
+FAIL XMLHttpRequest interface: attribute responseText assert_true: The prototype object must have a property "responseText" expected true got false
+FAIL XMLHttpRequest interface: attribute responseXML assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS XMLHttpRequest must be primary interface of new XMLHttpRequest() 
+PASS Stringification of new XMLHttpRequest() 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "onreadystatechange" with the proper type (0) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "UNSENT" with the proper type (1) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "OPENED" with the proper type (2) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "HEADERS_RECEIVED" with the proper type (3) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "LOADING" with the proper type (4) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "DONE" with the proper type (5) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "readyState" with the proper type (6) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "open" with the proper type (7) 
+PASS XMLHttpRequest interface: calling open(ByteString,USVString) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "open" with the proper type (8) 
+PASS XMLHttpRequest interface: calling open(ByteString,USVString,boolean,USVString,USVString) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "setRequestHeader" with the proper type (9) 
+PASS XMLHttpRequest interface: calling setRequestHeader(ByteString,ByteString) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "timeout" with the proper type (10) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "withCredentials" with the proper type (11) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "upload" with the proper type (12) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "send" with the proper type (13) 
+PASS XMLHttpRequest interface: calling send([object Object],[object Object]) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "abort" with the proper type (14) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "responseURL" with the proper type (15) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "status" with the proper type (16) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "statusText" with the proper type (17) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "getResponseHeader" with the proper type (18) 
+PASS XMLHttpRequest interface: calling getResponseHeader(ByteString) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "getAllResponseHeaders" with the proper type (19) 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "overrideMimeType" with the proper type (20) 
+PASS XMLHttpRequest interface: calling overrideMimeType(DOMString) on new XMLHttpRequest() with too few arguments must throw TypeError 
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "responseType" with the proper type (21) 
+FAIL XMLHttpRequest interface: new XMLHttpRequest() must inherit property "response" with the proper type (22) assert_inherits: property "response" found on object expected in prototype chain
+FAIL XMLHttpRequest interface: new XMLHttpRequest() must inherit property "responseText" with the proper type (23) assert_inherits: property "responseText" found on object expected in prototype chain
+PASS XMLHttpRequest interface: new XMLHttpRequest() must inherit property "responseXML" with the proper type (24) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onloadstart" with the proper type (0) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onprogress" with the proper type (1) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onabort" with the proper type (2) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onerror" with the proper type (3) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onload" with the proper type (4) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "ontimeout" with the proper type (5) 
+PASS XMLHttpRequestEventTarget interface: new XMLHttpRequest() must inherit property "onloadend" with the proper type (6) 
+PASS EventTarget interface: new XMLHttpRequest() must inherit property "addEventListener" with the proper type (0) 
+FAIL EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS EventTarget interface: new XMLHttpRequest() must inherit property "removeEventListener" with the proper type (1) 
+FAIL EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on new XMLHttpRequest() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS EventTarget interface: new XMLHttpRequest() must inherit property "dispatchEvent" with the proper type (2) 
+PASS EventTarget interface: calling dispatchEvent(Event) on new XMLHttpRequest() with too few arguments must throw TypeError 
+FAIL FormData interface: existence and properties of interface object assert_equals: class string of FormData expected "[object Function]" but got "[object FormDataConstructor]"
+PASS FormData interface object length 
+PASS FormData interface: existence and properties of interface prototype object 
+FAIL FormData interface: existence and properties of interface prototype object's "constructor" property assert_true: FormData.prototype.constructor is not writable expected true got false
+FAIL FormData interface: operation append(USVString,Blob,USVString) assert_equals: property has wrong .length expected 2 but got 0
+FAIL FormData interface: operation append(USVString,USVString) assert_equals: property has wrong .length expected 2 but got 0
+FAIL FormData interface: operation delete(USVString) assert_own_property: interface prototype object missing non-static operation expected property "delete" missing
+FAIL FormData interface: operation get(USVString) assert_own_property: interface prototype object missing non-static operation expected property "get" missing
+FAIL FormData interface: operation getAll(USVString) assert_own_property: interface prototype object missing non-static operation expected property "getAll" missing
+FAIL FormData interface: operation has(USVString) assert_own_property: interface prototype object missing non-static operation expected property "has" missing
+FAIL FormData interface: operation set(USVString,Blob,USVString) assert_own_property: interface prototype object missing non-static operation expected property "set" missing
+FAIL FormData interface: operation set(USVString,USVString) assert_own_property: interface prototype object missing non-static operation expected property "set" missing
+PASS FormData must be primary interface of new FormData() 
+PASS Stringification of new FormData() 
+PASS FormData interface: new FormData() must inherit property "append" with the proper type (0) 
+FAIL FormData interface: calling append(USVString,Blob,USVString) on new FormData() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS FormData interface: new FormData() must inherit property "append" with the proper type (1) 
+FAIL FormData interface: calling append(USVString,USVString) on new FormData() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+FAIL FormData interface: new FormData() must inherit property "delete" with the proper type (2) assert_inherits: property "delete" not found in prototype chain
+FAIL FormData interface: calling delete(USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "delete" not found in prototype chain
+FAIL FormData interface: new FormData() must inherit property "get" with the proper type (3) assert_inherits: property "get" not found in prototype chain
+FAIL FormData interface: calling get(USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "get" not found in prototype chain
+FAIL FormData interface: new FormData() must inherit property "getAll" with the proper type (4) assert_inherits: property "getAll" not found in prototype chain
+FAIL FormData interface: calling getAll(USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "getAll" not found in prototype chain
+FAIL FormData interface: new FormData() must inherit property "has" with the proper type (5) assert_inherits: property "has" not found in prototype chain
+FAIL FormData interface: calling has(USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "has" not found in prototype chain
+FAIL FormData interface: new FormData() must inherit property "set" with the proper type (6) assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: calling set(USVString,Blob,USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: new FormData() must inherit property "set" with the proper type (7) assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: calling set(USVString,USVString) on new FormData() with too few arguments must throw TypeError assert_inherits: property "set" not found in prototype chain
+PASS FormData must be primary interface of new FormData(form) 
+PASS Stringification of new FormData(form) 
+PASS FormData interface: new FormData(form) must inherit property "append" with the proper type (0) 
+FAIL FormData interface: calling append(USVString,Blob,USVString) on new FormData(form) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+PASS FormData interface: new FormData(form) must inherit property "append" with the proper type (1) 
+FAIL FormData interface: calling append(USVString,USVString) on new FormData(form) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+    [native code]
+}" did not throw
+FAIL FormData interface: new FormData(form) must inherit property "delete" with the proper type (2) assert_inherits: property "delete" not found in prototype chain
+FAIL FormData interface: calling delete(USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "delete" not found in prototype chain
+FAIL FormData interface: new FormData(form) must inherit property "get" with the proper type (3) assert_inherits: property "get" not found in prototype chain
+FAIL FormData interface: calling get(USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "get" not found in prototype chain
+FAIL FormData interface: new FormData(form) must inherit property "getAll" with the proper type (4) assert_inherits: property "getAll" not found in prototype chain
+FAIL FormData interface: calling getAll(USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "getAll" not found in prototype chain
+FAIL FormData interface: new FormData(form) must inherit property "has" with the proper type (5) assert_inherits: property "has" not found in prototype chain
+FAIL FormData interface: calling has(USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "has" not found in prototype chain
+FAIL FormData interface: new FormData(form) must inherit property "set" with the proper type (6) assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: calling set(USVString,Blob,USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: new FormData(form) must inherit property "set" with the proper type (7) assert_inherits: property "set" not found in prototype chain
+FAIL FormData interface: calling set(USVString,USVString) on new FormData(form) with too few arguments must throw TypeError assert_inherits: property "set" not found in prototype chain
+FAIL ProgressEvent interface: existence and properties of interface object assert_equals: class string of ProgressEvent expected "[object Function]" but got "[object ProgressEventConstructor]"
+PASS ProgressEvent interface object length 
+PASS ProgressEvent interface: existence and properties of interface prototype object 
+FAIL ProgressEvent interface: existence and properties of interface prototype object's "constructor" property assert_true: ProgressEvent.prototype.constructor is not writable expected true got false
+FAIL ProgressEvent interface: attribute lengthComputable assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL ProgressEvent interface: attribute loaded assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL ProgressEvent interface: attribute total assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces.html
new file mode 100644 (file)
index 0000000..96de3c0
--- /dev/null
@@ -0,0 +1,171 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>XMLHttpRequest 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>XMLHttpRequest IDL tests</h1>
+<div id=log></div>
+
+<script type=text/plain class=untested>
+[Constructor(DOMString type, optional EventInit eventInitDict)/*,
+ Exposed=(Window,Worker)*/]
+interface Event {
+  readonly attribute DOMString type;
+  readonly attribute EventTarget? target;
+  readonly attribute EventTarget? currentTarget;
+
+  const unsigned short NONE = 0;
+  const unsigned short CAPTURING_PHASE = 1;
+  const unsigned short AT_TARGET = 2;
+  const unsigned short BUBBLING_PHASE = 3;
+  readonly attribute unsigned short eventPhase;
+
+  void stopPropagation();
+  void stopImmediatePropagation();
+
+  readonly attribute boolean bubbles;
+  readonly attribute boolean cancelable;
+  void preventDefault();
+  readonly attribute boolean defaultPrevented;
+
+  [Unforgeable] readonly attribute boolean isTrusted;
+  readonly attribute DOMTimeStamp timeStamp;
+
+  void initEvent(DOMString type, boolean bubbles, boolean cancelable);
+};
+
+dictionary EventInit {
+  boolean bubbles = false;
+  boolean cancelable = false;
+};
+
+/*[Exposed=(Window,Worker)]*/
+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 class=untested>
+[TreatNonCallableAsNull]
+callback EventHandlerNonNull = any (Event event);
+typedef EventHandlerNonNull? EventHandler;
+</script>
+<script type=text/plain>
+/*[Exposed=(Window,Worker)]*/
+interface XMLHttpRequestEventTarget : EventTarget {
+  // event handlers
+  attribute EventHandler onloadstart;
+  attribute EventHandler onprogress;
+  attribute EventHandler onabort;
+  attribute EventHandler onerror;
+  attribute EventHandler onload;
+  attribute EventHandler ontimeout;
+  attribute EventHandler onloadend;
+};
+
+/*[Exposed=(Window,Worker)]*/
+interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
+};
+
+enum XMLHttpRequestResponseType {
+  "",
+  "arraybuffer",
+  "blob",
+  "document",
+  "json",
+  "text"
+};
+
+[Constructor/*,
+ Exposed=(Window,Worker)*/]
+interface XMLHttpRequest : XMLHttpRequestEventTarget {
+  // event handler
+  attribute EventHandler 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(ByteString method, USVString url);
+  void open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null);
+  void setRequestHeader(ByteString name, ByteString value);
+           attribute unsigned long timeout;
+           attribute boolean withCredentials;
+  readonly attribute XMLHttpRequestUpload upload;
+  void send(optional (Document or BodyInit)? body = null);
+  void abort();
+
+  // response
+  readonly attribute USVString responseURL;
+  readonly attribute unsigned short status;
+  readonly attribute ByteString statusText;
+  ByteString? getResponseHeader(ByteString name);
+  ByteString getAllResponseHeaders();
+  void overrideMimeType(DOMString mime);
+           attribute XMLHttpRequestResponseType responseType;
+  readonly attribute any response;
+  readonly attribute USVString responseText;
+  [Exposed=Window] readonly attribute Document? responseXML;
+};
+
+typedef (File or USVString) FormDataEntryValue;
+
+[Constructor(optional HTMLFormElement form)/*,
+ Exposed=(Window,Worker)*/]
+interface FormData {
+  void append(USVString name, Blob value, optional USVString filename);
+  void append(USVString name, USVString value);
+  void delete(USVString name);
+  FormDataEntryValue? get(USVString name);
+  sequence<FormDataEntryValue> getAll(USVString name);
+  boolean has(USVString name);
+  void set(USVString name, Blob value, optional USVString filename);
+  void set(USVString name, USVString value);
+  /*iterable<USVString, FormDataEntryValue>;*/
+};
+
+[Constructor(DOMString type, optional ProgressEventInit eventInitDict)/*,
+ Exposed=(Window,Worker)*/]
+interface ProgressEvent : Event {
+  readonly attribute boolean lengthComputable;
+  readonly attribute unsigned long long loaded;
+  readonly attribute unsigned long long total;
+};
+
+dictionary ProgressEventInit : EventInit {
+  boolean lengthComputable = false;
+  unsigned long long loaded = 0;
+  unsigned long long total = 0;
+};
+</script>
+<script>
+"use strict";
+var form;
+var idlArray;
+setup(function() {
+  form = document.createElement("form");
+  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>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort-expected.txt
new file mode 100644 (file)
index 0000000..d989709
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() after abort() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-abort.htm
new file mode 100644 (file)
index 0000000..ca8a4e1
--- /dev/null
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() after abort()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[15] following::ol/li[15]/ol/li[1] following::ol/li[15]/ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1,  4, 1] // open() -> 1, 
+                                    // abort() -> 4, open() -> 1
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+          })
+        }
+        client.open("GET", "resources/well-formed.xml")
+        assert_equals(client.readyState, 1)
+        client.send(null)
+        client.abort()
+        assert_equals(client.readyState, 0)
+        client.open("GET", "resources/well-formed.xml")
+        assert_equals(client.readyState, 1)
+        assert_array_equals(result, expected)
+      })
+      test.done()
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt
new file mode 100644 (file)
index 0000000..c0f06f7
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() after setRequestHeader() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm
new file mode 100644 (file)
index 0000000..525edbf
--- /dev/null
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() after setRequestHeader()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[14]/ul/li[4]" />
+
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest()
+        client.onreadystatechange = function() {
+          test.step(function() {
+            if(client.readyState === 4){
+              assert_equals(client.responseText, '')
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/inspect-headers.py?filter_name=X-foo")
+        assert_equals(client.readyState, 1)
+        client.setRequestHeader('X-foo', 'bar')
+        client.open("GET", "resources/inspect-headers.py?filter_name=X-foo")
+        assert_equals(client.readyState, 1)
+        client.send()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort-expected.txt
new file mode 100644 (file)
index 0000000..aff28d2
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() during abort() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-during-abort.htm
new file mode 100644 (file)
index 0000000..1d01415
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() during abort()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest(),
+            abort_flag = false,
+            result = [],
+            expected = [1, 4, 1] // open() => 1, abort() => 4, open() => 1
+
+        client.onreadystatechange = this.step_func(function() {
+          result.push(client.readyState)
+          if (abort_flag) {
+            abort_flag = false
+            client.open("GET", "...")
+          }
+        })
+        client.open("GET", "resources/well-formed.xml")
+        client.send(null)
+        abort_flag = true
+        client.abort()
+        assert_array_equals(result, expected)
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus-expected.txt
new file mode 100644 (file)
index 0000000..1d9ac8e
--- /dev/null
@@ -0,0 +1,11 @@
+
+PASS XMLHttpRequest: open() - bogus methods () 
+PASS XMLHttpRequest: open() - bogus methods (>) 
+PASS XMLHttpRequest: open() - bogus methods ( GET) 
+PASS XMLHttpRequest: open() - bogus methods (G T) 
+PASS XMLHttpRequest: open() - bogus methods (@GET) 
+PASS XMLHttpRequest: open() - bogus methods (G:ET) 
+PASS XMLHttpRequest: open() - bogus methods (GET?) 
+PASS XMLHttpRequest: open() - bogus methods (GET
+) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-bogus.htm
new file mode 100644 (file)
index 0000000..263e7b6
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - bogus methods</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function method(method) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          assert_throws("SyntaxError", function() { client.open(method, "...") })
+        }, document.title + " (" + method + ")")
+      }
+      method("")
+      method(">")
+      method(" GET")
+      method("G T")
+      method("@GET")
+      method("G:ET")
+      method("GET?")
+      method("GET\n")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive-expected.txt
new file mode 100644 (file)
index 0000000..35d901e
--- /dev/null
@@ -0,0 +1,8 @@
+
+PASS XMLHttpRequest: open() - case-insensitive methods test (DELETE) 
+PASS XMLHttpRequest: open() - case-insensitive methods test (GET) 
+PASS XMLHttpRequest: open() - case-insensitive methods test (HEAD) 
+PASS XMLHttpRequest: open() - case-insensitive methods test (OPTIONS) 
+PASS XMLHttpRequest: open() - case-insensitive methods test (POST) 
+PASS XMLHttpRequest: open() - case-insensitive methods test (PUT) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-insensitive.htm
new file mode 100644 (file)
index 0000000..1033817
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - case-insensitive methods test</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[5]" />
+
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function method(method) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          client.open(method, "resources/content.py", false)
+          client.send(null)
+          assert_equals(client.getResponseHeader("x-request-method"), method.toUpperCase())
+        }, document.title + " (" + method.toUpperCase() + ")")
+      }
+      method("deLETE")
+      method("get")
+      method("heAd")
+      method("OpTIOns")
+      method("post")
+      method("Put")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive-expected.txt
new file mode 100644 (file)
index 0000000..75afa6d
--- /dev/null
@@ -0,0 +1,11 @@
+
+PASS XMLHttpRequest: open() - case-sensitive methods test (XUNICORN) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (xUNIcorn) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (chiCKEN) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (PATCH) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (patCH) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (copy) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (COpy) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (inDEX) 
+PASS XMLHttpRequest: open() - case-sensitive methods test (movE) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-case-sensitive.htm
new file mode 100644 (file)
index 0000000..270e32d
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - case-sensitive methods test</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[5]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function method(method) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          client.open(method, "resources/content.py", false)
+          client.send(null)
+          assert_equals(client.getResponseHeader("x-request-method"), method)
+        }, document.title + " (" + method + ")")
+      }
+      method("XUNICORN")
+      method("xUNIcorn")
+      method("chiCKEN")
+      method("PATCH")
+      method("patCH")
+      method("copy")
+      method("COpy")
+      method("inDEX")
+      method("movE")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure-expected.txt
new file mode 100644 (file)
index 0000000..1e89555
--- /dev/null
@@ -0,0 +1,11 @@
+
+PASS XMLHttpRequest: open() - "insecure" methods (track) 
+PASS XMLHttpRequest: open() - "insecure" methods (TRACK) 
+PASS XMLHttpRequest: open() - "insecure" methods (trAck) 
+PASS XMLHttpRequest: open() - "insecure" methods (TRACE) 
+PASS XMLHttpRequest: open() - "insecure" methods (trace) 
+PASS XMLHttpRequest: open() - "insecure" methods (traCE) 
+PASS XMLHttpRequest: open() - "insecure" methods (connect) 
+PASS XMLHttpRequest: open() - "insecure" methods (CONNECT) 
+PASS XMLHttpRequest: open() - "insecure" methods (connECT) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-insecure.htm
new file mode 100644 (file)
index 0000000..1a77ff3
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - "insecure" methods</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[5] following::ol/li[6]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function method(method) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          assert_throws("SecurityError", function() { client.open(method, "...") })
+        }, document.title + " (" + method + ")")
+      }
+      method("track")
+      method("TRACK")
+      method("trAck")
+      method("TRACE")
+      method("trace")
+      method("traCE")
+      method("connect")
+      method("CONNECT")
+      method("connECT")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync-expected.txt
new file mode 100644 (file)
index 0000000..8ae474b
--- /dev/null
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: line 19: Synchronous HTTP(S) requests made from the window context cannot have XMLHttpRequest.responseType set.
+CONSOLE MESSAGE: line 19: Synchronous HTTP(S) requests made from the window context cannot have XMLHttpRequest.responseType set.
+CONSOLE MESSAGE: line 19: Synchronous HTTP(S) requests made from the window context cannot have XMLHttpRequest.responseType set.
+CONSOLE MESSAGE: line 19: Synchronous HTTP(S) requests made from the window context cannot have XMLHttpRequest.responseType set.
+CONSOLE MESSAGE: line 19: Synchronous HTTP(S) requests made from the window context cannot have XMLHttpRequest.responseType set.
+
+PASS XMLHttpRequest: open() sync request not allowed if responseType is set (arraybuffer) 
+PASS XMLHttpRequest: open() sync request not allowed if responseType is set (blob) 
+PASS XMLHttpRequest: open() sync request not allowed if responseType is set (json) 
+PASS XMLHttpRequest: open() sync request not allowed if responseType is set (text) 
+PASS XMLHttpRequest: open() sync request not allowed if responseType is set (document) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm
new file mode 100644 (file)
index 0000000..543a139
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() sync request not allowed if responseType is set</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[4]" />
+
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      // Note: the case of calling synchronous open() first, and then setting
+      // responseType, is tested in responsetype.html.
+      function request(type) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          client.responseType = type
+          assert_throws("InvalidAccessError", function() { client.open('GET', "...", false) })
+        }, document.title + " (" + type + ")")
+      }
+      request("arraybuffer")
+      request("blob")
+      request("json")
+      request("text")
+      request("document")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send-expected.txt
new file mode 100644 (file)
index 0000000..9fee613
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() - open() - send() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-send.htm
new file mode 100644 (file)
index 0000000..ebc1801
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - open() - send()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[14]/ul/li[1] following::ol/li[14]/ul/li[2] following::ol/li[15]/ol/li[1] following::ol/li[15]/ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1,2,3,4]
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+            if(4 == client.readyState) {
+              assert_array_equals(result, expected)
+              assert_equals(client.responseText, 'top\n')
+              test.done()
+            }
+          })
+        }
+        client.open("GET", "resources/folder.txt")
+        client.open("GET", "folder.txt")
+        client.send(null)
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send-expected.txt
new file mode 100644 (file)
index 0000000..59276ee
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() - open() (sync) - send() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-open-sync-send.htm
new file mode 100644 (file)
index 0000000..b0badfd
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - open() (sync) - send()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[14]/ul/li[1] following::ol/li[14]/ul/li[2] following::ol/li[14]/ul/li[3] following::ol/li[15]/ol/li[1] following::ol/li[15]/ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1,4]
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+          })
+        }
+        client.open("GET", "folder.txt")
+        client.open("GET", "folder.txt", false)
+        client.send(null)
+        assert_equals(client.responseText, 'top\n')
+        assert_array_equals(result, expected)
+        test.done()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer-expected.txt
new file mode 100644 (file)
index 0000000..e234344
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() - value of Referer header 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-referer.htm
new file mode 100644 (file)
index 0000000..4ffdfe0
--- /dev/null
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - value of Referer header</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="/following::ol[1]/li[2]/ol[1]/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("POST", "resources/inspect-headers.py?filter_name=referer", false)
+        client.send(null)
+        assert_equals(client.responseText, "referer: "+location.href+'\n')
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open-expected.txt
new file mode 100644 (file)
index 0000000..3a0549c
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() - send() - open() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-send-open.htm
new file mode 100644 (file)
index 0000000..d57592c
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - send() - open()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[14]/ul/li[1] following::ol/li[14]/ul/li[2] following::ol/li[15]/ol/li[1] following::ol/li[15]/ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1, 'a', 'b', 'c']
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+          })
+        }
+        client.open("GET", "folder.txt")
+        result.push('a')
+        client.send()
+        result.push('b')
+        client.open("GET", "folder.txt")
+        result.push('c')
+        assert_array_equals(result, expected)
+        test.done()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send-expected.txt
new file mode 100644 (file)
index 0000000..8958333
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() (sync) - send() - open() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-sync-open-send.htm
new file mode 100644 (file)
index 0000000..cc81c52
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() (sync) - send() - open()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[14]/ul/li[1] following::ol[1]/li[14]/ul/li[2] following::ol[1]/li[14]/ul/li[3] following::ol[1]/li[15]/ol/li[1] following::ol[1]/li[15]/ol/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsexml-attribute" data-tested-assertations="following::ol[1]/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol[1]/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-status-attribute" data-tested-assertations="following::ol[1]/li[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-statustext-attribute" data-tested-assertations="following::ol[1]/li[1]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method" data-tested-assertations="following::ol[1]/li[1]" />
+
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var client = new XMLHttpRequest(),
+            result = [],
+            expected = [1]
+        client.onreadystatechange = function() {
+          test.step(function() {
+            result.push(client.readyState)
+          })
+        }
+        client.open("GET", "folder.txt")
+        client.send(null)
+        client.open("GET", "folder.txt", false)
+        assert_array_equals(result, expected)
+        assert_equals(client.responseXML, null)
+        assert_equals(client.responseText, "")
+        assert_equals(client.status, 0)
+        assert_equals(client.statusText, "")
+        assert_equals(client.getAllResponseHeaders(), "")
+        test.done()
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window-expected.txt
new file mode 100644 (file)
index 0000000..99d4206
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+PASS XMLHttpRequest: open() resolving URLs (about:blank iframe) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-about-blank-window.htm
new file mode 100644 (file)
index 0000000..5be3b77
--- /dev/null
@@ -0,0 +1,23 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (about:blank iframe)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[2]/ol/li[2] following::ol/li[7] following::ol/li[14]/ul/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[4]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#concept-xmlhttprequest-document" data-tested-assertations=".." />
+  </head>
+  <body>
+    <div id="log"></div>
+    <iframe src="about:blank"></iframe>
+    <script>
+      test(function() {
+        var client = new self[0].XMLHttpRequest()
+        client.open("GET", "folder.txt", false)
+        client.send("")
+        assert_equals(client.responseText, "top\n")
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-expected.txt
new file mode 100644 (file)
index 0000000..b27ffd1
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() resolving URLs - <base> 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open-expected.txt
new file mode 100644 (file)
index 0000000..ea5fffd
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() resolving URLs - insert <base> after open() 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-after-open.htm
new file mode 100644 (file)
index 0000000..a4d641f
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs - insert &lt;base> after open()</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[2]/ol/li[2] following::ol/li[7] following::ol/li[14]/ul/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest(),
+            base = document.createElement("base")
+        base.href = location.href.replace(/\/[^/]*$/, '') + "/resources/"
+        client.open("GET", "folder.txt", false)
+        document.getElementsByTagName("head")[0].appendChild(base)
+        client.send(null)
+        assert_equals(client.responseText, "top\n")
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted-expected.txt
new file mode 100644 (file)
index 0000000..30d3df2
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() resolving URLs - insert <base> 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base-inserted.htm
new file mode 100644 (file)
index 0000000..69ad619
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs - insert &lt;base></title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[2]/ol/li[2] following::ol/li[7] following::ol/li[14]/ul/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest(),
+            base = document.createElement("base")
+        base.href = location.href.replace(/\/[^/]*$/, '') + "/resources/"
+        document.getElementsByTagName("head")[0].appendChild(base)
+        client.open("GET", "folder.txt", false)
+        client.send(null)
+        assert_equals(client.responseText, "bottom\n")
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-base.htm
new file mode 100644 (file)
index 0000000..3c0e8c9
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs - &lt;base></title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <base href="./resources/">
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[2]/ol/li[2] following::ol/li[7] following::ol/li[14]/ul/li[2]" />
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "folder.txt", false)
+        client.send(null)
+        assert_equals(client.responseText, "bottom\n")
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt
new file mode 100644 (file)
index 0000000..9251868
--- /dev/null
@@ -0,0 +1,4 @@
+
+FAIL XMLHttpRequest: open() - bogus URLs (http:) assert_throws: function "function () { client.open("GET", url) }" did not throw
+FAIL XMLHttpRequest: open() - bogus URLs (http://a a/) assert_throws: function "function () { client.open("GET", url) }" did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-bogus.htm
new file mode 100644 (file)
index 0000000..a4e296d
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - bogus URLs</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[7] following::ol/li[8]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function url(url) {
+        test(function() {
+          var client = new XMLHttpRequest()
+          assert_throws("SyntaxError", function() { client.open("GET", url) })
+        }, document.title + " (" + url + ")")
+      }
+      url("http:")
+      url("http://a a/")
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding-expected.txt
new file mode 100644 (file)
index 0000000..90775fb
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: open() - URL encoding assert_equals: expected "%C3%9F" but got "%DF"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-encoding.htm
new file mode 100644 (file)
index 0000000..a545d41
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset=windows-1252>
+    <title>XMLHttpRequest: open() - URL encoding</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[7] following::ol/li[14]/ul/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "resources/content.py?ß", false)
+        client.send(null)
+        assert_equals(client.getResponseHeader("x-request-query"), "%C3%9F")
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment-expected.txt
new file mode 100644 (file)
index 0000000..6363c38
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS XMLHttpRequest: open() resolving URLs - fragment identifier 
+PASS make sure fragment is removed from URL before request 
+PASS make sure fragment is removed from URL before request (with query string) 
+PASS make sure escaped # is not removed 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-fragment.htm
new file mode 100644 (file)
index 0000000..6b3fdeb
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs - fragment identifier</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[7]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "folder.txt#foobar", false)
+        client.send(null)
+        assert_equals(client.responseText, "top\n")
+      })
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "resources/requri.py#foobar", false)
+        client.send(null)
+        assert_regexp_match(client.responseText, /XMLHttpRequest\/resources\/requri\.py$/)
+      }, 'make sure fragment is removed from URL before request')
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "resources/requri.py?help=#foobar", false)
+        client.send(null)
+        assert_regexp_match(client.responseText, /XMLHttpRequest\/resources\/requri\.py\?help=$/)
+      }, 'make sure fragment is removed from URL before request (with query string)')
+      test(function() {
+        var client = new XMLHttpRequest()
+        client.open("GET", "resources/requri.py?" +encodeURIComponent("#foobar"), false)
+        client.send(null)
+        assert_regexp_match(client.responseText, /XMLHttpRequest\/resources\/requri\.py\?%23foobar$/)
+      }, 'make sure escaped # is not removed')
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2-expected.txt
new file mode 100644 (file)
index 0000000..1bc4cc3
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+PASS XMLHttpRequest: open() - resolving URLs (javascript: <iframe>; 2) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-2.htm
new file mode 100644 (file)
index 0000000..f5ddd42
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - resolving URLs (javascript: &lt;iframe>; 2)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[2]/ol[1]/li[2] following::ol[1]/li[7] following::ol[1]/li[14]/ul/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      test.step(function() {
+        var iframe = document.body.appendChild(document.createElement("iframe"))
+        iframe.src = "javascript:parent.test.step(function() { var x = new XMLHttpRequest(); x.open('GET', 'folder.txt', false); x.send(null); parent.assert_equals(x.responseText, 'top\\n'); parent.test.done() })"
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window-expected.txt
new file mode 100644 (file)
index 0000000..fcbb11e
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+PASS XMLHttpRequest: open() - resolving URLs (javascript: <iframe>; 1) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-javascript-window.htm
new file mode 100644 (file)
index 0000000..cd208d5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - resolving URLs (javascript: &lt;iframe>; 1)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[2]/ol[1]/li[2] following::ol[1]/li[7] following::ol[1]/li[14]/ul/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      function request() {
+        test.step(function() {
+          var x = new XMLHttpRequest()
+          x.open("GET", "folder.txt", false)
+          x.send(null)
+          assert_equals(x.responseText, "top\n")
+          test.done()
+        })
+      }
+      test.step(function() {
+        var iframe = document.body.appendChild(document.createElement("iframe"))
+        iframe.src = "javascript:parent.request()"
+      })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2-expected.txt
new file mode 100644 (file)
index 0000000..6222030
--- /dev/null
@@ -0,0 +1,4 @@
+
+FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 2; evil) assert_throws: open() when associated document's IFRAME is removed function "function () { 
+            client.open("GET", "folder.txt..." did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-2.htm
new file mode 100644 (file)
index 0000000..398764e
--- /dev/null
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 2; evil)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[2]/ol[1]/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+    function init(){ // called from page inside IFRAME
+        test(function() {
+          var client = new self[0].XMLHttpRequest()
+          document.body.removeChild(document.getElementsByTagName("iframe")[0])
+          assert_throws("InvalidStateError", function() { 
+            client.open("GET", "folder.txt") 
+          }, "open() when associated document's IFRAME is removed")
+          })
+      }
+    </script>
+    <iframe src="resources/init.htm"></iframe>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3-expected.txt
new file mode 100644 (file)
index 0000000..9096fdd
--- /dev/null
@@ -0,0 +1,5 @@
+
+FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 3; evil) assert_throws: send() when associated document's IFRAME is removed function "function () { 
+            client.send(null)
+          }" did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-3.htm
new file mode 100644 (file)
index 0000000..b3652df
--- /dev/null
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 3; evil)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      function init() {
+        test(function() {
+          var client = new self[0].XMLHttpRequest()
+          client.open("GET", "folder.txt")
+          document.body.removeChild(document.getElementsByTagName("iframe")[0])
+          assert_throws("InvalidStateError", function() { 
+            client.send(null)
+          }, "send() when associated document's IFRAME is removed")
+        })
+      }
+    </script>
+    <iframe src="resources/init.htm"></iframe>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt
new file mode 100644 (file)
index 0000000..d25ee5a
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil) assert_true: should get an error event expected true got false
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4.htm
new file mode 100644 (file)
index 0000000..9ddbb9b
--- /dev/null
@@ -0,0 +1,50 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+    /*
+    It's unclear what the pass condition should be for this test.
+    Implementations:
+    Firefox, Opera (Presto): terminate request with no further events when IFRAME is removed. 
+    Chrome: completes request to readyState=4 but responseText is "" so it's pretty much terminated with an extra event for "DONE" state
+    Pass condition is now according to my suggested spec text in https://github.com/whatwg/xhr/pull/3 , if that's not accepted we'll have to amend this test
+    */
+      var test = async_test()
+      function init() {
+        test.step(function() {
+          var hasErrorEvent = false
+          var client = new self[0].XMLHttpRequest()
+          client.onreadystatechange = function() { 
+            test.step(function() {
+              if(client.readyState == 4) {
+                assert_equals(client.responseText, "", "responseText is empty on inactive document error condition")
+              }
+            })
+          }
+          client.addEventListener('error', function(){
+            test.step(function() {
+              hasErrorEvent = true
+              assert_equals(client.readyState, 4, "readyState is 4 when error listener fires")
+            })
+          })
+          client.addEventListener('loadend', function(){
+            test.step(function() {
+              assert_true(hasErrorEvent, "should get an error event")
+              test.done()
+            })
+          })
+          client.open("GET", "folder.txt")
+          client.send(null)
+          document.body.removeChild(document.getElementsByTagName("iframe")[0])
+        })
+      }
+    </script>
+    <iframe src="resources/init.htm"></iframe>
+ </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5-expected.txt
new file mode 100644 (file)
index 0000000..2163de7
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 5) assert_throws: function "function () { client.open("GET", "...") }" did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-5.htm
new file mode 100644 (file)
index 0000000..a27d2b3
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 5)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[2]/ol[1]/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test(),
+          client,
+          count = 0
+      function init() {
+        test.step(function() {
+          if(0 == count) {
+            client = new self[0].XMLHttpRequest()
+            count++
+            self[0].location.reload()
+          } else if(1 == count) {
+            assert_throws("InvalidStateError", function() { client.open("GET", "...") })
+            test.done()
+          }
+        })
+      }
+    </script>
+    <iframe src="resources/init.htm"></iframe>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-expected.txt
new file mode 100644 (file)
index 0000000..ca34f09
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+PASS XMLHttpRequest: open() resolving URLs (multi-Window; 1) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window.htm
new file mode 100644 (file)
index 0000000..b84aaa5
--- /dev/null
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 1)</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[2]/ol[1]/li[2] following::ol[1]/li[7] following::ol[1]/li[14]/ul/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test()
+      function init() {
+        test.step(function() {
+          var client = new self[0].XMLHttpRequest()
+          client.onreadystatechange = function() {
+            test.step(function() {
+              if(client.readyState == 4)
+                assert_equals(client.responseText, "bottom\n")
+                test.done()
+            })
+          }
+          client.open("GET", "folder.txt")
+          client.send("")
+        })
+      }
+    </script>
+    <iframe src="resources/init.htm"></iframe>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple-expected.txt
new file mode 100644 (file)
index 0000000..800abfc
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: relative URLs in worker scripts resolved by script URL 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-worker-simple.htm
new file mode 100644 (file)
index 0000000..f0613c1
--- /dev/null
@@ -0,0 +1,26 @@
+ <!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>XMLHttpRequest: relative URLs in worker scripts resolved by script URL</title>
+    <link rel="stylesheet" href="/resources/testharness.css" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::OL[1]/LI[3] following::OL[1]/LI[3]/ol[1]/li[1]" />
+</head>
+<body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var test = async_test()
+        var worker = new Worker("resources/workerxhr-simple.js")
+       worker.onmessage = function (e) {
+            test.step(function(){
+                assert_equals(e.data, 'PASSED')
+                test.done()
+            })
+        }
+        worker.postMessage('start')
+    </script>
+</body>
+</html>
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin-expected.txt
new file mode 100644 (file)
index 0000000..846d73e
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: open() - user/pass argument and non same-origin URL doesn't throw 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm
new file mode 100644 (file)
index 0000000..e49888c
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>XMLHttpRequest: open() - user/pass argument and non same-origin URL doesn't throw</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[9]/ol/li[1] following::ol/li[9]/ol/li[2] following::ol/li[15]/ol/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var m = "GET",
+          u = "http://test2.w3.org/",
+          a = false
+        test(function() {
+          var client = new XMLHttpRequest()
+          client.open(m, u, a, "x")
+          assert_equals(client.readyState, 1, "open() was successful - 1")
+          var client2 = new XMLHttpRequest()
+          client2.open(m, u, a, "x", "x")
+          assert_equals(client2.readyState, 1, "open() was successful - 2")
+        })
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state-expected.txt
new file mode 100644 (file)
index 0000000..86efa4d
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: overrideMimeType() in DONE state 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-done-state.htm
new file mode 100644 (file)
index 0000000..a1711e6
--- /dev/null
@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: overrideMimeType() in DONE state</title>
+    <meta charset="utf-8">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-overridemimetype()-method" data-tested-assertations="/following::ol/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      var client = new XMLHttpRequest();
+      client.onreadystatechange = test.step_func( function() {
+        if (client.readyState !== 4) return;
+        assert_throws("InvalidStateError", function() { client.overrideMimeType('application/xml;charset=Shift-JIS'); });
+        assert_equals(client.responseXML, null);
+        test.done();
+      });
+      client.open("GET", "resources/status.py?type="+encodeURIComponent('text/plain;charset=iso-8859-1')+'&content=%3Cmsg%3E%83%65%83%58%83%67%3C%2Fmsg%3E');
+      client.send();
+    </script>
+
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis-expected.txt
new file mode 100644 (file)
index 0000000..e22eb3c
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: overrideMimeType() in HEADERS RECEIVED state, enforcing Shift-JIS encoding 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm
new file mode 100644 (file)
index 0000000..578e28c
--- /dev/null
@@ -0,0 +1,34 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: overrideMimeType() in HEADERS RECEIVED state, enforcing Shift-JIS encoding</title>
+    <meta charset="utf-8">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-overridemimetype()-method" data-tested-assertations="/following::ol/li[1] /following::ol/li[4]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      var client = new XMLHttpRequest();
+      var readyState2Reached = false;
+      client.onreadystatechange = test.step_func( function() {
+        if(client.readyState===2){
+          readyState2Reached = true;
+          try{
+            client.overrideMimeType('text/plain;charset=Shift-JIS');
+          }catch(e){
+            assert_unreached('overrideMimeType should not throw in state 2');
+          }
+        }
+        if (client.readyState !== 4) return;
+        assert_equals( readyState2Reached, true, "readyState = 2 event fired" );
+        assert_equals( client.responseText, 'テスト', 'overrideMimeType() in HEADERS RECEIVED state set encoding' );
+        test.done();
+      });
+      client.open("GET", "resources/status.py?type="+encodeURIComponent('text/html;charset=UTF-8')+'&content=%83%65%83%58%83%67');
+      client.send( '' );
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt
new file mode 100644 (file)
index 0000000..a991103
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL XMLHttpRequest: overrideMimeType() in unsent state, invalid MIME types assert_throws: function "function () { client.overrideMimeType('text\\plain;charse..." did not throw
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm
new file mode 100644 (file)
index 0000000..9cfd801
--- /dev/null
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: overrideMimeType() in unsent state, invalid MIME types</title>
+    <meta charset="utf-8">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-overridemimetype()-method" data-tested-assertations="/following::ol/li[2]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      test(function() {
+        var client = new XMLHttpRequest();
+        assert_throws("SyntaxError", function() { client.overrideMimeType('text\\plain;charset=Shift-JIS'); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType('text plain;charset=Shift-JIS'); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType('text\nplain;charset=Shift-JIS'); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType('cahrset=Shift-JIS'); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType(null); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType(50212); });
+        assert_throws("SyntaxError", function() { client.overrideMimeType( (new Array(1000)).join('a/b/c/') ); });
+      });
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state-expected.txt
new file mode 100644 (file)
index 0000000..5566ae3
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: overrideMimeType() in LOADING state 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-loading-state.htm
new file mode 100644 (file)
index 0000000..cce3fa4
--- /dev/null
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+  <head>
+    <title>XMLHttpRequest: overrideMimeType() in LOADING state</title>
+    <meta charset="utf-8">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <link rel="help" href="https://xhr.spec.whatwg.org/#the-overridemimetype()-method" data-tested-assertations="/following::ol/li[1]" />
+  </head>
+  <body>
+    <div id="log"></div>
+    <script>
+      var test = async_test();
+      test.step(function() {
+        var client = new XMLHttpRequest();
+        client.onreadystatechange = test.step_func(function() {
+          if (client.readyState === 3){
+            assert_throws("InvalidStateError", function(){
+              client.overrideMimeType('application/xml;charset=Shift-JIS');
+            });
+          }else if(client.readyState===4){
+            assert_equals(client.responseXML, null);
+            test.done();
+          }
+        });
+        client.open("GET", "resources/status.py?type="+encodeURIComponent('text/plain;charset=iso-8859-1')+'&content=%3Cmsg%3E%83%65%83%58%83%67%3C%2Fmsg%3E');
+        client.send();
+      });
+    </script>
+
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8-expected.txt
new file mode 100644 (file)
index 0000000..845d4ec
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS XMLHttpRequest: overrideMimeType() in open state, enforcing UTF-8 encoding 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm b/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm
new file mode 100644 (file)
index 0000000..5a26100
--- /dev/null
@@ -0,0 +1,27 @@