Resync WPT fetch tests to 834eac4
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2019 20:31:49 +0000 (20:31 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2019 20:31:49 +0000 (20:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193125

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/fetch: Resynced.
* web-platform-tests/html/webappapis/atob/base64-expected.txt:

LayoutTests:

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/imported/w3c/web-platform-tests/fetch/content-type/response.window-expected.txt: Added.
* platform/ios-wk1/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/304-update-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/heuristic-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/invalidate-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/status-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub-expected.txt: Added.
* platform/mac/TestExpectations:
* tests-options.json:

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

495 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/common/subset-tests-by-key.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/META.yml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/OWNERS [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js with 96% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.worker-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js with 91% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.js with 86% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.js
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js with 92% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.worker-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js with 88% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.worker-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/sandboxed-iframe-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/credentials/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/header-values-normalize.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/header-values.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt with 89% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.js with 89% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.js with 95% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.worker-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.js with 96% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.js [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.js with 90% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.js with 96% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl-worker.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.any.js [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.js with 89% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.any.worker-expected.txt [moved from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl-worker-expected.txt with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination-prefetch.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination-prefetch.https.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination.https.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/destination/resources/fetch-destination-worker-no-load-event.js
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/destination/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/multi-globals/current/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/multi-globals/incumbent/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/multi-globals/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-idl-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-idl.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-002-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-002.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-structure-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-structure.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/cache.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/hello.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/request-reset-attributes-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/authentication.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/bad-chunk-encoding.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/cors-top.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/cors-top.txt.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/echo-content.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/empty.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/inspect-headers.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/keepalive-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/preflight.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/redirect-empty-location.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/redirect.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/sandboxed-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/trickle.py
LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/multi-globals/current/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/multi-globals/incumbent/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/multi-globals/relevant/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/multi-globals/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-cancel-stream.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-from-stream.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-from-stream.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-from-stream.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-from-stream.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-from-stream.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-idl-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-idl.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-001-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-001.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-static-redirect.html
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-with-broken-then.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-with-broken-then.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-with-broken-then.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-with-broken-then.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-with-broken-then.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/api/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/bad-gzip-body.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-length/content-length-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-length/content-length.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-length/content-length.html.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-length/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/README.md [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/resources/content-type.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/resources/content-types.json [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/resources/script-content-types.json [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/response.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/response.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/response.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/script.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/script.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/content-type/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/README.md [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-html-correctly-labeled.sub-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-html-correctly-labeled.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-png-mislabeled-as-html.sub-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/img-png-mislabeled-as-html.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/css-mislabeled-as-html.css [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/css-mislabeled-as-html.css.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/css-with-json-parser-breaker.css [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/empty-labeled-as-png.png [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/empty-labeled-as-png.png.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-correctly-labeled.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-correctly-labeled.html.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-js-polyglot.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-js-polyglot.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-js-polyglot2.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/html-js-polyglot2.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/js-mislabeled-as-html.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/js-mislabeled-as-html.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-correctly-labeled.png [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-correctly-labeled.png.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-mislabeled-as-html.png [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/png-mislabeled-as-html.png.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/sniffable-resource.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/subframe-that-posts-html-containing-blob-url-to-parent.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-correctly-labeled.tentative.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-correctly-labeled.tentative.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-js-polyglot.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-js-polyglot.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-via-cross-origin-blob-url.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-html-via-cross-origin-blob-url.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-js-mislabeled-as-html-nosniff.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-js-mislabeled-as-html-nosniff.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-js-mislabeled-as-html.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-js-mislabeled-as-html.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-mislabeled-as-html-nosniff.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-mislabeled-as-html.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-mislabeled-as-html.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-with-json-parser-breaker.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-css-with-json-parser-breaker.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-html-correctly-labeled.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/style-html-correctly-labeled.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/corb/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/idlharness.tentative.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cors-rfc1918/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.html
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/README.md [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/base64.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/base64.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/base64.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/base64.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/base64.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/processing.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/resources/base64.json
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/resources/data-urls.json [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/304-update-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/304-update.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/README.md
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/basic-auth-cache-test-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/basic-auth-cache-test.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/freshness-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/freshness.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/heuristic-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/heuristic.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/http-cache.js
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/invalidate-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/invalidate.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/partial-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/partial.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/resources/http-cache.py
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/resources/securedimage.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/vary-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/vary.html
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/images/canvas-remote-read-remote-image-redirect-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/images/canvas-remote-read-remote-image-redirect.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/images/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/image-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/image.html
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/css.py
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/image.py
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/js.py
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-first.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-last.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-no-x.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-quoted-single.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-quoted.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff-uppercase.asis [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/nosniff.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/worker.py
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/x-content-type-options.json [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/resources/redirect-and-stash.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/origin/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/range/general.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/range/general.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/range/resources/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/range/sw.https.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/range/sw.https.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/range/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/redirect-navigate/302-found-post-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/redirect-navigate/302-found-post-handler.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/redirect-navigate/302-found-post.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/redirect-navigate/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/README.md [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/fetch.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/fetch.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/iframe.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/iframe.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/img.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/img.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/redirect/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/report.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/report.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/report.tentative.https.sub.html.sub.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/dedicatedWorker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/echo-as-json.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/echo-as-script.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/helper.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/record-header.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/sharedWorker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/resources/xslt-test.sub.xml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/script.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/script.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/track.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/track.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/window-open.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/window-open.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/worker.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/worker.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/xslt.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/sec-metadata/xslt.tentative.https.sub.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
LayoutTests/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation.tentative-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/security/redirect-to-url-with-credentials.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/security/redirect-to-url-with-credentials.https.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/security/support/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/security/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/fetch/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/atob/base64-expected.txt
LayoutTests/imported/w3c/web-platform-tests/interfaces/fetch.idl [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/interfaces/referrer-policy.idl [new file with mode: 0644]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/fetch/content-type/response.window-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/304-update-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/heuristic-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/invalidate-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/status-expected.txt
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
LayoutTests/tests-options.json

index d0cf934..ccb3f98 100644 (file)
@@ -1,3 +1,30 @@
+2019-01-07  Youenn Fablet  <youenn@apple.com>
+
+        Resync WPT fetch tests to 834eac4
+        https://bugs.webkit.org/show_bug.cgi?id=193125
+
+        Reviewed by Chris Dumez.
+
+        * TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/ios-simulator/imported/w3c/web-platform-tests/fetch/content-type/response.window-expected.txt: Added.
+        * platform/ios-wk1/TestExpectations:
+        * platform/ios/TestExpectations:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any-expected.txt: Added.
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https-expected.txt: Added.
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt: Added.
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/304-update-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/heuristic-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/invalidate-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/status-expected.txt:
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub-expected.txt: Added.
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub-expected.txt: Added.
+        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub-expected.txt: Added.
+        * platform/mac/TestExpectations:
+        * tests-options.json:
+
 2019-01-07  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Native caret shows up alongside the page's caret when requesting desktop site on jsfiddle.net
index 4d5c642..2e835ad 100644 (file)
@@ -261,8 +261,6 @@ http/tests/security/frame-loading-via-document-write-async-delegates.html [ Dump
 imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker.html [ DumpJSConsoleLogInStdErr ]
-imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker.html [ DumpJSConsoleLogInStdErr ]
-imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.html [ DumpJSConsoleLogInStdErr ]
 
 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-response-taint.https.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html [ DumpJSConsoleLogInStdErr ]
@@ -302,7 +300,6 @@ imported/w3c/web-platform-tests/workers/constructors/SharedWorker [ Skip ]
 imported/w3c/web-platform-tests/workers/SharedWorker_blobUrl.html [ Skip ]
 
 imported/w3c/web-platform-tests/beacon/beacon-basic-blob.html [ DumpJSConsoleLogInStdErr ]
-imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.worker.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/xhr/access-control-and-redirects.htm [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/xhr/access-control-basic-cors-safelisted-request-headers.htm [ DumpJSConsoleLogInStdErr ]
@@ -382,9 +379,23 @@ webkit.org/b/189905 imported/w3c/web-platform-tests/resource-timing/resource_ini
 webkit.org/b/189910 imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html [ Pass Failure ]
 webkit.org/b/190523 imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html [ Pass Failure ]
 
-# These tests time out
+# These fetch tests are flaky or fail.
+imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.html [ Pass Failure ]
+imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker.html [ Pass Failure ]
+imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.html [ Pass Failure ]
+imported/w3c/web-platform-tests/fetch/http-cache/basic-auth-cache-test.html [ ImageOnlyFailure ]
+
+# Fetch fetatures that are not implemented.
+imported/w3c/web-platform-tests/fetch/corb [ Skip ]
+imported/w3c/web-platform-tests/fetch/sec-metadata [ Skip ]
+
+# These fetch tests time out
 imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination-no-load-event.https.html [ Skip ]
 imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination.https.html [ Skip ]
+imported/w3c/web-platform-tests/fetch/range/sw.https.window.html [ Skip ]
+imported/w3c/web-platform-tests/fetch/content-encoding/bad-gzip-body.any.worker.html [ Skip ]
+imported/w3c/web-platform-tests/fetch/api/request/destination/fetch-destination-prefetch.https.html [ Skip ]
+imported/w3c/web-platform-tests/fetch/content-type/response.window.html [ Skip ]
 
 # Not supported
 imported/w3c/web-platform-tests/background-fetch [ Skip ]
@@ -750,6 +761,9 @@ imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.any.html [
 imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/fetch/content-type/script.window.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.html [ DumpJSConsoleLogInStdErr ]
 
 webkit.org/b/161088 imported/w3c/web-platform-tests/resource-timing/resource-timing.html [ Pass Failure ]
 imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html [ Pass Failure ]
index 60ce651..ece7759 100644 (file)
@@ -1,3 +1,13 @@
+2019-01-07  Youenn Fablet  <youenn@apple.com>
+
+        Resync WPT fetch tests to 834eac4
+        https://bugs.webkit.org/show_bug.cgi?id=193125
+
+        Reviewed by Chris Dumez.
+
+        * web-platform-tests/fetch: Resynced.
+        * web-platform-tests/html/webappapis/atob/base64-expected.txt:
+
 2019-01-05  Youenn Fablet  <youenn@apple.com>
 
         Service Worker fetch should obey its referrer policy
index 0a92e1c..34ab4ee 100644 (file)
     "web-platform-tests/infrastructure": "import", 
     "web-platform-tests/innerText": "import", 
     "web-platform-tests/input-events": "skip", 
-    "web-platform-tests/interfaces": "skip", 
+    "web-platform-tests/interfaces": "import", 
     "web-platform-tests/intersection-observer": "import", 
     "web-platform-tests/js": "skip", 
     "web-platform-tests/keyboard-lock": "skip", 
     "web-platform-tests/worklets": "skip", 
     "web-platform-tests/x-frame-options": "skip", 
     "web-platform-tests/xhr": "import"
-}
\ No newline at end of file
+}
diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/subset-tests-by-key.js b/LayoutTests/imported/w3c/web-platform-tests/common/subset-tests-by-key.js
new file mode 100644 (file)
index 0000000..d87ea9f
--- /dev/null
@@ -0,0 +1,76 @@
+// Only test a subset of tests with ?include=Foo or ?exclude=Foo in the URL.
+// Can be used together with <meta name="variant" content="...">
+// Sample usage:
+// for (const test of tests) {
+//   subsetTestByKey("Foo", async_test, test.fn, test.name);
+// }
+(function() {
+  var subTestKeyPattern = null;
+  var match;
+  var collectKeys = false;
+  var collectCounts = false;
+  var keys = {};
+  var exclude = false;
+  if (location.search) {
+    match = /(?:^\?|&)(include|exclude)=([^&]+)?/.exec(location.search);
+    if (match) {
+      subTestKeyPattern = new RegExp(`^${match[2]}$`);
+      if (match[1] === 'exclude') {
+        exclude = true;
+      }
+    }
+    // Below is utility code to generate <meta> for copy/paste into tests.
+    // Sample usage:
+    // test.html?get-keys
+    match = /(?:^\?|&)get-keys(&get-counts)?(?:&|$)/.exec(location.search);
+    if (match) {
+      collectKeys = true;
+      if (match[1]) {
+        collectCounts = true;
+      }
+      add_completion_callback(() => {
+        var metas = [];
+        var template = '<meta name="variant" content="?include=%s">';
+        if (collectCounts) {
+          template += ' <!--%s-->';
+        }
+        for (var key in keys) {
+          var meta = template.replace("%s", key);
+          if (collectCounts) {
+            meta = meta.replace("%s", keys[key]);
+          }
+          metas.push(meta);
+        }
+        var pre = document.createElement('pre');
+        pre.textContent = metas.join('\n') + '\n';
+        document.body.insertBefore(pre, document.body.firstChild);
+        document.getSelection().selectAllChildren(pre);
+      });
+    }
+  }
+  function shouldRunSubTest(key) {
+    if (key && subTestKeyPattern) {
+      var found = subTestKeyPattern.test(key);
+      if (exclude) {
+        return !found;
+      }
+      return found;
+    }
+    return true;
+  }
+  function subsetTestByKey(key, testFunc, ...args) {
+    if (collectKeys) {
+      if (collectCounts && key in keys) {
+        keys[key]++;
+      } else {
+        keys[key] = 1;
+      }
+    }
+    if (shouldRunSubTest(key)) {
+      return testFunc(...args);
+    }
+    return null;
+  }
+  self.shouldRunSubTest = shouldRunSubTest;
+  self.subsetTestByKey = subsetTestByKey;
+})();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/META.yml b/LayoutTests/imported/w3c/web-platform-tests/fetch/META.yml
new file mode 100644 (file)
index 0000000..43f9dc5
--- /dev/null
@@ -0,0 +1,8 @@
+spec: https://fetch.spec.whatwg.org/
+suggested_reviewers:
+  - jdm
+  - youennf
+  - annevk
+  - mnot
+  - yutakahirano
+  - domfarolino
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/OWNERS b/LayoutTests/imported/w3c/web-platform-tests/fetch/OWNERS
deleted file mode 100644 (file)
index e2f2428..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@jdm
-@youennf
-@annevk
-@mnot
-@yutakahirano
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context-expected.txt
new file mode 100644 (file)
index 0000000..4298651
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS aborting a fetch in a destroyed context should not crash 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context.html
new file mode 100644 (file)
index 0000000..161d39b
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+// This is a regression test for crbug.com/860063.
+window.controller = new AbortController();
+async_test(t => {
+  onmessage = t.step_func(event => {
+    assert_equals(event.data, 'started');
+    const iframe = document.querySelector('iframe');
+    document.body.removeChild(iframe);
+    controller.abort();
+    t.done();
+  });
+}, 'aborting a fetch in a destroyed context should not crash');
+</script>
+<iframe srcdoc="
+                <!DOCTYPE html>
+                <meta charset=utf-8>
+                <script>
+                fetch('../resources/infinite-slow-response.py', { signal: parent.controller.signal }).then(() => {
+                  parent.postMessage('started', '*');
+                });
+                </script>
+                ">
+</iframe>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https-expected.txt
deleted file mode 100644 (file)
index 471bc34..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-
-PASS Aborting rejects with AbortError 
-PASS Aborting rejects with AbortError - no-cors 
-PASS TypeError from request constructor takes priority - RequestInit's window is not null 
-PASS TypeError from request constructor takes priority - Input URL is not valid 
-PASS TypeError from request constructor takes priority - Input URL has credentials 
-PASS TypeError from request constructor takes priority - RequestInit's mode is navigate 
-PASS TypeError from request constructor takes priority - RequestInit's referrer is invalid 
-PASS TypeError from request constructor takes priority - RequestInit's method is invalid 
-PASS TypeError from request constructor takes priority - RequestInit's method is forbidden 
-PASS TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple 
-PASS TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin 
-PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors 
-PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors 
-PASS TypeError from request constructor takes priority - Bad referrerPolicy init parameter value 
-PASS TypeError from request constructor takes priority - Bad mode init parameter value 
-PASS TypeError from request constructor takes priority - Bad credentials init parameter value 
-PASS TypeError from request constructor takes priority - Bad cache init parameter value 
-PASS TypeError from request constructor takes priority - Bad redirect init parameter value 
-PASS Request objects have a signal property 
-PASS Signal on request object 
-PASS Signal on request object created from request object 
-PASS Signal on request object created from request object, with signal on second request 
-PASS Signal on request object created from request object, with signal on second request overriding another 
-PASS Signal retained after unrelated properties are overridden by fetch 
-PASS Signal removed by setting to null 
-PASS Already aborted signal rejects immediately 
-PASS Request is still 'used' if signal is aborted before fetching 
-PASS response.arrayBuffer() rejects if already aborted 
-PASS response.blob() rejects if already aborted 
-PASS response.formData() rejects if already aborted 
-PASS response.json() rejects if already aborted 
-PASS response.text() rejects if already aborted 
-PASS Already aborted signal does not make request 
-PASS Already aborted signal can be used for many fetches 
-PASS Signal can be used to abort other fetches, even if another fetch succeeded before aborting 
-PASS Underlying connection is closed when aborting after receiving response 
-PASS Underlying connection is closed when aborting after receiving response - no-cors 
-PASS Fetch aborted & connection closed when aborted after calling response.arrayBuffer() 
-PASS Fetch aborted & connection closed when aborted after calling response.blob() 
-FAIL Fetch aborted & connection closed when aborted after calling response.formData() assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20
-PASS Fetch aborted & connection closed when aborted after calling response.json() 
-PASS Fetch aborted & connection closed when aborted after calling response.text() 
-PASS Stream errors once aborted. Underlying connection closed. 
-PASS Stream errors once aborted, after reading. Underlying connection closed. 
-PASS Stream will not error if body is empty. It's closed with an empty queue before it errors. 
-FAIL Readable stream synchronously cancels with AbortError if aborted before reading assert_true: Cancel called sync expected true got false
-PASS Signal state is cloned 
-PASS Clone aborts with original controller 
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html
deleted file mode 100644 (file)
index 74de287..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>General fetch abort tests in a service worker</title>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<script>
-  (async function() {
-    const scope = 'does/not/exist';
-
-    let reg = await navigator.serviceWorker.getRegistration(scope);
-    if (reg) await reg.unregister();
-
-    reg = await navigator.serviceWorker.register('general.any.worker.js', {scope});
-
-    fetch_tests_from_worker(reg.installing);
-  })();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker-expected.txt
deleted file mode 100644 (file)
index ad1d34e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONSOLE MESSAGE: line 11: ReferenceError: Can't find variable: SharedWorker
-
-FAIL General fetch abort tests - shared worker ReferenceError: Can't find variable: SharedWorker
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker.html
deleted file mode 100644 (file)
index 9378e16..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>General fetch abort tests - shared worker</title>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<script>
-  fetch_tests_from_worker(new SharedWorker("general.any.worker.js"));
-</script>
-</body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive-expected.txt
new file mode 100644 (file)
index 0000000..6196e3d
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS aborting a keepalive fetch should work 
+PASS aborting a detached keepalive fetch should not do anything 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive.html
new file mode 100644 (file)
index 0000000..db12df0
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/utils.js"></script>
+<script>
+// This controller must be on the window so it is visible to the iframe.
+window.sharedController = new AbortController();
+
+async function fetchJson(url) {
+  const response = await fetch(url);
+  assert_true(response.ok, 'response should be ok');
+  return response.json();
+}
+
+promise_test(async () => {
+  const stateKey = token();
+  const controller = new AbortController();
+  await fetch(`../resources/infinite-slow-response.py?stateKey=${stateKey}`,
+              {
+                signal: controller.signal,
+                keepalive: true
+              });
+  const before = await fetchJson(`../resources/stash-take.py?key=${stateKey}`);
+  assert_equals(before, 'open', 'connection should be open');
+
+  controller.abort();
+
+  // Spin until the abort completes.
+  while (true) {
+    const after = await fetchJson(`../resources/stash-take.py?key=${stateKey}`);
+    if (after) {
+      // stateKey='open' was removed from the dictionary by the first fetch of
+      // stash-take.py, so we should only ever see the value 'closed' here.
+      assert_equals(after, 'closed', 'connection should have closed');
+      break;
+    }
+  }
+}, 'aborting a keepalive fetch should work');
+
+promise_test(async t => {
+  const key = token();
+  const iframeEl = document.querySelector('iframe');
+
+  // Tell the iframe to start the fetch, and wait until it says it has.
+  await new Promise(resolve => {
+    onmessage = t.step_func(event => {
+      assert_equals(event.data, 'started', 'event data should be "started"');
+      resolve();
+    });
+    iframeEl.contentWindow.postMessage(key, '*');
+  });
+
+  // Detach the context of the fetch.
+  iframeEl.remove();
+
+  sharedController.abort();
+
+  // The abort should not do anything. The connection should stay open. Wait 1
+  // second to give time for the fetch to complete.
+  await new Promise(resolve => t.step_timeout(resolve, 1000));
+
+  const after = await fetchJson(`../resources/stash-take.py?key=${key}`);
+  assert_equals(after, 'on', 'fetch should have completed');
+}, 'aborting a detached keepalive fetch should not do anything');
+</script>
+
+<iframe srcdoc="
+                <!DOCTYPE html>
+                <meta charset=utf-8>
+                <script>
+                onmessage = async event => {
+                  const key = event.data;
+                  await fetch(
+                    `../resources/redirect.py?delay=500&amp;location=` +
+                    `../resources/stash-put.py%3fkey=${key}%26value=on`,
+                        {
+                          signal: parent.sharedController.signal,
+                          keepalive: true
+                        });
+                  parent.postMessage('started', '*');
+                };
+                </script>
+                ">
+</iframe>
index 6df6aef..a88aa89 100644 (file)
   const SCOPE = '../resources/basic.html';
   const BODY_METHODS = ['arrayBuffer', 'blob', 'formData', 'json', 'text'];
 
-  async function cleanup() {
-    for (const iframe of document.querySelectorAll('.test-iframe')) {
-      iframe.parentNode.removeChild(iframe);
-    }
-
-    const reg = await navigator.serviceWorker.getRegistration(SCOPE);
-    if (reg) await reg.unregister();
-  }
-
-  async function setupRegistration(t) {
-    await cleanup();
-    const reg = await navigator.serviceWorker.register('../resources/sw-intercept.js', { scope: SCOPE });
+  async function setupRegistration(t, scope) {
+    const reg = await navigator.serviceWorker.register('../resources/sw-intercept.js', { scope });
     await wait_for_state(t, reg.installing, 'activated');
+    add_completion_callback(_ => reg.unregister());
     return reg;
   }
 
   promise_test(async t => {
-    await setupRegistration(t);
-    const iframe = await with_iframe(SCOPE);
+    const suffix = "?q=aborted-not-intercepted";
+    const scope = SCOPE + suffix;
+    await setupRegistration(t, scope);
+    const iframe = await with_iframe(scope);
+    add_completion_callback(_ => iframe.remove());
     const w = iframe.contentWindow;
 
     const controller = new w.AbortController();
 
     const nextData = new Promise(resolve => {
       w.navigator.serviceWorker.addEventListener('message', function once(event) {
-        w.navigator.serviceWorker.removeEventListener('message', once);
-        resolve(event.data);
+        // The message triggered by the iframe's document's fetch
+        // request cannot get dispatched by the time we add the event
+        // listener, so we have to guard against it.
+        if (!event.data.endsWith(suffix)) {
+          w.navigator.serviceWorker.removeEventListener('message', once);
+          resolve(event.data);
+        }
       })
     });
 
 
   for (const bodyMethod of BODY_METHODS) {
     promise_test(async t => {
-      await setupRegistration(t);
-      const iframe = await with_iframe(SCOPE);
+      const scope = SCOPE + "?q=aborted-" + bodyMethod + "-rejects";
+      await setupRegistration(t, scope);
+      const iframe = await with_iframe(scope);
+      add_completion_callback(_ => iframe.remove());
       const w = iframe.contentWindow;
 
       const controller = new w.AbortController();
   }
 
   promise_test(async t => {
-    await setupRegistration(t);
-    const iframe = await with_iframe(SCOPE);
+    const scope = SCOPE + "?q=aborted-stream-errors";
+    await setupRegistration(t, scope);
+    const iframe = await with_iframe(scope);
+    add_completion_callback(_ => iframe.remove());
     const w = iframe.contentWindow;
 
     const controller = new w.AbortController();
index 4eabdb2..6eb1f72 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -15,7 +15,7 @@ None
 ------------------------------------------------------------------------
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/cache.https.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general-sharedworker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/destroyed-context.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/keepalive.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any-expected.txt
new file mode 100644 (file)
index 0000000..693caab
--- /dev/null
@@ -0,0 +1,8 @@
+
+PASS response.headers.get('content-length') expects 0 
+PASS response.headers.get('content-length') expects 0, 0 
+FAIL response.headers.get('double-trouble') expects ,  assert_equals: expected (string) ", " but got (object) null
+PASS response.headers.get('foo-test') expects 1, 2, 3 
+FAIL response.headers.get('heya') expects , \v\f, 1, , , 2 assert_equals: expected ", \v\f, 1, , , 2" but got ", , 1, , , 2"
+PASS response.headers.get('www-authenticate') expects 1, 2, 3, 4 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.js
new file mode 100644 (file)
index 0000000..bb70d87
--- /dev/null
@@ -0,0 +1,15 @@
+// META: global=window,worker
+
+[
+  ["content-length", "0", "header-content-length"],
+  ["content-length", "0, 0", "header-content-length-twice"],
+  ["double-trouble", ", ", "headers-double-empty"],
+  ["foo-test", "1, 2, 3", "headers-basic"],
+  ["heya", ", \u000B\u000C, 1, , , 2", "headers-some-are-empty"],
+  ["www-authenticate", "1, 2, 3, 4", "headers-www-authenticate"],
+].forEach(testValues => {
+  promise_test(async t => {
+    const response = await fetch("../../../xhr/resources/" + testValues[2] + ".asis");
+    assert_equals(response.headers.get(testValues[0]), testValues[1]);
+  }, "response.headers.get('" + testValues[0] + "') expects " + testValues[1]);
+});
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..693caab
--- /dev/null
@@ -0,0 +1,8 @@
+
+PASS response.headers.get('content-length') expects 0 
+PASS response.headers.get('content-length') expects 0, 0 
+FAIL response.headers.get('double-trouble') expects ,  assert_equals: expected (string) ", " but got (object) null
+PASS response.headers.get('foo-test') expects 1, 2, 3 
+FAIL response.headers.get('heya') expects , \v\f, 1, , , 2 assert_equals: expected ", \v\f, 1, , , 2" but got ", , 1, , , 2"
+PASS response.headers.get('www-authenticate') expects 1, 2, 3, 4 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any-expected.txt
new file mode 100644 (file)
index 0000000..7db454d
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Ensure fetch() rejects null bytes in headers assert_unreached: Should have rejected: undefined Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js
new file mode 100644 (file)
index 0000000..9c22374
--- /dev/null
@@ -0,0 +1,5 @@
+// META: global=window,worker
+
+promise_test(t => {
+  return promise_rejects(t, new TypeError(), fetch("../../../xhr/resources/parse-headers.py?my-custom-header="+encodeURIComponent("x\0x")));
+}, "Ensure fetch() rejects null bytes in headers");
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..7db454d
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Ensure fetch() rejects null bytes in headers assert_unreached: Should have rejected: undefined Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker-expected.txt
deleted file mode 100644 (file)
index 38e7c20..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONSOLE MESSAGE: line 12: ReferenceError: Can't find variable: SharedWorker
-
-FAIL Fetch in sharedworker: integrity handling ReferenceError: Can't find variable: SharedWorker
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker.html
deleted file mode 100644 (file)
index fa90a60..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in sharedworker: integrity handling</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new SharedWorker("integrity.js?pipe=sub"));
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
deleted file mode 100644 (file)
index 9240bc6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: integrity handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("integrity.js?pipe=sub"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
deleted file mode 100644 (file)
index 150c9b7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: integrity handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="integrity.js?pipe=sub"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any-expected.txt
new file mode 100644 (file)
index 0000000..42e5fd8
--- /dev/null
@@ -0,0 +1,22 @@
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/top.txt.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/top.txt.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/top.txt.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8801/fetch/api/resources/top.txt?pipe=header(Access-Control-Allow-Origin,*).
+CONSOLE MESSAGE: Fetch API cannot load https://localhost:9443/fetch/api/resources/top.txt.
+
+PASS Empty string integrity 
+PASS SHA-256 integrity 
+PASS SHA-384 integrity 
+PASS SHA-512 integrity 
+PASS Invalid integrity 
+PASS Multiple integrities: valid stronger than invalid 
+PASS Multiple integrities: invalid stronger than valid 
+PASS Multiple integrities: invalid as strong as valid 
+PASS Multiple integrities: both are valid 
+PASS Multiple integrities: both are invalid 
+PASS CORS empty integrity 
+PASS CORS SHA-512 integrity 
+PASS CORS invalid integrity 
+PASS Empty string integrity for opaque response 
+PASS SHA-* integrity for opaque response 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,5 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: global=sharedworker
+// META: script=../resources/utils.js
 
 function integrity(desc, url, integrity, initRequestMode, shouldPass) {
   var fetchRequestInit = {'integrity': integrity}
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive-expected.txt
new file mode 100644 (file)
index 0000000..d5a2db9
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Fetch API: keepalive handling assert_equals: expected (string) "on" but got (object) null
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive.html
new file mode 100644 (file)
index 0000000..5316410
--- /dev/null
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+<meta charset="utf-8">
+<title>Fetch API: keepalive handling</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<body>
+<script>
+const host_info = get_host_info();
+promise_test(async (test) => {
+  const iframe = document.createElement('iframe');
+  iframe.src = host_info.HTTP_REMOTE_ORIGIN +
+    '/fetch/api/resources/keepalive-iframe.html';
+  document.body.appendChild(iframe);
+  const uuid_promise = new Promise((resolve) => {
+    window.addEventListener('message', (event) => {
+      resolve(event.data);
+    });
+  });
+  await (new Promise((resolve) => iframe.addEventListener('load', resolve)));
+  const uuid = await uuid_promise;
+  iframe.remove();
+  await (new Promise((resolve) => test.step_timeout(resolve, 1000)));
+  const response = await fetch(`../resources/stash-take.py?key=${uuid}`);
+  const json = await response.json();
+  assert_equals(json, 'on');
+});
+</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window-expected.txt
new file mode 100644 (file)
index 0000000..efcb8f8
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Cannot fetch blob: URL from a MediaSource 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.js
new file mode 100644 (file)
index 0000000..ff58a52
--- /dev/null
@@ -0,0 +1,5 @@
+promise_test(t => {
+  const mediaSource = new MediaSource(),
+        mediaSourceURL = URL.createObjectURL(mediaSource);
+  return promise_rejects(t, new TypeError(), fetch(mediaSourceURL));
+}, "Cannot fetch blob: URL from a MediaSource");
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
deleted file mode 100644 (file)
index 87376a1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: no-cors mode and opaque filtering</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("mode-no-cors.js?pipe=sub"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
deleted file mode 100644 (file)
index 7aee379..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: no-cors mode and opaque filtering</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="mode-no-cors.js?pipe=sub"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,4 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: script=../resources/utils.js
 
 function fetchNoCors(url, isOpaqueFiltered) {
   var urlQuery = "?pipe=header(x-is-filtered,value)"
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..3e9fe85
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS Fetch ../resources/top.txt with no-cors mode 
+PASS Fetch http://localhost:8800/fetch/api/resources/top.txt with no-cors mode 
+PASS Fetch https://localhost:9443/fetch/api/resources/top.txt with no-cors mode 
+PASS Fetch http://localhost:8801/fetch/api/resources/top.txt with no-cors mode 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any-expected.txt
new file mode 100644 (file)
index 0000000..dd7cc5b
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS Multiple headers with the same name, different case (THIS-is-A-test first) 
+PASS Multiple headers with the same name, different case (THIS-IS-A-TEST first) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.js
new file mode 100644 (file)
index 0000000..067eabb
--- /dev/null
@@ -0,0 +1,11 @@
+promise_test(() => {
+  return fetch("/xhr/resources/echo-headers.py", {headers: [["THIS-is-A-test", 1], ["THIS-IS-A-TEST", 2]] }).then(res => res.text()).then(body => {
+    assert_regexp_match(body, /THIS-is-A-test: 1, 2/)
+  })
+}, "Multiple headers with the same name, different case (THIS-is-A-test first)")
+
+promise_test(() => {
+  return fetch("/xhr/resources/echo-headers.py", {headers: [["THIS-IS-A-TEST", 1], ["THIS-is-A-test", 2]] }).then(res => res.text()).then(body => {
+    assert_regexp_match(body, /THIS-IS-A-TEST: 1, 2/)
+  })
+}, "Multiple headers with the same name, different case (THIS-IS-A-TEST first)")
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..dd7cc5b
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS Multiple headers with the same name, different case (THIS-is-A-test first) 
+PASS Multiple headers with the same name, different case (THIS-IS-A-TEST first) 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker.html
deleted file mode 100644 (file)
index 03374e0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: response url getter</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#response-class">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-    fetch_tests_from_worker(new Worker("response-url.js?pipe=sub"));
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.html
deleted file mode 100644 (file)
index dfe9d96..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: response url getter</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#response-class">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="response-url.js?pipe=sub"></script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,3 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-}
-
 function checkResponseURL(fetchedURL, expectedURL)
 {
     promise_test(function() {
@@ -18,4 +14,3 @@ checkResponseURL(baseURL + "/#ada", baseURL + "/");
 checkResponseURL(baseURL + "#ada", baseURL + "/");
 
 done();
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..0bc8609
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS Testing response url getter with http://localhost:8800/ada 
+PASS Testing response url getter with http://localhost:8800/# 
+PASS Testing response url getter with http://localhost:8800/#ada 
+PASS Testing response url getter with http://localhost:8800#ada 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
index 9944d1b..9a629e4 100644 (file)
@@ -1,8 +1,8 @@
 
-FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-PASS Fetching about:invalid.com is KO 
-PASS Fetching about:config is KO 
-PASS Fetching about:unicorn is KO 
+PASS Fetching about:blank with method GET is KO 
+PASS Fetching about:blank with method PUT is KO 
+PASS Fetching about:blank with method POST is KO 
+PASS Fetching about:invalid.com with method GET is KO 
+PASS Fetching about:config with method GET is KO 
+PASS Fetching about:unicorn with method GET is KO 
 
index ee0572f..aae7146 100644 (file)
@@ -1,34 +1,17 @@
 // META: script=../resources/utils.js
 
-function checkFetchResponse(url, method, desc) {
-  if (!desc) {
-    var cut = (url.length >= 40) ? "[...]" : "";
-    cut += " (" + method + ")"
-    desc = "Fetching " + url.substring(0, 40) + cut + " is OK"
-  }
+function checkNetworkError(url, method) {
+  method = method || "GET";
+  const desc = "Fetching " + url.substring(0, 45) + " with method " + method + " is KO"
   promise_test(function(test) {
-    return fetch(url, { method: method }).then(function(resp) {
-     assert_equals(resp.status, 200, "HTTP status is 200");
-     assert_equals(resp.type, "basic", "response type is basic");
-     assert_equals(resp.headers.get("Content-Type"), "text/html;charset=utf-8", "Content-Type is " + resp.headers.get("Content-Type"));
-     return resp.text();
-    })
-  }, desc);
-}
-
-checkFetchResponse("about:blank", "GET");
-checkFetchResponse("about:blank", "PUT");
-checkFetchResponse("about:blank", "POST");
-
-function checkKoUrl(url, desc) {
-  if (!desc)
-    desc = "Fetching " + url.substring(0, 45) + " is KO"
-  promise_test(function(test) {
-    var promise = fetch(url);
+    var promise = fetch(url, { method: method });
     return promise_rejects(test, new TypeError(), promise);
   }, desc);
 }
 
-checkKoUrl("about:invalid.com");
-checkKoUrl("about:config");
-checkKoUrl("about:unicorn");
+checkNetworkError("about:blank", "GET");
+checkNetworkError("about:blank", "PUT");
+checkNetworkError("about:blank", "POST");
+checkNetworkError("about:invalid.com");
+checkNetworkError("about:config");
+checkNetworkError("about:unicorn");
index 9944d1b..9a629e4 100644 (file)
@@ -1,8 +1,8 @@
 
-FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
-PASS Fetching about:invalid.com is KO 
-PASS Fetching about:config is KO 
-PASS Fetching about:unicorn is KO 
+PASS Fetching about:blank with method GET is KO 
+PASS Fetching about:blank with method PUT is KO 
+PASS Fetching about:blank with method POST is KO 
+PASS Fetching about:invalid.com with method GET is KO 
+PASS Fetching about:config with method GET is KO 
+PASS Fetching about:unicorn with method GET is KO 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
deleted file mode 100644 (file)
index 961ecbd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: blob scheme</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#basic-fetch">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("scheme-blob.js?pipe=sub"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
deleted file mode 100644 (file)
index 7787c37..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: blob scheme</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#basic-fetch">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="scheme-blob.js?pipe=sub"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any-expected.txt
new file mode 100644 (file)
index 0000000..eb2d69b
--- /dev/null
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: line 24: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 24: Fetch API cannot load blob:http://www.localhost:8800/ due to access control checks.
+
+PASS Fetching [GET] URL.createObjectURL(blob) is OK 
+PASS Fetching [GET] blob:http://www.localhost:8800/ is KO 
+PASS Fetching [POST] URL.createObjectURL(blob) is KO 
+PASS Fetching [OPTIONS] URL.createObjectURL(blob) is KO 
+PASS Fetching [HEAD] URL.createObjectURL(blob) is KO 
+PASS Fetching [PUT] URL.createObjectURL(blob) is KO 
+PASS Fetching [DELETE] URL.createObjectURL(blob) is KO 
+PASS Fetching [INVALID] URL.createObjectURL(blob) is KO 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,4 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: script=../resources/utils.js
 
 function checkFetchResponse(url, data, mime, size, desc) {
   promise_test(function(test) {
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
deleted file mode 100644 (file)
index 397d925..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: urls with unsupported schemes</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#basic-fetch">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("scheme-others.js?pipe=sub"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
deleted file mode 100644 (file)
index dd37143..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: urls with unsupported schemes</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#basic-fetch">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="scheme-others.js?pipe=sub"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any-expected.txt
new file mode 100644 (file)
index 0000000..655bc98
--- /dev/null
@@ -0,0 +1,50 @@
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load aaa://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load cap://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load cid://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load dav://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load dict://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load dns://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load geo://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load im://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load imap://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load ipp://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load ldap://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load mailto://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load nfs://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load pop://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load rtsp://localhost:8800/ due to access control checks.
+CONSOLE MESSAGE: line 7: Cross origin requests are only supported for HTTP.
+CONSOLE MESSAGE: line 7: Fetch API cannot load snmp://localhost:8800/ due to access control checks.
+
+PASS Fetching aaa://localhost:8800/ is KO 
+PASS Fetching cap://localhost:8800/ is KO 
+PASS Fetching cid://localhost:8800/ is KO 
+PASS Fetching dav://localhost:8800/ is KO 
+PASS Fetching dict://localhost:8800/ is KO 
+PASS Fetching dns://localhost:8800/ is KO 
+PASS Fetching geo://localhost:8800/ is KO 
+PASS Fetching im://localhost:8800/ is KO 
+PASS Fetching imap://localhost:8800/ is KO 
+PASS Fetching ipp://localhost:8800/ is KO 
+PASS Fetching ldap://localhost:8800/ is KO 
+PASS Fetching mailto://localhost:8800/ is KO 
+PASS Fetching nfs://localhost:8800/ is KO 
+PASS Fetching pop://localhost:8800/ is KO 
+PASS Fetching rtsp://localhost:8800/ is KO 
+PASS Fetching snmp://localhost:8800/ is KO 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,4 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: script=../resources/utils.js
 
 function checkKoUrl(url, desc) {
   if (!desc)
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any-expected.txt
new file mode 100644 (file)
index 0000000..39ce7da
--- /dev/null
@@ -0,0 +1,65 @@
+
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'request' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'request' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'request' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'request' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'request' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'request' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'response' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'response' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'response' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'response' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'response' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'response' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyRequest' 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.js
new file mode 100644 (file)
index 0000000..180d338
--- /dev/null
@@ -0,0 +1,54 @@
+// META: global=worker
+
+// These tests verify that stream creation is not affected by changes to
+// Object.prototype.
+
+const creationCases = {
+  fetch: async () => fetch(location.href),
+  request: () => new Request(location.href, {method: 'POST', body: 'hi'}),
+  response: () => new Response('bye'),
+  consumeEmptyResponse: () => new Response().text(),
+  consumeNonEmptyResponse: () => new Response(new Uint8Array([64])).text(),
+  consumeEmptyRequest: () => new Request(location.href).text(),
+  consumeNonEmptyRequest: () => new Request(location.href,
+                                            {method: 'POST', body: 'yes'}).arrayBuffer(),
+};
+
+for (creationCase of Object.keys(creationCases)) {
+  for (accessorName of ['start', 'type', 'size', 'highWaterMark']) {
+    promise_test(async t => {
+      Object.defineProperty(Object.prototype, accessorName, {
+        get() { throw Error(`Object.prototype.${accessorName} was accessed`); },
+        configurable: true
+      });
+      t.add_cleanup(() => {
+        delete Object.prototype[accessorName];
+        return Promise.resolve();
+      });
+      await creationCases[creationCase]();
+    }, `throwing Object.prototype.${accessorName} accessor should not affect ` +
+       `stream creation by '${creationCase}'`);
+
+    promise_test(async t => {
+      // -1 is a convenient value which is invalid, and should cause the
+      // constructor to throw, for all four fields.
+      Object.prototype[accessorName] = -1;
+      t.add_cleanup(() => {
+        delete Object.prototype[accessorName];
+        return Promise.resolve();
+      });
+      await creationCases[creationCase]();
+    }, `Object.prototype.${accessorName} accessor returning invalid value ` +
+       `should not affect stream creation by '${creationCase}'`);
+  }
+
+  promise_test(async t => {
+    Object.prototype.start = controller => controller.error(new Error('start'));
+      t.add_cleanup(() => {
+        delete Object.prototype.start;
+        return Promise.resolve();
+      });
+      await creationCases[creationCase]();
+    }, `Object.prototype.start function which errors the stream should not ` +
+       `affect stream creation by '${creationCase}'`);
+}
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..1011f47
--- /dev/null
@@ -0,0 +1,67 @@
+
+Harness Error (TIMEOUT), message = null
+
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'fetch' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'fetch' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'fetch' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'request' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'request' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'request' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'request' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'request' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'request' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'request' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'response' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'response' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'response' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'response' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'response' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'response' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'response' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyResponse' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyResponse' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyRequest' 
+PASS throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest' 
+PASS Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyRequest' 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
index 88e29f9..213b593 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -18,31 +18,26 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/block-mime-as-script.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/conditional-get.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/error-after-response.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-sharedworker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-combining.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/keepalive.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mediasource.window.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/referrer.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-head.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-referrer-redirected-worker.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-referrer.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.any.js
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/response-url.sub.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.js
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.sub.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.any.js
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.sub.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.any.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-safe-creation.any.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/text-utf8.html
index 8aaf9c4..6e7aa02 100644 (file)
@@ -1,6 +1,6 @@
+CONSOLE MESSAGE: Origin null is not allowed by Access-Control-Allow-Origin.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/top.txt due to access control checks.
 
 
-Harness Error (TIMEOUT), message = null
-
-TIMEOUT CORS with sandboxed iframe Test timed out
+PASS CORS with sandboxed iframe 
 
index fbdf075..4c0fdb1 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
index 616d83a..64be98a 100644 (file)
@@ -10,7 +10,7 @@ for(let i = 0; i < 0x21; i++) {
   let fail = false,
       strip = false
 
-  // REMOVE 0x0B/0x0C exception once https://github.com/w3c/wptserve/issues/111 is fixed
+  // REMOVE 0x0B/0x0C exception once https://github.com/web-platform-tests/wpt/issues/8372 is fixed
   if(i === 0x0B || i === 0x0C)
     continue
 
@@ -56,9 +56,9 @@ for(let i = 0; i < 0x21; i++) {
   promise_test((t) => {
     if(fail) {
       return Promise.all([
-        promise_rejects(t, new TypeError(), fetch("about:blank", { headers: {"val1": val1} })),
-        promise_rejects(t, new TypeError(), fetch("about:blank", { headers: {"val2": val2} })),
-        promise_rejects(t, new TypeError(), fetch("about:blank", { headers: {"val3": val3} }))
+        promise_rejects(t, new TypeError(), fetch(url, { headers: {"val1": val1} })),
+        promise_rejects(t, new TypeError(), fetch(url, { headers: {"val2": val2} })),
+        promise_rejects(t, new TypeError(), fetch(url, { headers: {"val3": val3} }))
       ])
     } else {
       return fetch(url, { headers: {"val1": val1, "val2": val2, "val3": val3} }).then((res) => {
index 35e7b7e..6dfe0d3 100644 (file)
@@ -15,7 +15,7 @@
     assert_throws("SyntaxError", () => xhr.setRequestHeader("value-test", val))
   }, "XMLHttpRequest with value " + encodeURI(val) + " needs to throw")
 
-  promise_test(t => promise_rejects(t, new TypeError(), fetch("about:blank", { headers: {"value-test": val} })), "fetch() with value " + encodeURI(val) + " needs to throw")
+  promise_test(t => promise_rejects(t, new TypeError(), fetch("/", { headers: {"value-test": val} })), "fetch() with value " + encodeURI(val) + " needs to throw")
 })
 
 // Valid values
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl-expected.txt
deleted file mode 100644 (file)
index 71976af..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-PASS Headers interface: existence and properties of interface object 
-PASS Headers interface object length 
-PASS Headers interface object name 
-PASS Headers interface: existence and properties of interface prototype object 
-PASS Headers interface: existence and properties of interface prototype object's "constructor" property 
-PASS Headers interface: existence and properties of interface prototype object's @@unscopables property 
-PASS Headers interface: operation append(ByteString, ByteString) 
-PASS Headers interface: operation delete(ByteString) 
-PASS Headers interface: operation get(ByteString) 
-PASS Headers interface: operation has(ByteString) 
-PASS Headers interface: operation set(ByteString, ByteString) 
-PASS Testing Symbol.iterator property of iterable interface Headers 
-PASS Testing pair iterable interface Headers 
-PASS Headers interface: operation entries() 
-PASS Headers interface: operation keys() 
-PASS Headers interface: operation values() 
-PASS Headers interface: operation forEach(function, any) 
-PASS Headers must be primary interface of new Headers() 
-PASS Stringification of new Headers() 
-PASS Headers interface: new Headers() must inherit property "append(ByteString, ByteString)" with the proper type 
-PASS Headers interface: calling append(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
-PASS Headers interface: new Headers() must inherit property "delete(ByteString)" with the proper type 
-PASS Headers interface: calling delete(ByteString) on new Headers() with too few arguments must throw TypeError 
-PASS Headers interface: new Headers() must inherit property "get(ByteString)" with the proper type 
-PASS Headers interface: calling get(ByteString) on new Headers() with too few arguments must throw TypeError 
-PASS Headers interface: new Headers() must inherit property "has(ByteString)" with the proper type 
-PASS Headers interface: calling has(ByteString) on new Headers() with too few arguments must throw TypeError 
-PASS Headers interface: new Headers() must inherit property "set(ByteString, ByteString)" with the proper type 
-PASS Headers interface: calling set(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
-PASS Headers interface: new Headers() must inherit property "entries()" with the proper type 
-PASS Headers interface: new Headers() must inherit property "keys()" with the proper type 
-PASS Headers interface: new Headers() must inherit property "values()" with the proper type 
-PASS Headers interface: new Headers() must inherit property "forEach(function, any)" with the proper type 
-PASS Headers interface: calling forEach(function, any) on new Headers() with too few arguments must throw TypeError 
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
deleted file mode 100644 (file)
index 078c9d0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Headers idl interface</title>
-    <meta name="help" href="https://fetch.spec.whatwg.org/#response">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script src="/resources/WebIDLParser.js"></script>
-    <script src="/resources/idlharness.js"></script>
-  </head>
-  <body>
-    <script id="headers-idl" type="text/plain">
-      typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
-
-      [Constructor(optional HeadersInit init),
-       Exposed=(Window,Worker)]
-      interface Headers {
-        void append(ByteString name, ByteString value);
-        void delete(ByteString name);
-        ByteString? get(ByteString name);
-        boolean has(ByteString name);
-        void set(ByteString name, ByteString value);
-        iterable<ByteString, ByteString>;
-      };
-    </script>
-    <script>
-      var idlsArray = new IdlArray();
-      var idl = document.getElementById("headers-idl").textContent
-      idlsArray.add_idls(idl);
-      idlsArray.add_objects({ Headers: ['new Headers()'] });
-      idlsArray.test();
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window-expected.txt
new file mode 100644 (file)
index 0000000..b7bc9dc
--- /dev/null
@@ -0,0 +1,24 @@
+
+PASS Loading data… 
+FAIL "no-cors" Headers object cannot have accept set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" but got "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, "
+FAIL "no-cors" Headers object cannot have accept-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" but got "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, "
+FAIL "no-cors" Headers object cannot have content-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" but got "sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, "
+FAIL "no-cors" Headers object cannot have accept set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "" but got ", sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"
+FAIL "no-cors" Headers object cannot have accept-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "" but got ", sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"
+FAIL "no-cors" Headers object cannot have content-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss assert_equals: 1 expected "" but got ", sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"
+FAIL "no-cors" Headers object cannot have content-type set to text/plain;ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, text/plain assert_equals: 1 expected "text/plain;ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" but got "text/plain;ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, text/plain"
+PASS "no-cors" Headers object cannot have accept/" as header 
+FAIL "no-cors" Headers object cannot have accept/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 as header assert_false: expected false got true
+PASS "no-cors" Headers object cannot have accept-language/\ 1 as header 
+PASS "no-cors" Headers object cannot have accept-language/@ as header 
+PASS "no-cors" Headers object cannot have content-language/\ 1 as header 
+PASS "no-cors" Headers object cannot have content-language/@ as header 
+PASS "no-cors" Headers object cannot have content-type/text/html as header 
+FAIL "no-cors" Headers object cannot have content-type/text/plain; long=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 as header assert_false: expected false got true
+PASS "no-cors" Headers object cannot have test/hi as header 
+PASS "no-cors" Headers object cannot have dpr/2 as header 
+PASS "no-cors" Headers object cannot have downlink/1 as header 
+PASS "no-cors" Headers object cannot have save-data/on as header 
+PASS "no-cors" Headers object cannot have viewport-width/100 as header 
+PASS "no-cors" Headers object cannot have width/100 as header 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.js
new file mode 100644 (file)
index 0000000..9ea76e0
--- /dev/null
@@ -0,0 +1,52 @@
+promise_test(() => fetch("../cors/resources/not-cors-safelisted.json").then(res => res.json().then(runTests)), "Loading data…");
+
+const longValue = "s".repeat(127);
+
+[
+  {
+    "headers": ["accept", "accept-language", "content-language"],
+    "values": [longValue, "", longValue]
+  },
+  {
+    "headers": ["accept", "accept-language", "content-language"],
+    "values": ["", longValue]
+  },
+  {
+    "headers": ["content-type"],
+    "values": ["text/plain;" + "s".repeat(116), "text/plain"]
+  }
+].forEach(testItem => {
+  testItem.headers.forEach(header => {
+    test(() => {
+      const noCorsHeaders = new Request("about:blank", { mode: "no-cors" }).headers;
+      testItem.values.forEach((value) => {
+        noCorsHeaders.append(header, value);
+        assert_equals(noCorsHeaders.get(header), testItem.values[0], '1');
+      });
+      noCorsHeaders.set(header, testItem.values.join(", "));
+      assert_equals(noCorsHeaders.get(header), testItem.values[0], '2');
+      noCorsHeaders.delete(header);
+      assert_false(noCorsHeaders.has(header));
+    }, "\"no-cors\" Headers object cannot have " + header + " set to " + testItem.values.join(", "));
+  });
+});
+
+function runTests(testArray) {
+  testArray = testArray.concat([
+    ["dpr", "2"],
+    ["downlink", "1"], // https://wicg.github.io/netinfo/
+    ["save-data", "on"],
+    ["viewport-width", "100"],
+    ["width", "100"]
+  ]);
+  testArray.forEach(testItem => {
+    const [headerName, headerValue] = testItem;
+    test(() => {
+      const noCorsHeaders = new Request("about:blank", { mode: "no-cors" }).headers;
+      noCorsHeaders.append(headerName, headerValue);
+      assert_false(noCorsHeaders.has(headerName));
+      noCorsHeaders.set(headerName, headerValue);
+      assert_false(noCorsHeaders.has(headerName));
+    }, "\"no-cors\" Headers object cannot have " + headerName + "/" + headerValue + " as header");
+  });
+}
index 0ab0b7e..e5b7c20 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -20,7 +20,7 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-combine.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html
-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-no-cors.window.js
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-record.html
 /LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any-expected.txt
new file mode 100644 (file)
index 0000000..1ddfa5f
--- /dev/null
@@ -0,0 +1,141 @@
+
+PASS idl_test setup 
+PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined 
+PASS Headers interface: existence and properties of interface object 
+PASS Headers interface object length 
+PASS Headers interface object name 
+PASS Headers interface: existence and properties of interface prototype object 
+PASS Headers interface: existence and properties of interface prototype object's "constructor" property 
+PASS Headers interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Headers interface: operation append(ByteString, ByteString) 
+PASS Headers interface: operation delete(ByteString) 
+PASS Headers interface: operation get(ByteString) 
+PASS Headers interface: operation has(ByteString) 
+PASS Headers interface: operation set(ByteString, ByteString) 
+PASS Testing Symbol.iterator property of iterable interface Headers 
+PASS Testing pair iterable interface Headers 
+PASS Headers interface: operation entries() 
+PASS Headers interface: operation keys() 
+PASS Headers interface: operation values() 
+PASS Headers interface: operation forEach(function, any) 
+PASS Headers must be primary interface of new Headers() 
+PASS Stringification of new Headers() 
+PASS Headers interface: new Headers() must inherit property "append(ByteString, ByteString)" with the proper type 
+PASS Headers interface: calling append(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "delete(ByteString)" with the proper type 
+PASS Headers interface: calling delete(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "get(ByteString)" with the proper type 
+PASS Headers interface: calling get(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "has(ByteString)" with the proper type 
+PASS Headers interface: calling has(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "set(ByteString, ByteString)" with the proper type 
+PASS Headers interface: calling set(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "entries()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "keys()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "values()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "forEach(function, any)" with the proper type 
+PASS Headers interface: calling forEach(function, any) on new Headers() with too few arguments must throw TypeError 
+PASS Request interface: existence and properties of interface object 
+PASS Request interface object length 
+PASS Request interface object name 
+PASS Request interface: existence and properties of interface prototype object 
+PASS Request interface: existence and properties of interface prototype object's "constructor" property 
+PASS Request interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Request interface: attribute method 
+PASS Request interface: attribute url 
+PASS Request interface: attribute headers 
+PASS Request interface: attribute destination 
+PASS Request interface: attribute referrer 
+PASS Request interface: attribute referrerPolicy 
+PASS Request interface: attribute mode 
+PASS Request interface: attribute credentials 
+PASS Request interface: attribute cache 
+PASS Request interface: attribute redirect 
+PASS Request interface: attribute integrity 
+PASS Request interface: attribute keepalive 
+FAIL Request interface: attribute isReloadNavigation assert_true: The prototype object must have a property "isReloadNavigation" expected true got false
+FAIL Request interface: attribute isHistoryNavigation assert_true: The prototype object must have a property "isHistoryNavigation" expected true got false
+PASS Request interface: attribute signal 
+PASS Request interface: operation clone() 
+PASS Request interface: attribute body 
+PASS Request interface: attribute bodyUsed 
+PASS Request interface: operation arrayBuffer() 
+PASS Request interface: operation blob() 
+PASS Request interface: operation formData() 
+PASS Request interface: operation json() 
+PASS Request interface: operation text() 
+PASS Request must be primary interface of new Request('about:blank') 
+PASS Stringification of new Request('about:blank') 
+PASS Request interface: new Request('about:blank') must inherit property "method" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "url" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "headers" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "destination" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "referrer" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "referrerPolicy" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "mode" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "credentials" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "cache" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "redirect" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "integrity" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "keepalive" with the proper type 
+FAIL Request interface: new Request('about:blank') must inherit property "isReloadNavigation" with the proper type assert_inherits: property "isReloadNavigation" not found in prototype chain
+FAIL Request interface: new Request('about:blank') must inherit property "isHistoryNavigation" with the proper type assert_inherits: property "isHistoryNavigation" not found in prototype chain
+PASS Request interface: new Request('about:blank') must inherit property "signal" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "clone()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "body" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "bodyUsed" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "arrayBuffer()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "blob()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "formData()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "json()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "text()" with the proper type 
+PASS Response interface: existence and properties of interface object 
+PASS Response interface object length 
+PASS Response interface object name 
+PASS Response interface: existence and properties of interface prototype object 
+PASS Response interface: existence and properties of interface prototype object's "constructor" property 
+PASS Response interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Response interface: operation error() 
+PASS Response interface: operation redirect(USVString, unsigned short) 
+PASS Response interface: attribute type 
+PASS Response interface: attribute url 
+PASS Response interface: attribute redirected 
+PASS Response interface: attribute status 
+PASS Response interface: attribute ok 
+PASS Response interface: attribute statusText 
+PASS Response interface: attribute headers 
+FAIL Response interface: attribute trailer assert_true: The prototype object must have a property "trailer" expected true got false
+PASS Response interface: operation clone() 
+PASS Response interface: attribute body 
+PASS Response interface: attribute bodyUsed 
+PASS Response interface: operation arrayBuffer() 
+PASS Response interface: operation blob() 
+PASS Response interface: operation formData() 
+PASS Response interface: operation json() 
+PASS Response interface: operation text() 
+PASS Response must be primary interface of new Response() 
+PASS Stringification of new Response() 
+PASS Response interface: new Response() must inherit property "error()" with the proper type 
+PASS Response interface: new Response() must inherit property "redirect(USVString, unsigned short)" with the proper type 
+PASS Response interface: calling redirect(USVString, unsigned short) on new Response() with too few arguments must throw TypeError 
+PASS Response interface: new Response() must inherit property "type" with the proper type 
+PASS Response interface: new Response() must inherit property "url" with the proper type 
+PASS Response interface: new Response() must inherit property "redirected" with the proper type 
+PASS Response interface: new Response() must inherit property "status" with the proper type 
+PASS Response interface: new Response() must inherit property "ok" with the proper type 
+PASS Response interface: new Response() must inherit property "statusText" with the proper type 
+PASS Response interface: new Response() must inherit property "headers" with the proper type 
+FAIL Response interface: new Response() must inherit property "trailer" with the proper type assert_inherits: property "trailer" not found in prototype chain
+PASS Response interface: new Response() must inherit property "clone()" with the proper type 
+PASS Response interface: new Response() must inherit property "body" with the proper type 
+PASS Response interface: new Response() must inherit property "bodyUsed" with the proper type 
+PASS Response interface: new Response() must inherit property "arrayBuffer()" with the proper type 
+PASS Response interface: new Response() must inherit property "blob()" with the proper type 
+PASS Response interface: new Response() must inherit property "formData()" with the proper type 
+PASS Response interface: new Response() must inherit property "json()" with the proper type 
+PASS Response interface: new Response() must inherit property "text()" with the proper type 
+PASS Window interface: operation fetch(RequestInfo, RequestInit) 
+PASS Window interface: window must inherit property "fetch(RequestInfo, RequestInit)" with the proper type 
+PASS Window interface: calling fetch(RequestInfo, RequestInit) on window with too few arguments must throw TypeError 
+PASS WorkerGlobalScope interface: existence and properties of interface object 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.js
new file mode 100644 (file)
index 0000000..ccd4d2c
--- /dev/null
@@ -0,0 +1,20 @@
+// META: global=window,worker
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+idl_test(
+  ['fetch'],
+  ['referrer-policy', 'html', 'dom'],
+  idl_array => {
+    idl_array.add_objects({
+      Headers: ["new Headers()"],
+      Request: ["new Request('about:blank')"],
+      Response: ["new Response()"],
+    });
+    if (self.GLOBAL.isWindow()) {
+      idl_array.add_objects({ Window: ['window'] });
+    } else if (self.GLOBAL.isWorker()) {
+      idl_array.add_objects({ WorkerGlobalScope: ['self'] });
+    }
+  }
+);
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..a444cf7
--- /dev/null
@@ -0,0 +1,152 @@
+
+PASS idl_test setup 
+PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined 
+PASS Headers interface: existence and properties of interface object 
+PASS Headers interface object length 
+PASS Headers interface object name 
+PASS Headers interface: existence and properties of interface prototype object 
+PASS Headers interface: existence and properties of interface prototype object's "constructor" property 
+PASS Headers interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Headers interface: operation append(ByteString, ByteString) 
+PASS Headers interface: operation delete(ByteString) 
+PASS Headers interface: operation get(ByteString) 
+PASS Headers interface: operation has(ByteString) 
+PASS Headers interface: operation set(ByteString, ByteString) 
+PASS Testing Symbol.iterator property of iterable interface Headers 
+PASS Testing pair iterable interface Headers 
+PASS Headers interface: operation entries() 
+PASS Headers interface: operation keys() 
+PASS Headers interface: operation values() 
+PASS Headers interface: operation forEach(function, any) 
+PASS Headers must be primary interface of new Headers() 
+PASS Stringification of new Headers() 
+PASS Headers interface: new Headers() must inherit property "append(ByteString, ByteString)" with the proper type 
+PASS Headers interface: calling append(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "delete(ByteString)" with the proper type 
+PASS Headers interface: calling delete(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "get(ByteString)" with the proper type 
+PASS Headers interface: calling get(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "has(ByteString)" with the proper type 
+PASS Headers interface: calling has(ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "set(ByteString, ByteString)" with the proper type 
+PASS Headers interface: calling set(ByteString, ByteString) on new Headers() with too few arguments must throw TypeError 
+PASS Headers interface: new Headers() must inherit property "entries()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "keys()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "values()" with the proper type 
+PASS Headers interface: new Headers() must inherit property "forEach(function, any)" with the proper type 
+PASS Headers interface: calling forEach(function, any) on new Headers() with too few arguments must throw TypeError 
+PASS Request interface: existence and properties of interface object 
+PASS Request interface object length 
+PASS Request interface object name 
+PASS Request interface: existence and properties of interface prototype object 
+PASS Request interface: existence and properties of interface prototype object's "constructor" property 
+PASS Request interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Request interface: attribute method 
+PASS Request interface: attribute url 
+PASS Request interface: attribute headers 
+PASS Request interface: attribute destination 
+PASS Request interface: attribute referrer 
+PASS Request interface: attribute referrerPolicy 
+PASS Request interface: attribute mode 
+PASS Request interface: attribute credentials 
+PASS Request interface: attribute cache 
+PASS Request interface: attribute redirect 
+PASS Request interface: attribute integrity 
+PASS Request interface: attribute keepalive 
+FAIL Request interface: attribute isReloadNavigation assert_true: The prototype object must have a property "isReloadNavigation" expected true got false
+FAIL Request interface: attribute isHistoryNavigation assert_true: The prototype object must have a property "isHistoryNavigation" expected true got false
+PASS Request interface: attribute signal 
+PASS Request interface: operation clone() 
+PASS Request interface: attribute body 
+PASS Request interface: attribute bodyUsed 
+PASS Request interface: operation arrayBuffer() 
+PASS Request interface: operation blob() 
+PASS Request interface: operation formData() 
+PASS Request interface: operation json() 
+PASS Request interface: operation text() 
+PASS Request must be primary interface of new Request('about:blank') 
+PASS Stringification of new Request('about:blank') 
+PASS Request interface: new Request('about:blank') must inherit property "method" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "url" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "headers" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "destination" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "referrer" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "referrerPolicy" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "mode" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "credentials" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "cache" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "redirect" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "integrity" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "keepalive" with the proper type 
+FAIL Request interface: new Request('about:blank') must inherit property "isReloadNavigation" with the proper type assert_inherits: property "isReloadNavigation" not found in prototype chain
+FAIL Request interface: new Request('about:blank') must inherit property "isHistoryNavigation" with the proper type assert_inherits: property "isHistoryNavigation" not found in prototype chain
+PASS Request interface: new Request('about:blank') must inherit property "signal" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "clone()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "body" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "bodyUsed" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "arrayBuffer()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "blob()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "formData()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "json()" with the proper type 
+PASS Request interface: new Request('about:blank') must inherit property "text()" with the proper type 
+PASS Response interface: existence and properties of interface object 
+PASS Response interface object length 
+PASS Response interface object name 
+PASS Response interface: existence and properties of interface prototype object 
+PASS Response interface: existence and properties of interface prototype object's "constructor" property 
+PASS Response interface: existence and properties of interface prototype object's @@unscopables property 
+PASS Response interface: operation error() 
+PASS Response interface: operation redirect(USVString, unsigned short) 
+PASS Response interface: attribute type 
+PASS Response interface: attribute url 
+PASS Response interface: attribute redirected 
+PASS Response interface: attribute status 
+PASS Response interface: attribute ok 
+PASS Response interface: attribute statusText 
+PASS Response interface: attribute headers 
+FAIL Response interface: attribute trailer assert_true: The prototype object must have a property "trailer" expected true got false
+PASS Response interface: operation clone() 
+PASS Response interface: attribute body 
+PASS Response interface: attribute bodyUsed 
+PASS Response interface: operation arrayBuffer() 
+PASS Response interface: operation blob() 
+PASS Response interface: operation formData() 
+PASS Response interface: operation json() 
+PASS Response interface: operation text() 
+PASS Response must be primary interface of new Response() 
+PASS Stringification of new Response() 
+PASS Response interface: new Response() must inherit property "error()" with the proper type 
+PASS Response interface: new Response() must inherit property "redirect(USVString, unsigned short)" with the proper type 
+PASS Response interface: calling redirect(USVString, unsigned short) on new Response() with too few arguments must throw TypeError 
+PASS Response interface: new Response() must inherit property "type" with the proper type 
+PASS Response interface: new Response() must inherit property "url" with the proper type 
+PASS Response interface: new Response() must inherit property "redirected" with the proper type 
+PASS Response interface: new Response() must inherit property "status" with the proper type 
+PASS Response interface: new Response() must inherit property "ok" with the proper type 
+PASS Response interface: new Response() must inherit property "statusText" with the proper type 
+PASS Response interface: new Response() must inherit property "headers" with the proper type 
+FAIL Response interface: new Response() must inherit property "trailer" with the proper type assert_inherits: property "trailer" not found in prototype chain
+PASS Response interface: new Response() must inherit property "clone()" with the proper type 
+PASS Response interface: new Response() must inherit property "body" with the proper type 
+PASS Response interface: new Response() must inherit property "bodyUsed" with the proper type 
+PASS Response interface: new Response() must inherit property "arrayBuffer()" with the proper type 
+PASS Response interface: new Response() must inherit property "blob()" with the proper type 
+PASS Response interface: new Response() must inherit property "formData()" with the proper type 
+PASS Response interface: new Response() must inherit property "json()" with the proper type 
+PASS Response interface: new Response() must inherit property "text()" with the proper type 
+PASS HTMLElement interface: existence and properties of interface object 
+PASS HTMLBodyElement interface: existence and properties of interface object 
+PASS Window interface: existence and properties of interface object 
+PASS WorkerGlobalScope interface: operation fetch(RequestInfo, RequestInit) 
+PASS WorkerGlobalScope interface: self must inherit property "fetch(RequestInfo, RequestInit)" with the proper type 
+PASS WorkerGlobalScope interface: calling fetch(RequestInfo, RequestInit) on self with too few arguments must throw TypeError 
+PASS HTMLFrameSetElement interface: existence and properties of interface object 
+PASS Node interface: existence and properties of interface object 
+PASS Document interface: existence and properties of interface object 
+PASS DocumentType interface: existence and properties of interface object 
+PASS DocumentFragment interface: existence and properties of interface object 
+PASS ShadowRoot interface: existence and properties of interface object 
+PASS Element interface: existence and properties of interface object 
+PASS CharacterData interface: existence and properties of interface object 
+PASS Text interface: existence and properties of interface object 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/idl.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
index 60fcd8c..b40e2e3 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any-expected.txt
new file mode 100644 (file)
index 0000000..79a402e
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS original => remote => original with mode: "no-cors" 
+PASS original => remote => original with mode: "cors" 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.js
new file mode 100644 (file)
index 0000000..32d413c
--- /dev/null
@@ -0,0 +1,37 @@
+// META: script=/common/get-host-info.sub.js
+
+const BASE = location.href;
+const IS_HTTPS = new URL(BASE).protocol === 'https:';
+const REMOTE_HOST = get_host_info()['REMOTE_HOST'];
+const REMOTE_PORT =
+  IS_HTTPS ? get_host_info()['HTTPS_PORT'] : get_host_info()['HTTP_PORT'];
+
+const REMOTE_ORIGIN =
+  new URL(`//${REMOTE_HOST}:${REMOTE_PORT}`, BASE).origin;
+const DESTINATION = new URL('../resources/cors-top.txt', BASE);
+
+function CreateURL(url, BASE, params) {
+  const u = new URL(url, BASE);
+  for (const {name, value} of params) {
+    u.searchParams.append(name, value);
+  }
+  return u;
+}
+
+const redirect =
+  CreateURL('/fetch/api/resources/redirect.py', REMOTE_ORIGIN,
+            [{name: 'redirect_status', value: 303},
+             {name: 'location', value: DESTINATION.href}]);
+
+promise_test(async (test) => {
+  const res = await fetch(redirect.href, {mode: 'no-cors'});
+  // This is discussed at https://github.com/whatwg/fetch/issues/737.
+  assert_equals(res.type, 'opaque');
+}, 'original => remote => original with mode: "no-cors"');
+
+promise_test(async (test) => {
+  const res = await fetch(redirect.href, {mode: 'cors'});
+  assert_equals(res.type, 'cors');
+}, 'original => remote => original with mode: "cors"');
+
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..79a402e
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS original => remote => original with mode: "no-cors" 
+PASS original => remote => original with mode: "cors" 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-back-to-original-origin.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html
deleted file mode 100644 (file)
index 0f624e8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: rediraction loop</title>
-    <meta name="timeout" content="long">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-count.js"));
-    </script>
-  </body>
-</html>
@@ -6,7 +6,7 @@ FAIL Redirect 302 21 times assert_unreached: Should have rejected: undefined Rea
 FAIL Redirect 303 20 times assert_equals: Response's status is 200 expected 200 but got 303
 FAIL Redirect 303 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
 FAIL Redirect 307 20 times assert_equals: Response's status is 200 expected 200 but got 307
-PASS Redirect 307 21 times 
+FAIL Redirect 307 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
 FAIL Redirect 308 20 times assert_equals: Response's status is 200 expected 200 but got 308
-FAIL Redirect 308 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS Redirect 308 21 times 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,8 +1,6 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-  importScripts("/common/utils.js");
-}
+// META: script=../resources/utils.js
+// META: script=/common/utils.js
+// META: timeout=long
 
 function redirectCount(desc, redirectUrl, redirectLocation, redirectStatus, maxCount, shouldPass) {
   var uuid_token = token();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..d003d4a
--- /dev/null
@@ -0,0 +1,12 @@
+
+FAIL Redirect 301 20 times assert_equals: Response's status is 200 expected 200 but got 301
+FAIL Redirect 301 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Redirect 302 20 times assert_equals: Response's status is 200 expected 200 but got 302
+FAIL Redirect 302 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Redirect 303 20 times assert_equals: Response's status is 200 expected 200 but got 303
+FAIL Redirect 303 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Redirect 307 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
+FAIL Redirect 307 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Redirect 308 20 times assert_equals: Response's status is 200 expected 200 but got 308
+FAIL Redirect 308 21 times assert_unreached: Should have rejected: undefined Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html
deleted file mode 100644 (file)
index d6a66e6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: redirection loop</title>
-    <meta name="timeout" content="long">
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="/common/utils.js"></script>
-    <script src="../resources/utils.js"></script>
-    <script src="redirect-count.js"></script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any-expected.txt
new file mode 100644 (file)
index 0000000..4777f06
--- /dev/null
@@ -0,0 +1,4 @@
+
+FAIL redirect response with empty Location, follow mode assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL redirect response with empty Location, manual mode assert_equals: expected "opaqueredirect" but got "basic"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.js
new file mode 100644 (file)
index 0000000..ace8f22
--- /dev/null
@@ -0,0 +1,20 @@
+// META: script=../resources/utils.js
+
+// Tests receiving a redirect response with a Location header with an empty
+// value.
+
+const url = RESOURCES_DIR + 'redirect-empty-location.py';
+
+promise_test(t => {
+  return promise_rejects(t, new TypeError(), fetch(url, {redirect:'follow'}));
+}, 'redirect response with empty Location, follow mode');
+
+promise_test(t => {
+  return fetch(url, {redirect:'manual'})
+    .then(resp => {
+      assert_equals(resp.type, 'opaqueredirect');
+      assert_equals(resp.status, 0);
+    });
+}, 'redirect response with empty Location, manual mode');
+
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..4777f06
--- /dev/null
@@ -0,0 +1,4 @@
+
+FAIL redirect response with empty Location, follow mode assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL redirect response with empty Location, manual mode assert_equals: expected "opaqueredirect" but got "basic"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html
deleted file mode 100644 (file)
index e297081..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: handling Location header during redirection</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-location.js"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any-expected.txt
new file mode 100644 (file)
index 0000000..731ee23
--- /dev/null
@@ -0,0 +1,52 @@
+CONSOLE MESSAGE: Cross-origin redirection to invalidurl: denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=invalidurl%3A due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to data:,data%20url denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=data%3A%2Cdata%2520url due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to invalidurl: denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=invalidurl%3A due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to data:,data%20url denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=data%3A%2Cdata%2520url due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to invalidurl: denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=invalidurl%3A due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to data:,data%20url denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=data%3A%2Cdata%2520url due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to invalidurl: denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=invalidurl%3A due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to data:,data%20url denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=data%3A%2Cdata%2520url due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to invalidurl: denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=invalidurl%3A due to access control checks.
+CONSOLE MESSAGE: Cross-origin redirection to data:,data%20url denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=data%3A%2Cdata%2520url due to access control checks.
+
+PASS Redirect 301 in "follow" mode without location 
+FAIL Redirect 301 in "manual" mode without location assert_equals: Response's status is 0 expected 0 but got 301
+PASS Redirect 301 in "follow" mode with invalid location 
+PASS Redirect 301 in "manual" mode with invalid location 
+PASS Redirect 301 in "follow" mode with data location 
+PASS Redirect 301 in "manual" mode with data location 
+PASS Redirect 302 in "follow" mode without location 
+FAIL Redirect 302 in "manual" mode without location assert_equals: Response's status is 0 expected 0 but got 302
+PASS Redirect 302 in "follow" mode with invalid location 
+PASS Redirect 302 in "manual" mode with invalid location 
+PASS Redirect 302 in "follow" mode with data location 
+PASS Redirect 302 in "manual" mode with data location 
+PASS Redirect 303 in "follow" mode without location 
+FAIL Redirect 303 in "manual" mode without location assert_equals: Response's status is 0 expected 0 but got 303
+PASS Redirect 303 in "follow" mode with invalid location 
+PASS Redirect 303 in "manual" mode with invalid location 
+PASS Redirect 303 in "follow" mode with data location 
+PASS Redirect 303 in "manual" mode with data location 
+PASS Redirect 307 in "follow" mode without location 
+FAIL Redirect 307 in "manual" mode without location assert_equals: Response's status is 0 expected 0 but got 307
+PASS Redirect 307 in "follow" mode with invalid location 
+PASS Redirect 307 in "manual" mode with invalid location 
+PASS Redirect 307 in "follow" mode with data location 
+PASS Redirect 307 in "manual" mode with data location 
+PASS Redirect 308 in "follow" mode without location 
+FAIL Redirect 308 in "manual" mode without location assert_equals: Response's status is 0 expected 0 but got 308
+PASS Redirect 308 in "follow" mode with invalid location 
+PASS Redirect 308 in "manual" mode with invalid location 
+PASS Redirect 308 in "follow" mode with data location 
+PASS Redirect 308 in "manual" mode with data location 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,4 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: script=../resources/utils.js
 
 function redirectLocation(desc, redirectUrl, redirectLocation, redirectStatus, redirectMode, shouldPass) {
   var url = redirectUrl;
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html
deleted file mode 100644 (file)
index ac35dea..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: handling Location header during redirection</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="redirect-location.js"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker.html
deleted file mode 100644 (file)
index fc0bc5e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: request method handling when redirected</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-method.js"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,7 +1,4 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-}
+// META: script=../resources/utils.js
 
 // Creates a promise_test that fetches a URL that returns a redirect response.
 //
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..ae32d51
--- /dev/null
@@ -0,0 +1,16 @@
+
+PASS Response.redirected should be false on not-redirected responses 
+PASS Redirect 301 with GET 
+PASS Redirect 301 with POST 
+PASS Redirect 301 with HEAD 
+PASS Redirect 302 with GET 
+PASS Redirect 302 with POST 
+PASS Redirect 302 with HEAD 
+PASS Redirect 303 with GET 
+PASS Redirect 303 with POST 
+PASS Redirect 303 with HEAD 
+PASS Redirect 307 with GET 
+PASS Redirect 307 with POST (string body) 
+PASS Redirect 307 with POST (blob body) 
+PASS Redirect 307 with HEAD 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.html
deleted file mode 100644 (file)
index 028842d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: request method handling when redirected</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="../resources/utils.js"></script>
-    <script src="redirect-method.js"></script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt
deleted file mode 100644 (file)
index dddda69..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-PASS Redirect 301 in "error" mode  
-PASS Redirect 301 in "follow" mode  
-PASS Redirect 301 in "manual" mode  
-PASS Redirect 302 in "error" mode  
-PASS Redirect 302 in "follow" mode  
-PASS Redirect 302 in "manual" mode  
-PASS Redirect 303 in "error" mode  
-PASS Redirect 303 in "follow" mode  
-PASS Redirect 303 in "manual" mode  
-PASS Redirect 307 in "error" mode  
-PASS Redirect 307 in "follow" mode  
-PASS Redirect 307 in "manual" mode  
-PASS Redirect 308 in "error" mode  
-PASS Redirect 308 in "follow" mode  
-PASS Redirect 308 in "manual" mode  
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker.html
deleted file mode 100644 (file)
index 32d219f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: redirect mode handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-mode.js"));
-    </script>
-  </body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt
new file mode 100644 (file)
index 0000000..7915060
--- /dev/null
@@ -0,0 +1,132 @@
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 21: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 21: Not allowed to request resource
+CONSOLE MESSAGE: line 21: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 21: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 21: Not allowed to request resource
+CONSOLE MESSAGE: line 21: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 21: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 21: Not allowed to request resource
+CONSOLE MESSAGE: line 21: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 21: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 21: Not allowed to request resource
+CONSOLE MESSAGE: line 21: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt
+CONSOLE MESSAGE: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 21: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 21: Not allowed to request resource
+CONSOLE MESSAGE: line 21: Fetch API cannot load http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt due to access control checks.
+CONSOLE MESSAGE: line 19: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: line 19: Not allowed to request resource
+CONSOLE MESSAGE: line 19: Fetch API cannot load http://127.0.0.1/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt due to access control checks.
+
+PASS same-origin redirect 301 in error redirect and cors mode 
+PASS same-origin redirect 301 in error redirect and no-cors mode 
+PASS same-origin redirect 301 in manual redirect and cors mode 
+FAIL same-origin redirect 301 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 301 in follow redirect and cors mode 
+PASS same-origin redirect 301 in follow redirect and no-cors mode 
+PASS same-origin redirect 302 in error redirect and cors mode 
+PASS same-origin redirect 302 in error redirect and no-cors mode 
+PASS same-origin redirect 302 in manual redirect and cors mode 
+FAIL same-origin redirect 302 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 302 in follow redirect and cors mode 
+PASS same-origin redirect 302 in follow redirect and no-cors mode 
+PASS same-origin redirect 303 in error redirect and cors mode 
+PASS same-origin redirect 303 in error redirect and no-cors mode 
+PASS same-origin redirect 303 in manual redirect and cors mode 
+FAIL same-origin redirect 303 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 303 in follow redirect and cors mode 
+PASS same-origin redirect 303 in follow redirect and no-cors mode 
+PASS same-origin redirect 307 in error redirect and cors mode 
+PASS same-origin redirect 307 in error redirect and no-cors mode 
+PASS same-origin redirect 307 in manual redirect and cors mode 
+FAIL same-origin redirect 307 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 307 in follow redirect and cors mode 
+PASS same-origin redirect 307 in follow redirect and no-cors mode 
+PASS same-origin redirect 308 in error redirect and cors mode 
+PASS same-origin redirect 308 in error redirect and no-cors mode 
+PASS same-origin redirect 308 in manual redirect and cors mode 
+FAIL same-origin redirect 308 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 308 in follow redirect and cors mode 
+PASS same-origin redirect 308 in follow redirect and no-cors mode 
+PASS cross-origin redirect 301 in error redirect and cors mode 
+PASS cross-origin redirect 301 in error redirect and no-cors mode 
+FAIL cross-origin redirect 301 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 301 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 301 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 301 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 302 in error redirect and cors mode 
+PASS cross-origin redirect 302 in error redirect and no-cors mode 
+FAIL cross-origin redirect 302 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 302 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 302 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 302 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 303 in error redirect and cors mode 
+PASS cross-origin redirect 303 in error redirect and no-cors mode 
+FAIL cross-origin redirect 303 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 303 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 303 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 303 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 307 in error redirect and cors mode 
+PASS cross-origin redirect 307 in error redirect and no-cors mode 
+FAIL cross-origin redirect 307 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 307 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 307 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 307 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 308 in error redirect and cors mode 
+PASS cross-origin redirect 308 in error redirect and no-cors mode 
+FAIL cross-origin redirect 308 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 308 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 308 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 308 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.js
new file mode 100644 (file)
index 0000000..7d34fa6
--- /dev/null
@@ -0,0 +1,49 @@
+// META: script=/common/get-host-info.sub.js
+
+var redirectLocation = "cors-top.txt";
+
+function testRedirect(origin, redirectStatus, redirectMode, corsMode) {
+  var url = new URL("../resources/redirect.py", self.location);
+  if (origin === "cross-origin") {
+    url.host = get_host_info().REMOTE_HOST;
+  }
+
+  var urlParameters = "?redirect_status=" + redirectStatus;
+  urlParameters += "&location=" + encodeURIComponent(redirectLocation);
+
+  var requestInit = {redirect: redirectMode, mode: corsMode};
+
+  promise_test(function(test) {
+    if (redirectMode === "error" ||
+        (corsMode === "no-cors" && redirectMode !== "follow" && origin !== "same-origin"))
+      return promise_rejects(test, new TypeError(), fetch(url + urlParameters, requestInit));
+    if (redirectMode === "manual")
+      return fetch(url + urlParameters, requestInit).then(function(resp) {
+        assert_equals(resp.status, 0, "Response's status is 0");
+        assert_equals(resp.type, "opaqueredirect", "Response's type is opaqueredirect");
+        assert_equals(resp.statusText, "", "Response's statusText is \"\"");
+        assert_equals(resp.url, url + urlParameters, "Response URL should be the original one");
+      });
+    if (redirectMode === "follow")
+      return fetch(url + urlParameters, requestInit).then(function(resp) {
+        if (corsMode !== "no-cors" || origin === "same-origin") {
+          assert_true(new URL(resp.url).pathname.endsWith(redirectLocation), "Response's url should be the redirected one");
+          assert_equals(resp.status, 200, "Response's status is 200");
+        } else {
+          assert_equals(resp.type, "opaque", "Response is opaque");
+        }
+      });
+    assert_unreached(redirectMode + " is no a valid redirect mode");
+  }, origin + " redirect " + redirectStatus + " in " + redirectMode + " redirect and " + corsMode + " mode");
+}
+
+for (var origin of ["same-origin", "cross-origin"]) {
+  for (var statusCode of [301, 302, 303, 307, 308]) {
+    for (var redirect of ["error", "manual", "follow"]) {
+      for (var mode of ["cors", "no-cors"])
+        testRedirect(origin, statusCode, redirect, mode);
+    }
+  }
+}
+
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..c979af1
--- /dev/null
@@ -0,0 +1,87 @@
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=301&location=cors-top.txt
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=302&location=cors-top.txt
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=303&location=cors-top.txt
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=307&location=cors-top.txt
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: Not allowed to follow a redirection while loading http://localhost:8800/fetch/api/resources/redirect.py?redirect_status=308&location=cors-top.txt
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
+
+PASS same-origin redirect 301 in error redirect and cors mode 
+PASS same-origin redirect 301 in error redirect and no-cors mode 
+PASS same-origin redirect 301 in manual redirect and cors mode 
+FAIL same-origin redirect 301 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 301 in follow redirect and cors mode 
+PASS same-origin redirect 301 in follow redirect and no-cors mode 
+PASS same-origin redirect 302 in error redirect and cors mode 
+PASS same-origin redirect 302 in error redirect and no-cors mode 
+PASS same-origin redirect 302 in manual redirect and cors mode 
+FAIL same-origin redirect 302 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 302 in follow redirect and cors mode 
+PASS same-origin redirect 302 in follow redirect and no-cors mode 
+PASS same-origin redirect 303 in error redirect and cors mode 
+PASS same-origin redirect 303 in error redirect and no-cors mode 
+PASS same-origin redirect 303 in manual redirect and cors mode 
+FAIL same-origin redirect 303 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 303 in follow redirect and cors mode 
+PASS same-origin redirect 303 in follow redirect and no-cors mode 
+PASS same-origin redirect 307 in error redirect and cors mode 
+PASS same-origin redirect 307 in error redirect and no-cors mode 
+PASS same-origin redirect 307 in manual redirect and cors mode 
+FAIL same-origin redirect 307 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 307 in follow redirect and cors mode 
+PASS same-origin redirect 307 in follow redirect and no-cors mode 
+PASS same-origin redirect 308 in error redirect and cors mode 
+PASS same-origin redirect 308 in error redirect and no-cors mode 
+PASS same-origin redirect 308 in manual redirect and cors mode 
+FAIL same-origin redirect 308 in manual redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Not allowed to request resource"
+PASS same-origin redirect 308 in follow redirect and cors mode 
+PASS same-origin redirect 308 in follow redirect and no-cors mode 
+PASS cross-origin redirect 301 in error redirect and cors mode 
+PASS cross-origin redirect 301 in error redirect and no-cors mode 
+FAIL cross-origin redirect 301 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 301 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 301 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 301 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 302 in error redirect and cors mode 
+PASS cross-origin redirect 302 in error redirect and no-cors mode 
+FAIL cross-origin redirect 302 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 302 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 302 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 302 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 303 in error redirect and cors mode 
+PASS cross-origin redirect 303 in error redirect and no-cors mode 
+FAIL cross-origin redirect 303 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 303 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 303 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 303 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 307 in error redirect and cors mode 
+PASS cross-origin redirect 307 in error redirect and no-cors mode 
+FAIL cross-origin redirect 307 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 307 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 307 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 307 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 308 in error redirect and cors mode 
+PASS cross-origin redirect 308 in error redirect and no-cors mode 
+FAIL cross-origin redirect 308 in manual redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+PASS cross-origin redirect 308 in manual redirect and no-cors mode 
+FAIL cross-origin redirect 308 in follow redirect and cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+FAIL cross-origin redirect 308 in follow redirect and no-cors mode promise_test: Unhandled rejection with value: object "TypeError: Could not connect to the server."
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html
deleted file mode 100644 (file)
index 20a0cd6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: redirect mode handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="/common/get-host-info.sub.js"></script>
-    <script src="redirect-mode.js"></script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.js b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.js
deleted file mode 100644 (file)
index b59a8d5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-if (this.document === undefined) {
-  importScripts("/resources/testharness.js");
-  importScripts("/common/get-host-info.sub.js")
-}
-
-function redirectMode(desc, redirectUrl, redirectLocation, redirectStatus, redirectMode) {
-  var url = redirectUrl;
-  var urlParameters = "?redirect_status=" + redirectStatus;
-  urlParameters += "&location=" + encodeURIComponent(redirectLocation);
-
-  var requestInit = {"redirect": redirectMode};
-
-  promise_test(function(test) {
-    if (redirectMode === "error")
-      return promise_rejects(test, new TypeError(), fetch(url + urlParameters, requestInit));
-    if (redirectMode === "manual")
-      return fetch(url + urlParameters, requestInit).then(function(resp) {
-        assert_equals(resp.status, 0, "Response's status is 0");
-        assert_equals(resp.type, "opaqueredirect", "Response's type is opaqueredirect");
-        assert_equals(resp.statusText, "", "Response's statusText is \"\"");
-        assert_equals(resp.url, url + urlParameters, "Response URL should be the original one");
-      });
-    if (redirectMode === "follow")
-      return fetch(url + urlParameters, requestInit).then(function(resp) {
-        assert_true(new URL(resp.url).pathname.endsWith(locationUrl), "Response's url should be the redirected one");
-        assert_equals(resp.status, 200, "Response's status is 200");
-      });
-    assert_unreached(redirectMode + " is no a valid redirect mode");
-  }, desc);
-}
-
-var redirUrl = get_host_info().HTTP_ORIGIN + "/fetch/api/resources/redirect.py";
-var locationUrl = "top.txt";
-
-for (var statusCode of [301, 302, 303, 307, 308]) {
-  redirectMode("Redirect " + statusCode + " in \"error\" mode ", redirUrl, locationUrl, statusCode, "error");
-  redirectMode("Redirect " + statusCode + " in \"follow\" mode ", redirUrl, locationUrl, statusCode, "follow");
-  redirectMode("Redirect " + statusCode + " in \"manual\" mode ", redirUrl, locationUrl, statusCode, "manual");
-}
-
-done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker.html
deleted file mode 100644 (file)
index fdb5422..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: redirect mode handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-origin.js"));
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,9 +1,6 @@
-if (this.document === undefined) {
-    importScripts("/common/utils.js");
-    importScripts("/resources/testharness.js");
-    importScripts("../resources/utils.js");
-    importScripts("/common/get-host-info.sub.js");
-}
+// META: script=/common/utils.js
+// META: script=../resources/utils.js
+// META: script=/common/get-host-info.sub.js
 
 function testOriginAfterRedirection(desc, redirectUrl, redirectLocation, redirectStatus, expectedOrigin) {
     var uuid_token = token();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..2c76b62
--- /dev/null
@@ -0,0 +1,22 @@
+
+PASS Same origin to same origin redirection 301 
+PASS Same origin to other origin redirection 301 
+PASS Other origin to other origin redirection 301 
+PASS Other origin to same origin redirection 301 
+PASS Same origin to same origin redirection 302 
+PASS Same origin to other origin redirection 302 
+PASS Other origin to other origin redirection 302 
+PASS Other origin to same origin redirection 302 
+PASS Same origin to same origin redirection 303 
+PASS Same origin to other origin redirection 303 
+PASS Other origin to other origin redirection 303 
+PASS Other origin to same origin redirection 303 
+PASS Same origin to same origin redirection 307 
+PASS Same origin to other origin redirection 307 
+PASS Other origin to other origin redirection 307 
+PASS Other origin to same origin redirection 307 
+PASS Same origin to same origin redirection 308 
+PASS Same origin to other origin redirection 308 
+PASS Other origin to other origin redirection 308 
+PASS Other origin to same origin redirection 308 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.html
deleted file mode 100644 (file)
index 4cbe1c0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: redirect mode handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-network-or-cache-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="/common/utils.js"></script>
-    <script src="../resources/utils.js"></script>
-    <script src="/common/get-host-info.sub.js"></script>
-    <script src="redirect-origin.js"></script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer-worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer-worker.html
deleted file mode 100644 (file)
index 6e5cd45..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch in worker: redirect referrer handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-redirect-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script>
-      fetch_tests_from_worker(new Worker("redirect-referrer.js"));
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
@@ -1,9 +1,6 @@
-if (this.document === undefined) {
-  importScripts("/common/utils.js");
-  importScripts("/resources/testharness.js");
-  importScripts("../resources/utils.js");
-  importScripts("/common/get-host-info.sub.js");
-}
+// META: script=/common/utils.js
+// META: script=../resources/utils.js
+// META: script=/common/get-host-info.sub.js
 
 function testReferrerAfterRedirection(desc, redirectUrl, redirectLocation, referrerPolicy, redirectReferrerPolicy, expectedReferrer) {
   var url = redirectUrl;
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker-expected.txt
new file mode 100644 (file)
index 0000000..8e97d49
--- /dev/null
@@ -0,0 +1,34 @@
+
+PASS Same origin redirection, empty init, unsafe-url redirect header  
+PASS Same origin redirection, empty init, no-referrer-when-downgrade redirect header  
+PASS Same origin redirection, empty init, same-origin redirect header  
+PASS Same origin redirection, empty init, origin redirect header  
+PASS Same origin redirection, empty init, origin-when-cross-origin redirect header  
+PASS Same origin redirection, empty init, no-referrer redirect header  
+PASS Same origin redirection, empty init, strict-origin redirect header  
+PASS Same origin redirection, empty init, strict-origin-when-cross-origin redirect header  
+PASS Same origin redirection, empty redirect header, unsafe-url init  
+PASS Same origin redirection, empty redirect header, no-referrer-when-downgrade init  
+PASS Same origin redirection, empty redirect header, same-origin init  
+PASS Same origin redirection, empty redirect header, origin init  
+PASS Same origin redirection, empty redirect header, origin-when-cross-origin init  
+PASS Same origin redirection, empty redirect header, no-referrer init  
+PASS Same origin redirection, empty redirect header, strict-origin init  
+PASS Same origin redirection, empty redirect header, strict-origin-when-cross-origin init  
+PASS Cross origin redirection, empty init, unsafe-url redirect header  
+PASS Cross origin redirection, empty init, no-referrer-when-downgrade redirect header  
+PASS Cross origin redirection, empty init, same-origin redirect header  
+PASS Cross origin redirection, empty init, origin redirect header  
+PASS Cross origin redirection, empty init, origin-when-cross-origin redirect header  
+PASS Cross origin redirection, empty init, no-referrer redirect header  
+PASS Cross origin redirection, empty init, strict-origin redirect header  
+PASS Cross origin redirection, empty init, strict-origin-when-cross-origin redirect header  
+PASS Cross origin redirection, empty redirect header, unsafe-url init  
+PASS Cross origin redirection, empty redirect header, no-referrer-when-downgrade init  
+PASS Cross origin redirection, empty redirect header, same-origin init  
+PASS Cross origin redirection, empty redirect header, origin init  
+PASS Cross origin redirection, empty redirect header, origin-when-cross-origin init  
+PASS Cross origin redirection, empty redirect header, no-referrer init  
+PASS Cross origin redirection, empty redirect header, strict-origin init  
+PASS Cross origin redirection, empty redirect header, strict-origin-when-cross-origin init  
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.any.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-referrer.html
deleted file mode 100644 (file)
index 473b5e6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Fetch: redirect referrer handling</title>
-    <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#main-fetch">
-    <meta name="help" href="https://fetch.spec.whatwg.org/#http-redirect-fetch">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-  </head>
-  <body>
-    <script src="/common/utils.js"></script>
-    <script src="../resources/utils.js"></script>
-    <script src="/common/get-host-info.sub.js"></script>
-    <script src="redirect-referrer.js"></script>
-  </body>
-</html>