diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 306428a453a..febb3bcae02 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -94,51 +94,23 @@ Create a commit which includes all of the updated files in lib/llhttp.
`undici` runs a subset of the [`web-platform-tests`](https://github.com/web-platform-tests/wpt).
-Here are the steps to update them.
+### Requirements:
+- [Node core utils](https://github.com/nodejs/node-core-utils) setup with credentials.
-
-Skip the tutorial
+To update every test, run the following commands. Typically you would only need to update the tests in a specific directory.
```bash
-git clone --depth 1 --single-branch --branch epochs/daily --filter=blob:none --sparse https://github.com/web-platform-tests/wpt.git test/wpt/tests
-cd test/wpt/tests
-
-git sparse-checkout add /resources
-git sparse-checkout add /interfaces
-git sparse-checkout add /common
-git sparse-checkout add /fetch
-git sparse-checkout add /FileAPI
-git sparse-checkout add /xhr
-git sparse-checkout add /websockets
-git sparse-checkout add /mimesniff
-git sparse-checkout add /storage
-git sparse-checkout add /service-workers
-```
-
-
-
-#### Sparse-clone the [wpt](https://github.com/web-platform-tests/wpt) repo
-
-```bash
-git clone --depth 1 --single-branch --branch epochs/daily --filter=blob:none --sparse https://github.com/web-platform-tests/wpt.git test/wpt/tests
-
-cd test/wpt/tests
-
-```
-
-#### Checkout the tests
-
-Only run the commands for the folder(s) you want to update.
-
-```bash
-git sparse-checkout add /fetch
-git sparse-checkout add /FileAPI
-git sparse-checkout add /xhr
-git sparse-checkout add /websockets
-git sparse-checkout add /resources
-git sparse-checkout add /common
-
-# etc
+git node wpt resources
+git node wpt interfaces
+git node wpt common
+git node wpt fetch
+git node wpt FileAPI
+git node wpt xhr
+git node wpt websockets
+git node wpt mimesniff
+git node wpt storage
+git node wpt service-workers
+git node wpt eventsource
```
#### Run the tests
diff --git a/lib/web/fetch/body.js b/lib/web/fetch/body.js
index e4dee2bd9f4..0f4ef04d2fe 100644
--- a/lib/web/fetch/body.js
+++ b/lib/web/fetch/body.js
@@ -385,6 +385,15 @@ function bodyMixinMethods (instance) {
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
)
}, instance, false)
+ },
+
+ bytes () {
+ // The bytes() method steps are to return the result of running consume body
+ // with this and the following step given a byte sequence bytes: return the
+ // result of creating a Uint8Array from bytes in this’s relevant realm.
+ return consumeBody(this, (bytes) => {
+ return new Uint8Array(bytes)
+ }, instance, true)
}
}
diff --git a/package.json b/package.json
index 95cf7b38b94..58ede52936e 100644
--- a/package.json
+++ b/package.json
@@ -137,7 +137,7 @@
"ignore": [
"lib/llhttp/constants.js",
"lib/llhttp/utils.js",
- "test/wpt/tests"
+ "test/fixtures/wpt"
]
},
"tsd": {
diff --git a/test/wpt/tests/FileAPI/Blob-methods-from-detached-frame.html b/test/fixtures/wpt/FileAPI/Blob-methods-from-detached-frame.html
similarity index 100%
rename from test/wpt/tests/FileAPI/Blob-methods-from-detached-frame.html
rename to test/fixtures/wpt/FileAPI/Blob-methods-from-detached-frame.html
diff --git a/test/wpt/tests/FileAPI/BlobURL/cross-partition.tentative.https.html b/test/fixtures/wpt/FileAPI/BlobURL/cross-partition.tentative.https.html
similarity index 100%
rename from test/wpt/tests/FileAPI/BlobURL/cross-partition.tentative.https.html
rename to test/fixtures/wpt/FileAPI/BlobURL/cross-partition.tentative.https.html
diff --git a/test/wpt/tests/FileAPI/BlobURL/support/file_test2.txt b/test/fixtures/wpt/FileAPI/BlobURL/support/file_test2.txt
similarity index 100%
rename from test/wpt/tests/FileAPI/BlobURL/support/file_test2.txt
rename to test/fixtures/wpt/FileAPI/BlobURL/support/file_test2.txt
diff --git a/test/wpt/tests/FileAPI/BlobURL/test2-manual.html b/test/fixtures/wpt/FileAPI/BlobURL/test2-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/BlobURL/test2-manual.html
rename to test/fixtures/wpt/FileAPI/BlobURL/test2-manual.html
diff --git a/test/wpt/tests/FileAPI/FileReader/progress_event_bubbles_cancelable.html b/test/fixtures/wpt/FileAPI/FileReader/progress_event_bubbles_cancelable.html
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/progress_event_bubbles_cancelable.html
rename to test/fixtures/wpt/FileAPI/FileReader/progress_event_bubbles_cancelable.html
diff --git a/test/wpt/tests/FileAPI/FileReader/support/file_test1.txt b/test/fixtures/wpt/FileAPI/FileReader/support/file_test1.txt
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/support/file_test1.txt
rename to test/fixtures/wpt/FileAPI/FileReader/support/file_test1.txt
diff --git a/test/wpt/tests/FileAPI/FileReader/test_errors-manual.html b/test/fixtures/wpt/FileAPI/FileReader/test_errors-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/test_errors-manual.html
rename to test/fixtures/wpt/FileAPI/FileReader/test_errors-manual.html
diff --git a/test/wpt/tests/FileAPI/FileReader/test_notreadableerrors-manual.html b/test/fixtures/wpt/FileAPI/FileReader/test_notreadableerrors-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/test_notreadableerrors-manual.html
rename to test/fixtures/wpt/FileAPI/FileReader/test_notreadableerrors-manual.html
diff --git a/test/wpt/tests/FileAPI/FileReader/test_securityerrors-manual.html b/test/fixtures/wpt/FileAPI/FileReader/test_securityerrors-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/test_securityerrors-manual.html
rename to test/fixtures/wpt/FileAPI/FileReader/test_securityerrors-manual.html
diff --git a/test/wpt/tests/FileAPI/FileReader/workers.html b/test/fixtures/wpt/FileAPI/FileReader/workers.html
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReader/workers.html
rename to test/fixtures/wpt/FileAPI/FileReader/workers.html
diff --git a/test/wpt/tests/FileAPI/FileReaderSync.worker.js b/test/fixtures/wpt/FileAPI/FileReaderSync.worker.js
similarity index 100%
rename from test/wpt/tests/FileAPI/FileReaderSync.worker.js
rename to test/fixtures/wpt/FileAPI/FileReaderSync.worker.js
diff --git a/test/wpt/tests/FileAPI/META.yml b/test/fixtures/wpt/FileAPI/META.yml
similarity index 100%
rename from test/wpt/tests/FileAPI/META.yml
rename to test/fixtures/wpt/FileAPI/META.yml
diff --git a/test/wpt/tests/FileAPI/blob/Blob-array-buffer.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-array-buffer.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-array-buffer.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-array-buffer.any.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-constructor-dom.window.js b/test/fixtures/wpt/FileAPI/blob/Blob-constructor-dom.window.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-constructor-dom.window.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-constructor-dom.window.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-constructor-endings.html b/test/fixtures/wpt/FileAPI/blob/Blob-constructor-endings.html
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-constructor-endings.html
rename to test/fixtures/wpt/FileAPI/blob/Blob-constructor-endings.html
diff --git a/test/wpt/tests/FileAPI/blob/Blob-constructor.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js
similarity index 99%
rename from test/wpt/tests/FileAPI/blob/Blob-constructor.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js
index d16f760caee..6dc44e8e156 100644
--- a/test/wpt/tests/FileAPI/blob/Blob-constructor.any.js
+++ b/test/fixtures/wpt/FileAPI/blob/Blob-constructor.any.js
@@ -290,10 +290,11 @@ test_blob(function() {
new Int16Array([0x4150, 0x5353]),
new Uint32Array([0x53534150]),
new Int32Array([0x53534150]),
+ new Float16Array([2.65625, 58.59375]),
new Float32Array([0xD341500000])
]);
}, {
- expected: "PASSPASSPASSPASSPASSPASSPASS",
+ expected: "PASSPASSPASSPASSPASSPASSPASSPASS",
type: "",
desc: "Passing typed arrays as elements of the blobParts array should work."
});
diff --git a/test/wpt/tests/FileAPI/blob/Blob-in-worker.worker.js b/test/fixtures/wpt/FileAPI/blob/Blob-in-worker.worker.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-in-worker.worker.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-in-worker.worker.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-slice-overflow.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-slice-overflow.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-slice-overflow.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-slice-overflow.any.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-slice.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-slice.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-slice.any.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-stream-byob-crash.html b/test/fixtures/wpt/FileAPI/blob/Blob-stream-byob-crash.html
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-stream-byob-crash.html
rename to test/fixtures/wpt/FileAPI/blob/Blob-stream-byob-crash.html
diff --git a/test/wpt/tests/FileAPI/blob/Blob-stream-sync-xhr-crash.html b/test/fixtures/wpt/FileAPI/blob/Blob-stream-sync-xhr-crash.html
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-stream-sync-xhr-crash.html
rename to test/fixtures/wpt/FileAPI/blob/Blob-stream-sync-xhr-crash.html
diff --git a/test/wpt/tests/FileAPI/blob/Blob-stream.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-stream.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-stream.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-stream.any.js
diff --git a/test/wpt/tests/FileAPI/blob/Blob-text.any.js b/test/fixtures/wpt/FileAPI/blob/Blob-text.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/blob/Blob-text.any.js
rename to test/fixtures/wpt/FileAPI/blob/Blob-text.any.js
diff --git a/test/wpt/tests/FileAPI/file/File-constructor-endings.html b/test/fixtures/wpt/FileAPI/file/File-constructor-endings.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/File-constructor-endings.html
rename to test/fixtures/wpt/FileAPI/file/File-constructor-endings.html
diff --git a/test/wpt/tests/FileAPI/file/File-constructor.any.js b/test/fixtures/wpt/FileAPI/file/File-constructor.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/File-constructor.any.js
rename to test/fixtures/wpt/FileAPI/file/File-constructor.any.js
diff --git a/test/wpt/tests/FileAPI/file/Worker-read-file-constructor.worker.js b/test/fixtures/wpt/FileAPI/file/Worker-read-file-constructor.worker.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/Worker-read-file-constructor.worker.js
rename to test/fixtures/wpt/FileAPI/file/Worker-read-file-constructor.worker.js
diff --git a/test/wpt/tests/FileAPI/file/resources/echo-content-escaped.py b/test/fixtures/wpt/FileAPI/file/resources/echo-content-escaped.py
similarity index 100%
rename from test/wpt/tests/FileAPI/file/resources/echo-content-escaped.py
rename to test/fixtures/wpt/FileAPI/file/resources/echo-content-escaped.py
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-controls.html b/test/fixtures/wpt/FileAPI/file/send-file-form-controls.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-controls.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-controls.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-iso-2022-jp.html b/test/fixtures/wpt/FileAPI/file/send-file-form-iso-2022-jp.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-iso-2022-jp.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-iso-2022-jp.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-punctuation.html b/test/fixtures/wpt/FileAPI/file/send-file-form-punctuation.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-punctuation.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-punctuation.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-utf-8.html b/test/fixtures/wpt/FileAPI/file/send-file-form-utf-8.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-utf-8.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-utf-8.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-windows-1252.html b/test/fixtures/wpt/FileAPI/file/send-file-form-windows-1252.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-windows-1252.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-windows-1252.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form-x-user-defined.html b/test/fixtures/wpt/FileAPI/file/send-file-form-x-user-defined.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form-x-user-defined.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form-x-user-defined.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-form.html b/test/fixtures/wpt/FileAPI/file/send-file-form.html
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-form.html
rename to test/fixtures/wpt/FileAPI/file/send-file-form.html
diff --git a/test/wpt/tests/FileAPI/file/send-file-formdata-controls.any.js b/test/fixtures/wpt/FileAPI/file/send-file-formdata-controls.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-formdata-controls.any.js
rename to test/fixtures/wpt/FileAPI/file/send-file-formdata-controls.any.js
diff --git a/test/wpt/tests/FileAPI/file/send-file-formdata-punctuation.any.js b/test/fixtures/wpt/FileAPI/file/send-file-formdata-punctuation.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-formdata-punctuation.any.js
rename to test/fixtures/wpt/FileAPI/file/send-file-formdata-punctuation.any.js
diff --git a/test/wpt/tests/FileAPI/file/send-file-formdata-utf-8.any.js b/test/fixtures/wpt/FileAPI/file/send-file-formdata-utf-8.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-formdata-utf-8.any.js
rename to test/fixtures/wpt/FileAPI/file/send-file-formdata-utf-8.any.js
diff --git a/test/wpt/tests/FileAPI/file/send-file-formdata.any.js b/test/fixtures/wpt/FileAPI/file/send-file-formdata.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/file/send-file-formdata.any.js
rename to test/fixtures/wpt/FileAPI/file/send-file-formdata.any.js
diff --git a/test/wpt/tests/FileAPI/fileReader.any.js b/test/fixtures/wpt/FileAPI/fileReader.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/fileReader.any.js
rename to test/fixtures/wpt/FileAPI/fileReader.any.js
diff --git a/test/wpt/tests/FileAPI/filelist-section/filelist.html b/test/fixtures/wpt/FileAPI/filelist-section/filelist.html
similarity index 100%
rename from test/wpt/tests/FileAPI/filelist-section/filelist.html
rename to test/fixtures/wpt/FileAPI/filelist-section/filelist.html
diff --git a/test/wpt/tests/FileAPI/filelist-section/filelist_multiple_selected_files-manual.html b/test/fixtures/wpt/FileAPI/filelist-section/filelist_multiple_selected_files-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/filelist-section/filelist_multiple_selected_files-manual.html
rename to test/fixtures/wpt/FileAPI/filelist-section/filelist_multiple_selected_files-manual.html
diff --git a/test/wpt/tests/FileAPI/filelist-section/filelist_selected_file-manual.html b/test/fixtures/wpt/FileAPI/filelist-section/filelist_selected_file-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/filelist-section/filelist_selected_file-manual.html
rename to test/fixtures/wpt/FileAPI/filelist-section/filelist_selected_file-manual.html
diff --git a/test/wpt/tests/FileAPI/filelist-section/support/upload.txt b/test/fixtures/wpt/FileAPI/filelist-section/support/upload.txt
similarity index 100%
rename from test/wpt/tests/FileAPI/filelist-section/support/upload.txt
rename to test/fixtures/wpt/FileAPI/filelist-section/support/upload.txt
diff --git a/test/wpt/tests/FileAPI/filelist-section/support/upload.zip b/test/fixtures/wpt/FileAPI/filelist-section/support/upload.zip
similarity index 100%
rename from test/wpt/tests/FileAPI/filelist-section/support/upload.zip
rename to test/fixtures/wpt/FileAPI/filelist-section/support/upload.zip
diff --git a/test/wpt/tests/FileAPI/historical.https.html b/test/fixtures/wpt/FileAPI/historical.https.html
similarity index 100%
rename from test/wpt/tests/FileAPI/historical.https.html
rename to test/fixtures/wpt/FileAPI/historical.https.html
diff --git a/test/wpt/tests/FileAPI/idlharness-manual.html b/test/fixtures/wpt/FileAPI/idlharness-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/idlharness-manual.html
rename to test/fixtures/wpt/FileAPI/idlharness-manual.html
diff --git a/test/wpt/tests/FileAPI/idlharness.any.js b/test/fixtures/wpt/FileAPI/idlharness.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/idlharness.any.js
rename to test/fixtures/wpt/FileAPI/idlharness.any.js
diff --git a/test/wpt/tests/FileAPI/idlharness.html b/test/fixtures/wpt/FileAPI/idlharness.html
similarity index 100%
rename from test/wpt/tests/FileAPI/idlharness.html
rename to test/fixtures/wpt/FileAPI/idlharness.html
diff --git a/test/wpt/tests/FileAPI/idlharness.worker.js b/test/fixtures/wpt/FileAPI/idlharness.worker.js
similarity index 100%
rename from test/wpt/tests/FileAPI/idlharness.worker.js
rename to test/fixtures/wpt/FileAPI/idlharness.worker.js
diff --git a/test/wpt/tests/FileAPI/progress-manual.html b/test/fixtures/wpt/FileAPI/progress-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/progress-manual.html
rename to test/fixtures/wpt/FileAPI/progress-manual.html
diff --git a/test/wpt/tests/FileAPI/reading-data-section/Determining-Encoding.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/Determining-Encoding.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/Determining-Encoding.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/Determining-Encoding.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/FileReader-multiple-reads.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/FileReader-multiple-reads.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_abort.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_abort.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_abort.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_abort.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_error.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_error.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_error.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_error.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_events.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_events.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_events.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_events.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_file-manual.html b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_file-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_file-manual.html
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_file-manual.html
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_file_img-manual.html b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_file_img-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_file_img-manual.html
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_file_img-manual.html
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsDataURL.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_readAsText.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsText.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_readAsText.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_readAsText.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_readystate.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_readystate.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_readystate.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_readystate.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/filereader_result.any.js b/test/fixtures/wpt/FileAPI/reading-data-section/filereader_result.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/filereader_result.any.js
rename to test/fixtures/wpt/FileAPI/reading-data-section/filereader_result.any.js
diff --git a/test/wpt/tests/FileAPI/reading-data-section/support/blue-100x100.png b/test/fixtures/wpt/FileAPI/reading-data-section/support/blue-100x100.png
similarity index 100%
rename from test/wpt/tests/FileAPI/reading-data-section/support/blue-100x100.png
rename to test/fixtures/wpt/FileAPI/reading-data-section/support/blue-100x100.png
diff --git a/test/wpt/tests/FileAPI/support/Blob.js b/test/fixtures/wpt/FileAPI/support/Blob.js
similarity index 100%
rename from test/wpt/tests/FileAPI/support/Blob.js
rename to test/fixtures/wpt/FileAPI/support/Blob.js
diff --git a/test/wpt/tests/FileAPI/support/document-domain-setter.sub.html b/test/fixtures/wpt/FileAPI/support/document-domain-setter.sub.html
similarity index 100%
rename from test/wpt/tests/FileAPI/support/document-domain-setter.sub.html
rename to test/fixtures/wpt/FileAPI/support/document-domain-setter.sub.html
diff --git a/test/wpt/tests/FileAPI/support/empty-document.html b/test/fixtures/wpt/FileAPI/support/empty-document.html
similarity index 100%
rename from test/wpt/tests/FileAPI/support/empty-document.html
rename to test/fixtures/wpt/FileAPI/support/empty-document.html
diff --git a/test/wpt/tests/FileAPI/support/historical-serviceworker.js b/test/fixtures/wpt/FileAPI/support/historical-serviceworker.js
similarity index 100%
rename from test/wpt/tests/FileAPI/support/historical-serviceworker.js
rename to test/fixtures/wpt/FileAPI/support/historical-serviceworker.js
diff --git a/test/wpt/tests/FileAPI/support/incumbent.sub.html b/test/fixtures/wpt/FileAPI/support/incumbent.sub.html
similarity index 100%
rename from test/wpt/tests/FileAPI/support/incumbent.sub.html
rename to test/fixtures/wpt/FileAPI/support/incumbent.sub.html
diff --git a/test/wpt/tests/FileAPI/support/send-file-form-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js
similarity index 100%
rename from test/wpt/tests/FileAPI/support/send-file-form-helper.js
rename to test/fixtures/wpt/FileAPI/support/send-file-form-helper.js
diff --git a/test/wpt/tests/FileAPI/support/send-file-formdata-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js
similarity index 100%
rename from test/wpt/tests/FileAPI/support/send-file-formdata-helper.js
rename to test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js
diff --git a/test/wpt/tests/FileAPI/support/upload.txt b/test/fixtures/wpt/FileAPI/support/upload.txt
similarity index 100%
rename from test/wpt/tests/FileAPI/support/upload.txt
rename to test/fixtures/wpt/FileAPI/support/upload.txt
diff --git a/test/wpt/tests/FileAPI/support/url-origin.html b/test/fixtures/wpt/FileAPI/support/url-origin.html
similarity index 100%
rename from test/wpt/tests/FileAPI/support/url-origin.html
rename to test/fixtures/wpt/FileAPI/support/url-origin.html
diff --git a/test/wpt/tests/FileAPI/unicode.html b/test/fixtures/wpt/FileAPI/unicode.html
similarity index 100%
rename from test/wpt/tests/FileAPI/unicode.html
rename to test/fixtures/wpt/FileAPI/unicode.html
diff --git a/test/wpt/tests/FileAPI/url/cross-global-revoke.sub.html b/test/fixtures/wpt/FileAPI/url/cross-global-revoke.sub.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/cross-global-revoke.sub.html
rename to test/fixtures/wpt/FileAPI/url/cross-global-revoke.sub.html
diff --git a/test/wpt/tests/FileAPI/url/multi-global-origin-serialization.sub.html b/test/fixtures/wpt/FileAPI/url/multi-global-origin-serialization.sub.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/multi-global-origin-serialization.sub.html
rename to test/fixtures/wpt/FileAPI/url/multi-global-origin-serialization.sub.html
diff --git a/test/wpt/tests/FileAPI/url/resources/create-helper.html b/test/fixtures/wpt/FileAPI/url/resources/create-helper.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/resources/create-helper.html
rename to test/fixtures/wpt/FileAPI/url/resources/create-helper.html
diff --git a/test/wpt/tests/FileAPI/url/resources/create-helper.js b/test/fixtures/wpt/FileAPI/url/resources/create-helper.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/resources/create-helper.js
rename to test/fixtures/wpt/FileAPI/url/resources/create-helper.js
diff --git a/test/wpt/tests/FileAPI/url/resources/fetch-tests.js b/test/fixtures/wpt/FileAPI/url/resources/fetch-tests.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/resources/fetch-tests.js
rename to test/fixtures/wpt/FileAPI/url/resources/fetch-tests.js
diff --git a/test/wpt/tests/FileAPI/url/resources/revoke-helper.html b/test/fixtures/wpt/FileAPI/url/resources/revoke-helper.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/resources/revoke-helper.html
rename to test/fixtures/wpt/FileAPI/url/resources/revoke-helper.html
diff --git a/test/wpt/tests/FileAPI/url/resources/revoke-helper.js b/test/fixtures/wpt/FileAPI/url/resources/revoke-helper.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/resources/revoke-helper.js
rename to test/fixtures/wpt/FileAPI/url/resources/revoke-helper.js
diff --git a/test/wpt/tests/FileAPI/url/sandboxed-iframe.html b/test/fixtures/wpt/FileAPI/url/sandboxed-iframe.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/sandboxed-iframe.html
rename to test/fixtures/wpt/FileAPI/url/sandboxed-iframe.html
diff --git a/test/wpt/tests/FileAPI/url/unicode-origin.sub.html b/test/fixtures/wpt/FileAPI/url/unicode-origin.sub.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/unicode-origin.sub.html
rename to test/fixtures/wpt/FileAPI/url/unicode-origin.sub.html
diff --git a/test/wpt/tests/FileAPI/url/url-charset.window.js b/test/fixtures/wpt/FileAPI/url/url-charset.window.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-charset.window.js
rename to test/fixtures/wpt/FileAPI/url/url-charset.window.js
diff --git a/test/wpt/tests/FileAPI/url/url-format.any.js b/test/fixtures/wpt/FileAPI/url/url-format.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-format.any.js
rename to test/fixtures/wpt/FileAPI/url/url-format.any.js
diff --git a/test/wpt/tests/FileAPI/url/url-in-tags-revoke.window.js b/test/fixtures/wpt/FileAPI/url/url-in-tags-revoke.window.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-in-tags-revoke.window.js
rename to test/fixtures/wpt/FileAPI/url/url-in-tags-revoke.window.js
diff --git a/test/wpt/tests/FileAPI/url/url-in-tags.window.js b/test/fixtures/wpt/FileAPI/url/url-in-tags.window.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-in-tags.window.js
rename to test/fixtures/wpt/FileAPI/url/url-in-tags.window.js
diff --git a/test/wpt/tests/FileAPI/url/url-lifetime.html b/test/fixtures/wpt/FileAPI/url/url-lifetime.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-lifetime.html
rename to test/fixtures/wpt/FileAPI/url/url-lifetime.html
diff --git a/test/wpt/tests/FileAPI/url/url-reload.window.js b/test/fixtures/wpt/FileAPI/url/url-reload.window.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-reload.window.js
rename to test/fixtures/wpt/FileAPI/url/url-reload.window.js
diff --git a/test/wpt/tests/FileAPI/url/url-with-fetch.any.js b/test/fixtures/wpt/FileAPI/url/url-with-fetch.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-with-fetch.any.js
rename to test/fixtures/wpt/FileAPI/url/url-with-fetch.any.js
diff --git a/test/wpt/tests/FileAPI/url/url-with-xhr.any.js b/test/fixtures/wpt/FileAPI/url/url-with-xhr.any.js
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url-with-xhr.any.js
rename to test/fixtures/wpt/FileAPI/url/url-with-xhr.any.js
diff --git a/test/wpt/tests/FileAPI/url/url_createobjecturl_file-manual.html b/test/fixtures/wpt/FileAPI/url/url_createobjecturl_file-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url_createobjecturl_file-manual.html
rename to test/fixtures/wpt/FileAPI/url/url_createobjecturl_file-manual.html
diff --git a/test/wpt/tests/FileAPI/url/url_createobjecturl_file_img-manual.html b/test/fixtures/wpt/FileAPI/url/url_createobjecturl_file_img-manual.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url_createobjecturl_file_img-manual.html
rename to test/fixtures/wpt/FileAPI/url/url_createobjecturl_file_img-manual.html
diff --git a/test/wpt/tests/FileAPI/url/url_xmlhttprequest_img-ref.html b/test/fixtures/wpt/FileAPI/url/url_xmlhttprequest_img-ref.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url_xmlhttprequest_img-ref.html
rename to test/fixtures/wpt/FileAPI/url/url_xmlhttprequest_img-ref.html
diff --git a/test/wpt/tests/FileAPI/url/url_xmlhttprequest_img.html b/test/fixtures/wpt/FileAPI/url/url_xmlhttprequest_img.html
similarity index 100%
rename from test/wpt/tests/FileAPI/url/url_xmlhttprequest_img.html
rename to test/fixtures/wpt/FileAPI/url/url_xmlhttprequest_img.html
diff --git a/test/wpt/tests/LICENSE.md b/test/fixtures/wpt/LICENSE.md
similarity index 100%
rename from test/wpt/tests/LICENSE.md
rename to test/fixtures/wpt/LICENSE.md
diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md
new file mode 100644
index 00000000000..e07926822e6
--- /dev/null
+++ b/test/fixtures/wpt/README.md
@@ -0,0 +1,26 @@
+# Web Platform Test Fixtures
+
+The files in this folder, including this document,
+are generated by [`git node wpt`][].
+
+This folder contains a subset of the [Web Platform Tests][] for the
+implementation of Web APIs in Node.js.
+
+See [test/wpt](../../wpt/README.md) for information on how these tests are run.
+
+Last update:
+
+- common: https://github.com/web-platform-tests/wpt/tree/8bfc72a4f7/common
+- eventsource: https://github.com/web-platform-tests/wpt/tree/93ca7d3363/eventsource
+- fetch: https://github.com/web-platform-tests/wpt/tree/1b9332c3c8/fetch
+- FileAPI: https://github.com/web-platform-tests/wpt/tree/5aa50dd415/FileAPI
+- interfaces: https://github.com/web-platform-tests/wpt/tree/40d3681ef5/interfaces
+- mimesniff: https://github.com/web-platform-tests/wpt/tree/0e9d465d28/mimesniff
+- resources: https://github.com/web-platform-tests/wpt/tree/34dfef83fc/resources
+- service-workers: https://github.com/web-platform-tests/wpt/tree/3ebc2c5109/service-workers
+- storage: https://github.com/web-platform-tests/wpt/tree/9f1cfd6824/storage
+- websockets: https://github.com/web-platform-tests/wpt/tree/a7a594d8c0/websockets
+- xhr: https://github.com/web-platform-tests/wpt/tree/5aa50dd415/xhr
+
+[Web Platform Tests]: https://github.com/web-platform-tests/wpt
+[`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-wpt
diff --git a/test/wpt/tests/common/CustomCorsResponse.py b/test/fixtures/wpt/common/CustomCorsResponse.py
similarity index 100%
rename from test/wpt/tests/common/CustomCorsResponse.py
rename to test/fixtures/wpt/common/CustomCorsResponse.py
diff --git a/test/wpt/tests/common/META.yml b/test/fixtures/wpt/common/META.yml
similarity index 100%
rename from test/wpt/tests/common/META.yml
rename to test/fixtures/wpt/common/META.yml
diff --git a/test/wpt/tests/common/PrefixedLocalStorage.js b/test/fixtures/wpt/common/PrefixedLocalStorage.js
similarity index 100%
rename from test/wpt/tests/common/PrefixedLocalStorage.js
rename to test/fixtures/wpt/common/PrefixedLocalStorage.js
diff --git a/test/wpt/tests/common/PrefixedLocalStorage.js.headers b/test/fixtures/wpt/common/PrefixedLocalStorage.js.headers
similarity index 100%
rename from test/wpt/tests/common/PrefixedLocalStorage.js.headers
rename to test/fixtures/wpt/common/PrefixedLocalStorage.js.headers
diff --git a/test/wpt/tests/common/PrefixedPostMessage.js b/test/fixtures/wpt/common/PrefixedPostMessage.js
similarity index 100%
rename from test/wpt/tests/common/PrefixedPostMessage.js
rename to test/fixtures/wpt/common/PrefixedPostMessage.js
diff --git a/test/wpt/tests/common/PrefixedPostMessage.js.headers b/test/fixtures/wpt/common/PrefixedPostMessage.js.headers
similarity index 100%
rename from test/wpt/tests/common/PrefixedPostMessage.js.headers
rename to test/fixtures/wpt/common/PrefixedPostMessage.js.headers
diff --git a/test/wpt/tests/common/README.md b/test/fixtures/wpt/common/README.md
similarity index 100%
rename from test/wpt/tests/common/README.md
rename to test/fixtures/wpt/common/README.md
diff --git a/test/wpt/tests/common/__init__.py b/test/fixtures/wpt/common/__init__.py
similarity index 100%
rename from test/wpt/tests/common/__init__.py
rename to test/fixtures/wpt/common/__init__.py
diff --git a/test/wpt/tests/common/arrays.js b/test/fixtures/wpt/common/arrays.js
similarity index 100%
rename from test/wpt/tests/common/arrays.js
rename to test/fixtures/wpt/common/arrays.js
diff --git a/test/wpt/tests/common/blank-with-cors.html b/test/fixtures/wpt/common/blank-with-cors.html
similarity index 100%
rename from test/wpt/tests/common/blank-with-cors.html
rename to test/fixtures/wpt/common/blank-with-cors.html
diff --git a/test/wpt/tests/common/blank-with-cors.html.headers b/test/fixtures/wpt/common/blank-with-cors.html.headers
similarity index 100%
rename from test/wpt/tests/common/blank-with-cors.html.headers
rename to test/fixtures/wpt/common/blank-with-cors.html.headers
diff --git a/test/wpt/tests/common/blank.html b/test/fixtures/wpt/common/blank.html
similarity index 100%
rename from test/wpt/tests/common/blank.html
rename to test/fixtures/wpt/common/blank.html
diff --git a/test/wpt/tests/common/custom-cors-response.js b/test/fixtures/wpt/common/custom-cors-response.js
similarity index 100%
rename from test/wpt/tests/common/custom-cors-response.js
rename to test/fixtures/wpt/common/custom-cors-response.js
diff --git a/test/wpt/tests/common/dispatcher/README.md b/test/fixtures/wpt/common/dispatcher/README.md
similarity index 100%
rename from test/wpt/tests/common/dispatcher/README.md
rename to test/fixtures/wpt/common/dispatcher/README.md
diff --git a/test/wpt/tests/common/dispatcher/dispatcher.js b/test/fixtures/wpt/common/dispatcher/dispatcher.js
similarity index 100%
rename from test/wpt/tests/common/dispatcher/dispatcher.js
rename to test/fixtures/wpt/common/dispatcher/dispatcher.js
diff --git a/test/wpt/tests/common/dispatcher/dispatcher.py b/test/fixtures/wpt/common/dispatcher/dispatcher.py
similarity index 100%
rename from test/wpt/tests/common/dispatcher/dispatcher.py
rename to test/fixtures/wpt/common/dispatcher/dispatcher.py
diff --git a/test/wpt/tests/common/dispatcher/executor-service-worker.js b/test/fixtures/wpt/common/dispatcher/executor-service-worker.js
similarity index 100%
rename from test/wpt/tests/common/dispatcher/executor-service-worker.js
rename to test/fixtures/wpt/common/dispatcher/executor-service-worker.js
diff --git a/test/wpt/tests/common/dispatcher/executor-worker.js b/test/fixtures/wpt/common/dispatcher/executor-worker.js
similarity index 100%
rename from test/wpt/tests/common/dispatcher/executor-worker.js
rename to test/fixtures/wpt/common/dispatcher/executor-worker.js
diff --git a/test/wpt/tests/common/dispatcher/executor.html b/test/fixtures/wpt/common/dispatcher/executor.html
similarity index 100%
rename from test/wpt/tests/common/dispatcher/executor.html
rename to test/fixtures/wpt/common/dispatcher/executor.html
diff --git a/test/wpt/tests/common/dispatcher/remote-executor.html b/test/fixtures/wpt/common/dispatcher/remote-executor.html
similarity index 100%
rename from test/wpt/tests/common/dispatcher/remote-executor.html
rename to test/fixtures/wpt/common/dispatcher/remote-executor.html
diff --git a/test/wpt/tests/common/domain-setter.sub.html b/test/fixtures/wpt/common/domain-setter.sub.html
similarity index 100%
rename from test/wpt/tests/common/domain-setter.sub.html
rename to test/fixtures/wpt/common/domain-setter.sub.html
diff --git a/test/wpt/tests/common/dummy.json b/test/fixtures/wpt/common/dummy.json
similarity index 100%
rename from test/wpt/tests/common/dummy.json
rename to test/fixtures/wpt/common/dummy.json
diff --git a/test/wpt/tests/common/dummy.xhtml b/test/fixtures/wpt/common/dummy.xhtml
similarity index 100%
rename from test/wpt/tests/common/dummy.xhtml
rename to test/fixtures/wpt/common/dummy.xhtml
diff --git a/test/wpt/tests/common/dummy.xml b/test/fixtures/wpt/common/dummy.xml
similarity index 100%
rename from test/wpt/tests/common/dummy.xml
rename to test/fixtures/wpt/common/dummy.xml
diff --git a/test/wpt/tests/common/echo.py b/test/fixtures/wpt/common/echo.py
similarity index 100%
rename from test/wpt/tests/common/echo.py
rename to test/fixtures/wpt/common/echo.py
diff --git a/test/wpt/tests/common/gc.js b/test/fixtures/wpt/common/gc.js
similarity index 100%
rename from test/wpt/tests/common/gc.js
rename to test/fixtures/wpt/common/gc.js
diff --git a/test/wpt/tests/common/get-host-info.sub.js b/test/fixtures/wpt/common/get-host-info.sub.js
similarity index 100%
rename from test/wpt/tests/common/get-host-info.sub.js
rename to test/fixtures/wpt/common/get-host-info.sub.js
diff --git a/test/wpt/tests/common/get-host-info.sub.js.headers b/test/fixtures/wpt/common/get-host-info.sub.js.headers
similarity index 100%
rename from test/wpt/tests/common/get-host-info.sub.js.headers
rename to test/fixtures/wpt/common/get-host-info.sub.js.headers
diff --git a/test/wpt/tests/common/media.js b/test/fixtures/wpt/common/media.js
similarity index 89%
rename from test/wpt/tests/common/media.js
rename to test/fixtures/wpt/common/media.js
index 800593f5343..a5a8e957e9b 100644
--- a/test/wpt/tests/common/media.js
+++ b/test/fixtures/wpt/common/media.js
@@ -14,9 +14,6 @@ function getVideoURI(base)
if (videotag.canPlayType('video/webm; codecs="vp9, opus"') )
{
extension = '.webm';
- } else if ( videotag.canPlayType('video/ogg; codecs="theora, vorbis"') )
- {
- extension = '.ogv';
}
}
@@ -52,7 +49,6 @@ function getMediaContentType(url) {
var extension = new URL(url, location).pathname.split(".").pop();
var map = {
"mp4" : "video/mp4",
- "ogv" : "application/ogg",
"webm": "video/webm",
"mp3" : "audio/mp3",
"oga" : "application/ogg",
diff --git a/test/wpt/tests/common/media.js.headers b/test/fixtures/wpt/common/media.js.headers
similarity index 100%
rename from test/wpt/tests/common/media.js.headers
rename to test/fixtures/wpt/common/media.js.headers
diff --git a/test/wpt/tests/common/object-association.js b/test/fixtures/wpt/common/object-association.js
similarity index 100%
rename from test/wpt/tests/common/object-association.js
rename to test/fixtures/wpt/common/object-association.js
diff --git a/test/wpt/tests/common/object-association.js.headers b/test/fixtures/wpt/common/object-association.js.headers
similarity index 100%
rename from test/wpt/tests/common/object-association.js.headers
rename to test/fixtures/wpt/common/object-association.js.headers
diff --git a/test/wpt/tests/common/performance-timeline-utils.js b/test/fixtures/wpt/common/performance-timeline-utils.js
similarity index 100%
rename from test/wpt/tests/common/performance-timeline-utils.js
rename to test/fixtures/wpt/common/performance-timeline-utils.js
diff --git a/test/wpt/tests/common/performance-timeline-utils.js.headers b/test/fixtures/wpt/common/performance-timeline-utils.js.headers
similarity index 100%
rename from test/wpt/tests/common/performance-timeline-utils.js.headers
rename to test/fixtures/wpt/common/performance-timeline-utils.js.headers
diff --git a/test/wpt/tests/common/proxy-all.sub.pac b/test/fixtures/wpt/common/proxy-all.sub.pac
similarity index 100%
rename from test/wpt/tests/common/proxy-all.sub.pac
rename to test/fixtures/wpt/common/proxy-all.sub.pac
diff --git a/test/wpt/tests/common/redirect-opt-in.py b/test/fixtures/wpt/common/redirect-opt-in.py
similarity index 100%
rename from test/wpt/tests/common/redirect-opt-in.py
rename to test/fixtures/wpt/common/redirect-opt-in.py
diff --git a/test/wpt/tests/common/redirect.py b/test/fixtures/wpt/common/redirect.py
similarity index 100%
rename from test/wpt/tests/common/redirect.py
rename to test/fixtures/wpt/common/redirect.py
diff --git a/test/wpt/tests/common/refresh.py b/test/fixtures/wpt/common/refresh.py
similarity index 100%
rename from test/wpt/tests/common/refresh.py
rename to test/fixtures/wpt/common/refresh.py
diff --git a/test/wpt/tests/common/reftest-wait.js b/test/fixtures/wpt/common/reftest-wait.js
similarity index 100%
rename from test/wpt/tests/common/reftest-wait.js
rename to test/fixtures/wpt/common/reftest-wait.js
diff --git a/test/wpt/tests/common/reftest-wait.js.headers b/test/fixtures/wpt/common/reftest-wait.js.headers
similarity index 100%
rename from test/wpt/tests/common/reftest-wait.js.headers
rename to test/fixtures/wpt/common/reftest-wait.js.headers
diff --git a/test/wpt/tests/common/rendering-utils.js b/test/fixtures/wpt/common/rendering-utils.js
similarity index 100%
rename from test/wpt/tests/common/rendering-utils.js
rename to test/fixtures/wpt/common/rendering-utils.js
diff --git a/test/wpt/tests/common/sab.js b/test/fixtures/wpt/common/sab.js
similarity index 100%
rename from test/wpt/tests/common/sab.js
rename to test/fixtures/wpt/common/sab.js
diff --git a/test/wpt/tests/common/security-features/README.md b/test/fixtures/wpt/common/security-features/README.md
similarity index 100%
rename from test/wpt/tests/common/security-features/README.md
rename to test/fixtures/wpt/common/security-features/README.md
diff --git a/test/wpt/tests/common/security-features/__init__.py b/test/fixtures/wpt/common/security-features/__init__.py
similarity index 100%
rename from test/wpt/tests/common/security-features/__init__.py
rename to test/fixtures/wpt/common/security-features/__init__.py
diff --git a/test/wpt/tests/common/security-features/resources/common.sub.js b/test/fixtures/wpt/common/security-features/resources/common.sub.js
similarity index 100%
rename from test/wpt/tests/common/security-features/resources/common.sub.js
rename to test/fixtures/wpt/common/security-features/resources/common.sub.js
diff --git a/test/wpt/tests/common/security-features/resources/common.sub.js.headers b/test/fixtures/wpt/common/security-features/resources/common.sub.js.headers
similarity index 100%
rename from test/wpt/tests/common/security-features/resources/common.sub.js.headers
rename to test/fixtures/wpt/common/security-features/resources/common.sub.js.headers
diff --git a/test/wpt/tests/common/security-features/scope/__init__.py b/test/fixtures/wpt/common/security-features/scope/__init__.py
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/__init__.py
rename to test/fixtures/wpt/common/security-features/scope/__init__.py
diff --git a/test/wpt/tests/common/security-features/scope/document.py b/test/fixtures/wpt/common/security-features/scope/document.py
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/document.py
rename to test/fixtures/wpt/common/security-features/scope/document.py
diff --git a/test/wpt/tests/common/security-features/scope/template/document.html.template b/test/fixtures/wpt/common/security-features/scope/template/document.html.template
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/template/document.html.template
rename to test/fixtures/wpt/common/security-features/scope/template/document.html.template
diff --git a/test/wpt/tests/common/security-features/scope/template/worker.js.template b/test/fixtures/wpt/common/security-features/scope/template/worker.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/template/worker.js.template
rename to test/fixtures/wpt/common/security-features/scope/template/worker.js.template
diff --git a/test/wpt/tests/common/security-features/scope/util.py b/test/fixtures/wpt/common/security-features/scope/util.py
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/util.py
rename to test/fixtures/wpt/common/security-features/scope/util.py
diff --git a/test/wpt/tests/common/security-features/scope/worker.py b/test/fixtures/wpt/common/security-features/scope/worker.py
similarity index 100%
rename from test/wpt/tests/common/security-features/scope/worker.py
rename to test/fixtures/wpt/common/security-features/scope/worker.py
diff --git a/test/wpt/tests/common/security-features/subresource/__init__.py b/test/fixtures/wpt/common/security-features/subresource/__init__.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/__init__.py
rename to test/fixtures/wpt/common/security-features/subresource/__init__.py
diff --git a/test/wpt/tests/common/security-features/subresource/audio.py b/test/fixtures/wpt/common/security-features/subresource/audio.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/audio.py
rename to test/fixtures/wpt/common/security-features/subresource/audio.py
diff --git a/test/wpt/tests/common/security-features/subresource/document.py b/test/fixtures/wpt/common/security-features/subresource/document.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/document.py
rename to test/fixtures/wpt/common/security-features/subresource/document.py
diff --git a/test/wpt/tests/common/security-features/subresource/empty.py b/test/fixtures/wpt/common/security-features/subresource/empty.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/empty.py
rename to test/fixtures/wpt/common/security-features/subresource/empty.py
diff --git a/test/wpt/tests/common/security-features/subresource/font.py b/test/fixtures/wpt/common/security-features/subresource/font.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/font.py
rename to test/fixtures/wpt/common/security-features/subresource/font.py
diff --git a/test/wpt/tests/common/security-features/subresource/image.py b/test/fixtures/wpt/common/security-features/subresource/image.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/image.py
rename to test/fixtures/wpt/common/security-features/subresource/image.py
diff --git a/test/wpt/tests/common/security-features/subresource/referrer.py b/test/fixtures/wpt/common/security-features/subresource/referrer.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/referrer.py
rename to test/fixtures/wpt/common/security-features/subresource/referrer.py
diff --git a/test/wpt/tests/common/security-features/subresource/script.py b/test/fixtures/wpt/common/security-features/subresource/script.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/script.py
rename to test/fixtures/wpt/common/security-features/subresource/script.py
diff --git a/test/wpt/tests/common/security-features/subresource/shared-worker.py b/test/fixtures/wpt/common/security-features/subresource/shared-worker.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/shared-worker.py
rename to test/fixtures/wpt/common/security-features/subresource/shared-worker.py
diff --git a/test/wpt/tests/common/security-features/subresource/static-import.py b/test/fixtures/wpt/common/security-features/subresource/static-import.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/static-import.py
rename to test/fixtures/wpt/common/security-features/subresource/static-import.py
diff --git a/test/wpt/tests/common/security-features/subresource/stylesheet.py b/test/fixtures/wpt/common/security-features/subresource/stylesheet.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/stylesheet.py
rename to test/fixtures/wpt/common/security-features/subresource/stylesheet.py
diff --git a/test/wpt/tests/common/security-features/subresource/subresource.py b/test/fixtures/wpt/common/security-features/subresource/subresource.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/subresource.py
rename to test/fixtures/wpt/common/security-features/subresource/subresource.py
diff --git a/test/wpt/tests/common/security-features/subresource/svg.py b/test/fixtures/wpt/common/security-features/subresource/svg.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/svg.py
rename to test/fixtures/wpt/common/security-features/subresource/svg.py
diff --git a/test/wpt/tests/common/security-features/subresource/template/document.html.template b/test/fixtures/wpt/common/security-features/subresource/template/document.html.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/document.html.template
rename to test/fixtures/wpt/common/security-features/subresource/template/document.html.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/font.css.template b/test/fixtures/wpt/common/security-features/subresource/template/font.css.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/font.css.template
rename to test/fixtures/wpt/common/security-features/subresource/template/font.css.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/image.css.template b/test/fixtures/wpt/common/security-features/subresource/template/image.css.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/image.css.template
rename to test/fixtures/wpt/common/security-features/subresource/template/image.css.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/script.js.template b/test/fixtures/wpt/common/security-features/subresource/template/script.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/script.js.template
rename to test/fixtures/wpt/common/security-features/subresource/template/script.js.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/shared-worker.js.template b/test/fixtures/wpt/common/security-features/subresource/template/shared-worker.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/shared-worker.js.template
rename to test/fixtures/wpt/common/security-features/subresource/template/shared-worker.js.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/static-import.js.template b/test/fixtures/wpt/common/security-features/subresource/template/static-import.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/static-import.js.template
rename to test/fixtures/wpt/common/security-features/subresource/template/static-import.js.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/svg.css.template b/test/fixtures/wpt/common/security-features/subresource/template/svg.css.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/svg.css.template
rename to test/fixtures/wpt/common/security-features/subresource/template/svg.css.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/svg.embedded.template b/test/fixtures/wpt/common/security-features/subresource/template/svg.embedded.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/svg.embedded.template
rename to test/fixtures/wpt/common/security-features/subresource/template/svg.embedded.template
diff --git a/test/wpt/tests/common/security-features/subresource/template/worker.js.template b/test/fixtures/wpt/common/security-features/subresource/template/worker.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/template/worker.js.template
rename to test/fixtures/wpt/common/security-features/subresource/template/worker.js.template
diff --git a/test/wpt/tests/common/security-features/subresource/video.py b/test/fixtures/wpt/common/security-features/subresource/video.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/video.py
rename to test/fixtures/wpt/common/security-features/subresource/video.py
diff --git a/test/wpt/tests/common/security-features/subresource/worker.py b/test/fixtures/wpt/common/security-features/subresource/worker.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/worker.py
rename to test/fixtures/wpt/common/security-features/subresource/worker.py
diff --git a/test/wpt/tests/common/security-features/subresource/xhr.py b/test/fixtures/wpt/common/security-features/subresource/xhr.py
similarity index 100%
rename from test/wpt/tests/common/security-features/subresource/xhr.py
rename to test/fixtures/wpt/common/security-features/subresource/xhr.py
diff --git a/test/wpt/tests/common/security-features/tools/format_spec_src_json.py b/test/fixtures/wpt/common/security-features/tools/format_spec_src_json.py
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/format_spec_src_json.py
rename to test/fixtures/wpt/common/security-features/tools/format_spec_src_json.py
diff --git a/test/wpt/tests/common/security-features/tools/generate.py b/test/fixtures/wpt/common/security-features/tools/generate.py
similarity index 99%
rename from test/wpt/tests/common/security-features/tools/generate.py
rename to test/fixtures/wpt/common/security-features/tools/generate.py
index 409b4f195ff..d1cd33147fc 100644
--- a/test/wpt/tests/common/security-features/tools/generate.py
+++ b/test/fixtures/wpt/common/security-features/tools/generate.py
@@ -321,7 +321,7 @@ def generate_test_source_files(spec_directory, test_helper_filenames,
# Choose a debug/release template depending on the target.
html_template = "test.%s.html.template" % target
- artifact_order = test_expansion_schema.keys()
+ artifact_order = list(test_expansion_schema.keys())
artifact_order.remove('expansion')
excluded_selection_pattern = ''
diff --git a/test/wpt/tests/common/security-features/tools/spec.src.json b/test/fixtures/wpt/common/security-features/tools/spec.src.json
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/spec.src.json
rename to test/fixtures/wpt/common/security-features/tools/spec.src.json
diff --git a/test/wpt/tests/common/security-features/tools/spec_validator.py b/test/fixtures/wpt/common/security-features/tools/spec_validator.py
similarity index 98%
rename from test/wpt/tests/common/security-features/tools/spec_validator.py
rename to test/fixtures/wpt/common/security-features/tools/spec_validator.py
index f8a1390ef0d..e4c9e145f83 100644
--- a/test/wpt/tests/common/security-features/tools/spec_validator.py
+++ b/test/fixtures/wpt/common/security-features/tools/spec_validator.py
@@ -5,7 +5,7 @@
def assert_non_empty_string(obj, field):
assert field in obj, 'Missing field "%s"' % field
- assert isinstance(obj[field], basestring), \
+ assert isinstance(obj[field], str), \
'Field "%s" must be a string' % field
assert len(obj[field]) > 0, 'Field "%s" must not be empty' % field
@@ -34,7 +34,7 @@ def assert_value_from(obj, field, items):
def assert_atom_or_list_items_from(obj, field, items):
- if isinstance(obj[field], basestring) or isinstance(
+ if isinstance(obj[field], str) or isinstance(
obj[field], int) or obj[field] is None:
assert_value_from(obj, field, items)
return
@@ -236,7 +236,7 @@ def assert_valid_spec_json(spec_json):
try:
validate(spec_json, error_details)
except AssertionError as err:
- print('ERROR:', err.message)
+ print('ERROR:', err)
print(json.dumps(error_details, indent=4))
sys.exit(1)
diff --git a/test/wpt/tests/common/security-features/tools/template/disclaimer.template b/test/fixtures/wpt/common/security-features/tools/template/disclaimer.template
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/template/disclaimer.template
rename to test/fixtures/wpt/common/security-features/tools/template/disclaimer.template
diff --git a/test/wpt/tests/common/security-features/tools/template/spec_json.js.template b/test/fixtures/wpt/common/security-features/tools/template/spec_json.js.template
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/template/spec_json.js.template
rename to test/fixtures/wpt/common/security-features/tools/template/spec_json.js.template
diff --git a/test/wpt/tests/common/security-features/tools/template/test.debug.html.template b/test/fixtures/wpt/common/security-features/tools/template/test.debug.html.template
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/template/test.debug.html.template
rename to test/fixtures/wpt/common/security-features/tools/template/test.debug.html.template
diff --git a/test/wpt/tests/common/security-features/tools/template/test.release.html.template b/test/fixtures/wpt/common/security-features/tools/template/test.release.html.template
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/template/test.release.html.template
rename to test/fixtures/wpt/common/security-features/tools/template/test.release.html.template
diff --git a/test/wpt/tests/common/security-features/tools/util.py b/test/fixtures/wpt/common/security-features/tools/util.py
similarity index 100%
rename from test/wpt/tests/common/security-features/tools/util.py
rename to test/fixtures/wpt/common/security-features/tools/util.py
diff --git a/test/wpt/tests/common/security-features/types.md b/test/fixtures/wpt/common/security-features/types.md
similarity index 100%
rename from test/wpt/tests/common/security-features/types.md
rename to test/fixtures/wpt/common/security-features/types.md
diff --git a/test/wpt/tests/common/slow-redirect.py b/test/fixtures/wpt/common/slow-redirect.py
similarity index 100%
rename from test/wpt/tests/common/slow-redirect.py
rename to test/fixtures/wpt/common/slow-redirect.py
diff --git a/test/wpt/tests/common/slow.py b/test/fixtures/wpt/common/slow.py
similarity index 100%
rename from test/wpt/tests/common/slow.py
rename to test/fixtures/wpt/common/slow.py
diff --git a/test/wpt/tests/common/square.png b/test/fixtures/wpt/common/square.png
similarity index 100%
rename from test/wpt/tests/common/square.png
rename to test/fixtures/wpt/common/square.png
diff --git a/test/wpt/tests/common/stringifiers.js b/test/fixtures/wpt/common/stringifiers.js
similarity index 100%
rename from test/wpt/tests/common/stringifiers.js
rename to test/fixtures/wpt/common/stringifiers.js
diff --git a/test/wpt/tests/common/stringifiers.js.headers b/test/fixtures/wpt/common/stringifiers.js.headers
similarity index 100%
rename from test/wpt/tests/common/stringifiers.js.headers
rename to test/fixtures/wpt/common/stringifiers.js.headers
diff --git a/test/wpt/tests/common/subset-tests-by-key.js b/test/fixtures/wpt/common/subset-tests-by-key.js
similarity index 100%
rename from test/wpt/tests/common/subset-tests-by-key.js
rename to test/fixtures/wpt/common/subset-tests-by-key.js
diff --git a/test/wpt/tests/common/subset-tests.js b/test/fixtures/wpt/common/subset-tests.js
similarity index 100%
rename from test/wpt/tests/common/subset-tests.js
rename to test/fixtures/wpt/common/subset-tests.js
diff --git a/test/wpt/tests/common/test-setting-immutable-prototype.js b/test/fixtures/wpt/common/test-setting-immutable-prototype.js
similarity index 100%
rename from test/wpt/tests/common/test-setting-immutable-prototype.js
rename to test/fixtures/wpt/common/test-setting-immutable-prototype.js
diff --git a/test/wpt/tests/common/test-setting-immutable-prototype.js.headers b/test/fixtures/wpt/common/test-setting-immutable-prototype.js.headers
similarity index 100%
rename from test/wpt/tests/common/test-setting-immutable-prototype.js.headers
rename to test/fixtures/wpt/common/test-setting-immutable-prototype.js.headers
diff --git a/test/wpt/tests/common/text-plain.txt b/test/fixtures/wpt/common/text-plain.txt
similarity index 100%
rename from test/wpt/tests/common/text-plain.txt
rename to test/fixtures/wpt/common/text-plain.txt
diff --git a/test/wpt/tests/common/third_party/reftest-analyzer.xhtml b/test/fixtures/wpt/common/third_party/reftest-analyzer.xhtml
similarity index 100%
rename from test/wpt/tests/common/third_party/reftest-analyzer.xhtml
rename to test/fixtures/wpt/common/third_party/reftest-analyzer.xhtml
diff --git a/test/wpt/tests/common/top-layer.js b/test/fixtures/wpt/common/top-layer.js
similarity index 100%
rename from test/wpt/tests/common/top-layer.js
rename to test/fixtures/wpt/common/top-layer.js
diff --git a/test/wpt/tests/common/utils.js b/test/fixtures/wpt/common/utils.js
similarity index 100%
rename from test/wpt/tests/common/utils.js
rename to test/fixtures/wpt/common/utils.js
diff --git a/test/wpt/tests/common/utils.js.headers b/test/fixtures/wpt/common/utils.js.headers
similarity index 100%
rename from test/wpt/tests/common/utils.js.headers
rename to test/fixtures/wpt/common/utils.js.headers
diff --git a/test/wpt/tests/common/window-name-setter.html b/test/fixtures/wpt/common/window-name-setter.html
similarity index 100%
rename from test/wpt/tests/common/window-name-setter.html
rename to test/fixtures/wpt/common/window-name-setter.html
diff --git a/test/wpt/tests/common/worklet-reftest.js b/test/fixtures/wpt/common/worklet-reftest.js
similarity index 100%
rename from test/wpt/tests/common/worklet-reftest.js
rename to test/fixtures/wpt/common/worklet-reftest.js
diff --git a/test/wpt/tests/common/worklet-reftest.js.headers b/test/fixtures/wpt/common/worklet-reftest.js.headers
similarity index 100%
rename from test/wpt/tests/common/worklet-reftest.js.headers
rename to test/fixtures/wpt/common/worklet-reftest.js.headers
diff --git a/test/wpt/tests/eventsource/META.yml b/test/fixtures/wpt/eventsource/META.yml
similarity index 100%
rename from test/wpt/tests/eventsource/META.yml
rename to test/fixtures/wpt/eventsource/META.yml
diff --git a/test/wpt/tests/eventsource/README.md b/test/fixtures/wpt/eventsource/README.md
similarity index 100%
rename from test/wpt/tests/eventsource/README.md
rename to test/fixtures/wpt/eventsource/README.md
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-close.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-close.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-close.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-close.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-close2.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close2.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-close2.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close2.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-close2.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close2.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-close2.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-close2.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-url-bogus.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-url-bogus.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-constructor-url-bogus.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-constructor-url-bogus.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-eventtarget.worker.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-eventtarget.worker.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-eventtarget.worker.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-eventtarget.worker.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-onmesage.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onmesage.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-onmesage.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onmesage.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-onmessage.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onmessage.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-onmessage.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onmessage.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-onopen.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onopen.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-onopen.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onopen.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-onopen.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onopen.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-onopen.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-onopen.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-prototype.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-prototype.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-prototype.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-prototype.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-prototype.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-prototype.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-prototype.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-prototype.js
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-url.htm b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-url.htm
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-url.htm
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-url.htm
diff --git a/test/wpt/tests/eventsource/dedicated-worker/eventsource-url.js b/test/fixtures/wpt/eventsource/dedicated-worker/eventsource-url.js
similarity index 100%
rename from test/wpt/tests/eventsource/dedicated-worker/eventsource-url.js
rename to test/fixtures/wpt/eventsource/dedicated-worker/eventsource-url.js
diff --git a/test/wpt/tests/eventsource/event-data.any.js b/test/fixtures/wpt/eventsource/event-data.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/event-data.any.js
rename to test/fixtures/wpt/eventsource/event-data.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-close.window.js b/test/fixtures/wpt/eventsource/eventsource-close.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-close.window.js
rename to test/fixtures/wpt/eventsource/eventsource-close.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-document-domain.window.js b/test/fixtures/wpt/eventsource/eventsource-constructor-document-domain.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-document-domain.window.js
rename to test/fixtures/wpt/eventsource/eventsource-constructor-document-domain.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-empty-url.any.js b/test/fixtures/wpt/eventsource/eventsource-constructor-empty-url.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-empty-url.any.js
rename to test/fixtures/wpt/eventsource/eventsource-constructor-empty-url.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-non-same-origin.window.js b/test/fixtures/wpt/eventsource/eventsource-constructor-non-same-origin.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-non-same-origin.window.js
rename to test/fixtures/wpt/eventsource/eventsource-constructor-non-same-origin.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-stringify.window.js b/test/fixtures/wpt/eventsource/eventsource-constructor-stringify.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-stringify.window.js
rename to test/fixtures/wpt/eventsource/eventsource-constructor-stringify.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-url-bogus.any.js b/test/fixtures/wpt/eventsource/eventsource-constructor-url-bogus.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-url-bogus.any.js
rename to test/fixtures/wpt/eventsource/eventsource-constructor-url-bogus.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-constructor-url-multi-window.htm b/test/fixtures/wpt/eventsource/eventsource-constructor-url-multi-window.htm
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-constructor-url-multi-window.htm
rename to test/fixtures/wpt/eventsource/eventsource-constructor-url-multi-window.htm
diff --git a/test/wpt/tests/eventsource/eventsource-cross-origin.window.js b/test/fixtures/wpt/eventsource/eventsource-cross-origin.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-cross-origin.window.js
rename to test/fixtures/wpt/eventsource/eventsource-cross-origin.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-eventtarget.any.js b/test/fixtures/wpt/eventsource/eventsource-eventtarget.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-eventtarget.any.js
rename to test/fixtures/wpt/eventsource/eventsource-eventtarget.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-onmessage-realm.htm b/test/fixtures/wpt/eventsource/eventsource-onmessage-realm.htm
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-onmessage-realm.htm
rename to test/fixtures/wpt/eventsource/eventsource-onmessage-realm.htm
diff --git a/test/wpt/tests/eventsource/eventsource-onmessage-trusted.any.js b/test/fixtures/wpt/eventsource/eventsource-onmessage-trusted.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-onmessage-trusted.any.js
rename to test/fixtures/wpt/eventsource/eventsource-onmessage-trusted.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-onmessage.any.js b/test/fixtures/wpt/eventsource/eventsource-onmessage.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-onmessage.any.js
rename to test/fixtures/wpt/eventsource/eventsource-onmessage.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-onopen.any.js b/test/fixtures/wpt/eventsource/eventsource-onopen.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-onopen.any.js
rename to test/fixtures/wpt/eventsource/eventsource-onopen.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-prototype.any.js b/test/fixtures/wpt/eventsource/eventsource-prototype.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-prototype.any.js
rename to test/fixtures/wpt/eventsource/eventsource-prototype.any.js
diff --git a/test/wpt/tests/eventsource/eventsource-reconnect.window.js b/test/fixtures/wpt/eventsource/eventsource-reconnect.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-reconnect.window.js
rename to test/fixtures/wpt/eventsource/eventsource-reconnect.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-request-cancellation.any.window.js b/test/fixtures/wpt/eventsource/eventsource-request-cancellation.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-request-cancellation.any.window.js
rename to test/fixtures/wpt/eventsource/eventsource-request-cancellation.window.js
diff --git a/test/wpt/tests/eventsource/eventsource-url.any.js b/test/fixtures/wpt/eventsource/eventsource-url.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/eventsource-url.any.js
rename to test/fixtures/wpt/eventsource/eventsource-url.any.js
diff --git a/test/wpt/tests/eventsource/format-bom-2.any.js b/test/fixtures/wpt/eventsource/format-bom-2.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-bom-2.any.js
rename to test/fixtures/wpt/eventsource/format-bom-2.any.js
diff --git a/test/wpt/tests/eventsource/format-bom.any.js b/test/fixtures/wpt/eventsource/format-bom.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-bom.any.js
rename to test/fixtures/wpt/eventsource/format-bom.any.js
diff --git a/test/wpt/tests/eventsource/format-comments.any.js b/test/fixtures/wpt/eventsource/format-comments.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-comments.any.js
rename to test/fixtures/wpt/eventsource/format-comments.any.js
diff --git a/test/wpt/tests/eventsource/format-data-before-final-empty-line.any.js b/test/fixtures/wpt/eventsource/format-data-before-final-empty-line.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-data-before-final-empty-line.any.js
rename to test/fixtures/wpt/eventsource/format-data-before-final-empty-line.any.js
diff --git a/test/wpt/tests/eventsource/format-field-data.any.js b/test/fixtures/wpt/eventsource/format-field-data.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-data.any.js
rename to test/fixtures/wpt/eventsource/format-field-data.any.js
diff --git a/test/wpt/tests/eventsource/format-field-event-empty.any.js b/test/fixtures/wpt/eventsource/format-field-event-empty.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-event-empty.any.js
rename to test/fixtures/wpt/eventsource/format-field-event-empty.any.js
diff --git a/test/wpt/tests/eventsource/format-field-event.any.js b/test/fixtures/wpt/eventsource/format-field-event.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-event.any.js
rename to test/fixtures/wpt/eventsource/format-field-event.any.js
diff --git a/test/wpt/tests/eventsource/format-field-id-2.any.js b/test/fixtures/wpt/eventsource/format-field-id-2.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-id-2.any.js
rename to test/fixtures/wpt/eventsource/format-field-id-2.any.js
diff --git a/test/wpt/tests/eventsource/format-field-id-3.window.js b/test/fixtures/wpt/eventsource/format-field-id-3.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-id-3.window.js
rename to test/fixtures/wpt/eventsource/format-field-id-3.window.js
diff --git a/test/wpt/tests/eventsource/format-field-id-null.window.js b/test/fixtures/wpt/eventsource/format-field-id-null.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-id-null.window.js
rename to test/fixtures/wpt/eventsource/format-field-id-null.window.js
diff --git a/test/wpt/tests/eventsource/format-field-id.any.js b/test/fixtures/wpt/eventsource/format-field-id.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-id.any.js
rename to test/fixtures/wpt/eventsource/format-field-id.any.js
diff --git a/test/wpt/tests/eventsource/format-field-parsing.any.js b/test/fixtures/wpt/eventsource/format-field-parsing.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-parsing.any.js
rename to test/fixtures/wpt/eventsource/format-field-parsing.any.js
diff --git a/test/wpt/tests/eventsource/format-field-retry-bogus.any.js b/test/fixtures/wpt/eventsource/format-field-retry-bogus.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-retry-bogus.any.js
rename to test/fixtures/wpt/eventsource/format-field-retry-bogus.any.js
diff --git a/test/wpt/tests/eventsource/format-field-retry-empty.any.js b/test/fixtures/wpt/eventsource/format-field-retry-empty.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-retry-empty.any.js
rename to test/fixtures/wpt/eventsource/format-field-retry-empty.any.js
diff --git a/test/wpt/tests/eventsource/format-field-retry.any.js b/test/fixtures/wpt/eventsource/format-field-retry.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-retry.any.js
rename to test/fixtures/wpt/eventsource/format-field-retry.any.js
diff --git a/test/wpt/tests/eventsource/format-field-unknown.any.js b/test/fixtures/wpt/eventsource/format-field-unknown.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-field-unknown.any.js
rename to test/fixtures/wpt/eventsource/format-field-unknown.any.js
diff --git a/test/wpt/tests/eventsource/format-leading-space.any.js b/test/fixtures/wpt/eventsource/format-leading-space.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-leading-space.any.js
rename to test/fixtures/wpt/eventsource/format-leading-space.any.js
diff --git a/test/wpt/tests/eventsource/format-mime-bogus.any.js b/test/fixtures/wpt/eventsource/format-mime-bogus.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-mime-bogus.any.js
rename to test/fixtures/wpt/eventsource/format-mime-bogus.any.js
diff --git a/test/wpt/tests/eventsource/format-mime-trailing-semicolon.any.js b/test/fixtures/wpt/eventsource/format-mime-trailing-semicolon.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-mime-trailing-semicolon.any.js
rename to test/fixtures/wpt/eventsource/format-mime-trailing-semicolon.any.js
diff --git a/test/wpt/tests/eventsource/format-mime-valid-bogus.any.js b/test/fixtures/wpt/eventsource/format-mime-valid-bogus.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-mime-valid-bogus.any.js
rename to test/fixtures/wpt/eventsource/format-mime-valid-bogus.any.js
diff --git a/test/wpt/tests/eventsource/format-newlines.any.js b/test/fixtures/wpt/eventsource/format-newlines.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-newlines.any.js
rename to test/fixtures/wpt/eventsource/format-newlines.any.js
diff --git a/test/wpt/tests/eventsource/format-null-character.any.js b/test/fixtures/wpt/eventsource/format-null-character.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-null-character.any.js
rename to test/fixtures/wpt/eventsource/format-null-character.any.js
diff --git a/test/wpt/tests/eventsource/format-utf-8.any.js b/test/fixtures/wpt/eventsource/format-utf-8.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/format-utf-8.any.js
rename to test/fixtures/wpt/eventsource/format-utf-8.any.js
diff --git a/test/wpt/tests/eventsource/request-accept.any.js b/test/fixtures/wpt/eventsource/request-accept.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/request-accept.any.js
rename to test/fixtures/wpt/eventsource/request-accept.any.js
diff --git a/test/wpt/tests/eventsource/request-cache-control.any.js b/test/fixtures/wpt/eventsource/request-cache-control.any.js
similarity index 100%
rename from test/wpt/tests/eventsource/request-cache-control.any.js
rename to test/fixtures/wpt/eventsource/request-cache-control.any.js
diff --git a/test/wpt/tests/eventsource/request-credentials.any.window.js b/test/fixtures/wpt/eventsource/request-credentials.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/request-credentials.any.window.js
rename to test/fixtures/wpt/eventsource/request-credentials.window.js
diff --git a/test/wpt/tests/eventsource/request-redirect.any.window.js b/test/fixtures/wpt/eventsource/request-redirect.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/request-redirect.any.window.js
rename to test/fixtures/wpt/eventsource/request-redirect.window.js
diff --git a/test/wpt/tests/eventsource/request-status-error.window.js b/test/fixtures/wpt/eventsource/request-status-error.window.js
similarity index 100%
rename from test/wpt/tests/eventsource/request-status-error.window.js
rename to test/fixtures/wpt/eventsource/request-status-error.window.js
diff --git a/test/wpt/tests/eventsource/resources/accept.event_stream b/test/fixtures/wpt/eventsource/resources/accept.event_stream
similarity index 100%
rename from test/wpt/tests/eventsource/resources/accept.event_stream
rename to test/fixtures/wpt/eventsource/resources/accept.event_stream
diff --git a/test/wpt/tests/eventsource/resources/cache-control.event_stream b/test/fixtures/wpt/eventsource/resources/cache-control.event_stream
similarity index 100%
rename from test/wpt/tests/eventsource/resources/cache-control.event_stream
rename to test/fixtures/wpt/eventsource/resources/cache-control.event_stream
diff --git a/test/wpt/tests/eventsource/resources/cors-cookie.py b/test/fixtures/wpt/eventsource/resources/cors-cookie.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/cors-cookie.py
rename to test/fixtures/wpt/eventsource/resources/cors-cookie.py
diff --git a/test/wpt/tests/eventsource/resources/cors.py b/test/fixtures/wpt/eventsource/resources/cors.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/cors.py
rename to test/fixtures/wpt/eventsource/resources/cors.py
diff --git a/test/wpt/tests/eventsource/resources/eventsource-onmessage-realm.htm b/test/fixtures/wpt/eventsource/resources/eventsource-onmessage-realm.htm
similarity index 100%
rename from test/wpt/tests/eventsource/resources/eventsource-onmessage-realm.htm
rename to test/fixtures/wpt/eventsource/resources/eventsource-onmessage-realm.htm
diff --git a/test/wpt/tests/eventsource/resources/init.htm b/test/fixtures/wpt/eventsource/resources/init.htm
similarity index 100%
rename from test/wpt/tests/eventsource/resources/init.htm
rename to test/fixtures/wpt/eventsource/resources/init.htm
diff --git a/test/wpt/tests/eventsource/resources/last-event-id.py b/test/fixtures/wpt/eventsource/resources/last-event-id.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/last-event-id.py
rename to test/fixtures/wpt/eventsource/resources/last-event-id.py
diff --git a/test/wpt/tests/eventsource/resources/last-event-id2.py b/test/fixtures/wpt/eventsource/resources/last-event-id2.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/last-event-id2.py
rename to test/fixtures/wpt/eventsource/resources/last-event-id2.py
diff --git a/test/wpt/tests/eventsource/resources/message.py b/test/fixtures/wpt/eventsource/resources/message.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/message.py
rename to test/fixtures/wpt/eventsource/resources/message.py
diff --git a/test/wpt/tests/eventsource/resources/message2.py b/test/fixtures/wpt/eventsource/resources/message2.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/message2.py
rename to test/fixtures/wpt/eventsource/resources/message2.py
diff --git a/test/wpt/tests/eventsource/resources/reconnect-fail.py b/test/fixtures/wpt/eventsource/resources/reconnect-fail.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/reconnect-fail.py
rename to test/fixtures/wpt/eventsource/resources/reconnect-fail.py
diff --git a/test/wpt/tests/eventsource/resources/status-error.py b/test/fixtures/wpt/eventsource/resources/status-error.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/status-error.py
rename to test/fixtures/wpt/eventsource/resources/status-error.py
diff --git a/test/wpt/tests/eventsource/resources/status-reconnect.py b/test/fixtures/wpt/eventsource/resources/status-reconnect.py
similarity index 100%
rename from test/wpt/tests/eventsource/resources/status-reconnect.py
rename to test/fixtures/wpt/eventsource/resources/status-reconnect.py
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-close.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-close.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-close.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-close.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-close.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-close.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-close.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-close.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-constructor-non-same-origin.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-non-same-origin.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-constructor-non-same-origin.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-non-same-origin.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-constructor-url-bogus.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-url-bogus.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-constructor-url-bogus.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-constructor-url-bogus.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-eventtarget.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-eventtarget.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-eventtarget.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-eventtarget.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-eventtarget.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-eventtarget.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-eventtarget.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-eventtarget.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-onmesage.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-onmesage.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-onmesage.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-onmesage.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-onmessage.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-onmessage.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-onmessage.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-onmessage.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-onopen.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-onopen.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-onopen.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-onopen.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-onopen.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-onopen.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-onopen.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-onopen.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-prototype.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-prototype.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-prototype.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-prototype.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-prototype.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-prototype.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-prototype.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-prototype.js
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-url.htm b/test/fixtures/wpt/eventsource/shared-worker/eventsource-url.htm
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-url.htm
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-url.htm
diff --git a/test/wpt/tests/eventsource/shared-worker/eventsource-url.js b/test/fixtures/wpt/eventsource/shared-worker/eventsource-url.js
similarity index 100%
rename from test/wpt/tests/eventsource/shared-worker/eventsource-url.js
rename to test/fixtures/wpt/eventsource/shared-worker/eventsource-url.js
diff --git a/test/wpt/tests/fetch/META.yml b/test/fixtures/wpt/fetch/META.yml
similarity index 100%
rename from test/wpt/tests/fetch/META.yml
rename to test/fixtures/wpt/fetch/META.yml
diff --git a/test/wpt/tests/fetch/README.md b/test/fixtures/wpt/fetch/README.md
similarity index 100%
rename from test/wpt/tests/fetch/README.md
rename to test/fixtures/wpt/fetch/README.md
diff --git a/test/wpt/tests/fetch/api/abort/cache.https.any.js b/test/fixtures/wpt/fetch/api/abort/cache.https.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/abort/cache.https.any.js
rename to test/fixtures/wpt/fetch/api/abort/cache.https.any.js
diff --git a/test/wpt/tests/fetch/api/abort/destroyed-context.html b/test/fixtures/wpt/fetch/api/abort/destroyed-context.html
similarity index 100%
rename from test/wpt/tests/fetch/api/abort/destroyed-context.html
rename to test/fixtures/wpt/fetch/api/abort/destroyed-context.html
diff --git a/test/wpt/tests/fetch/api/abort/general.any.js b/test/fixtures/wpt/fetch/api/abort/general.any.js
similarity index 99%
rename from test/wpt/tests/fetch/api/abort/general.any.js
rename to test/fixtures/wpt/fetch/api/abort/general.any.js
index 3727bb42afe..139f08947b1 100644
--- a/test/wpt/tests/fetch/api/abort/general.any.js
+++ b/test/fixtures/wpt/fetch/api/abort/general.any.js
@@ -4,7 +4,7 @@
// META: script=/common/get-host-info.sub.js
// META: script=../request/request-error.js
-const BODY_METHODS = ['arrayBuffer', 'blob', 'formData', 'json', 'text'];
+const BODY_METHODS = ['arrayBuffer', 'blob', 'bytes', 'formData', 'json', 'text'];
const error1 = new Error('error1');
error1.name = 'error1';
diff --git a/test/wpt/tests/fetch/api/abort/keepalive.html b/test/fixtures/wpt/fetch/api/abort/keepalive.html
similarity index 100%
rename from test/wpt/tests/fetch/api/abort/keepalive.html
rename to test/fixtures/wpt/fetch/api/abort/keepalive.html
diff --git a/test/wpt/tests/fetch/api/abort/request.any.js b/test/fixtures/wpt/fetch/api/abort/request.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/abort/request.any.js
rename to test/fixtures/wpt/fetch/api/abort/request.any.js
diff --git a/test/wpt/tests/fetch/api/abort/serviceworker-intercepted.https.html b/test/fixtures/wpt/fetch/api/abort/serviceworker-intercepted.https.html
similarity index 98%
rename from test/wpt/tests/fetch/api/abort/serviceworker-intercepted.https.html
rename to test/fixtures/wpt/fetch/api/abort/serviceworker-intercepted.https.html
index ed9bc973e80..1867e205bb6 100644
--- a/test/wpt/tests/fetch/api/abort/serviceworker-intercepted.https.html
+++ b/test/fixtures/wpt/fetch/api/abort/serviceworker-intercepted.https.html
@@ -11,7 +11,7 @@
diff --git a/test/wpt/tests/fetch/api/crashtests/body-window-destroy.html b/test/fixtures/wpt/fetch/api/crashtests/body-window-destroy.html
similarity index 100%
rename from test/wpt/tests/fetch/api/crashtests/body-window-destroy.html
rename to test/fixtures/wpt/fetch/api/crashtests/body-window-destroy.html
diff --git a/test/fixtures/wpt/fetch/api/crashtests/huge-fetch.any.js b/test/fixtures/wpt/fetch/api/crashtests/huge-fetch.any.js
new file mode 100644
index 00000000000..1b09925d855
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/crashtests/huge-fetch.any.js
@@ -0,0 +1,16 @@
+// META: global=window,worker
+
+'use strict';
+
+promise_test(async t => {
+ const response = await fetch('../resources/huge-response.py');
+ const reader = response.body.getReader();
+ // Read one chunk just to show willing.
+ const { value, done } = await reader.read();
+ assert_false(done, 'there should be some data');
+ assert_greater_than(value.byteLength, 0, 'the chunk should be non-empty');
+ // Wait 2 seconds to give it a chance to crash.
+ await new Promise(resolve => t.step_timeout(resolve, 2000));
+ // If we get here without crashing we passed the test.
+ reader.cancel();
+}, 'fetching a huge cacheable file but not reading it should not crash');
diff --git a/test/wpt/tests/fetch/api/crashtests/request.html b/test/fixtures/wpt/fetch/api/crashtests/request.html
similarity index 100%
rename from test/wpt/tests/fetch/api/crashtests/request.html
rename to test/fixtures/wpt/fetch/api/crashtests/request.html
diff --git a/test/wpt/tests/fetch/api/credentials/authentication-basic.any.js b/test/fixtures/wpt/fetch/api/credentials/authentication-basic.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/credentials/authentication-basic.any.js
rename to test/fixtures/wpt/fetch/api/credentials/authentication-basic.any.js
diff --git a/test/wpt/tests/fetch/api/credentials/authentication-redirection.any.js b/test/fixtures/wpt/fetch/api/credentials/authentication-redirection.any.js
similarity index 97%
rename from test/wpt/tests/fetch/api/credentials/authentication-redirection.any.js
rename to test/fixtures/wpt/fetch/api/credentials/authentication-redirection.any.js
index 16656b5435a..5a155074378 100644
--- a/test/wpt/tests/fetch/api/credentials/authentication-redirection.any.js
+++ b/test/fixtures/wpt/fetch/api/credentials/authentication-redirection.any.js
@@ -24,6 +24,6 @@ promise_test(async test => {
}, "getAuthorizationHeaderValue - same origin redirection");
promise_test(async (test) => {
- const result = await getAuthorizationHeaderValue(get_host_info().HTTPS_REMOTE_ORIGIN + "/fetch/api/resources/redirect.py?allow_headers=Authorization&location=" + encodeURIComponent(get_host_info().HTTPS_ORIGIN + "/fetch/api/resources/dump-authorization-header.py"));
+ const result = await getAuthorizationHeaderValue(get_host_info().HTTPS_REMOTE_ORIGIN + "/fetch/api/resources/redirect.py?allow_headers=Authorization&location=" + encodeURIComponent(get_host_info().HTTPS_ORIGIN + "/fetch/api/resources/dump-authorization-header.py?strip_auth_header=true"));
assert_equals(result, "none");
}, "getAuthorizationHeaderValue - cross origin redirection");
diff --git a/test/wpt/tests/fetch/api/credentials/cookies.any.js b/test/fixtures/wpt/fetch/api/credentials/cookies.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/credentials/cookies.any.js
rename to test/fixtures/wpt/fetch/api/credentials/cookies.any.js
diff --git a/test/wpt/tests/fetch/api/headers/header-setcookie.any.js b/test/fixtures/wpt/fetch/api/headers/header-setcookie.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/header-setcookie.any.js
rename to test/fixtures/wpt/fetch/api/headers/header-setcookie.any.js
diff --git a/test/wpt/tests/fetch/api/headers/header-values-normalize.any.js b/test/fixtures/wpt/fetch/api/headers/header-values-normalize.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/header-values-normalize.any.js
rename to test/fixtures/wpt/fetch/api/headers/header-values-normalize.any.js
diff --git a/test/wpt/tests/fetch/api/headers/header-values.any.js b/test/fixtures/wpt/fetch/api/headers/header-values.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/header-values.any.js
rename to test/fixtures/wpt/fetch/api/headers/header-values.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-basic.any.js b/test/fixtures/wpt/fetch/api/headers/headers-basic.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-basic.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-basic.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-casing.any.js b/test/fixtures/wpt/fetch/api/headers/headers-casing.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-casing.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-casing.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-combine.any.js b/test/fixtures/wpt/fetch/api/headers/headers-combine.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-combine.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-combine.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-errors.any.js b/test/fixtures/wpt/fetch/api/headers/headers-errors.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-errors.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-errors.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-no-cors.any.js b/test/fixtures/wpt/fetch/api/headers/headers-no-cors.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-no-cors.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-no-cors.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-normalize.any.js b/test/fixtures/wpt/fetch/api/headers/headers-normalize.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-normalize.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-normalize.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-record.any.js b/test/fixtures/wpt/fetch/api/headers/headers-record.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-record.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-record.any.js
diff --git a/test/wpt/tests/fetch/api/headers/headers-structure.any.js b/test/fixtures/wpt/fetch/api/headers/headers-structure.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/headers/headers-structure.any.js
rename to test/fixtures/wpt/fetch/api/headers/headers-structure.any.js
diff --git a/test/wpt/tests/fetch/api/idlharness.any.js b/test/fixtures/wpt/fetch/api/idlharness.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/idlharness.any.js
rename to test/fixtures/wpt/fetch/api/idlharness.any.js
diff --git a/test/wpt/tests/fetch/api/policies/csp-blocked-worker.html b/test/fixtures/wpt/fetch/api/policies/csp-blocked-worker.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/csp-blocked-worker.html
rename to test/fixtures/wpt/fetch/api/policies/csp-blocked-worker.html
diff --git a/test/wpt/tests/fetch/api/policies/csp-blocked.html b/test/fixtures/wpt/fetch/api/policies/csp-blocked.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/csp-blocked.html
rename to test/fixtures/wpt/fetch/api/policies/csp-blocked.html
diff --git a/test/wpt/tests/fetch/api/policies/csp-blocked.html.headers b/test/fixtures/wpt/fetch/api/policies/csp-blocked.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/csp-blocked.html.headers
rename to test/fixtures/wpt/fetch/api/policies/csp-blocked.html.headers
diff --git a/test/wpt/tests/fetch/api/policies/csp-blocked.js b/test/fixtures/wpt/fetch/api/policies/csp-blocked.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/csp-blocked.js
rename to test/fixtures/wpt/fetch/api/policies/csp-blocked.js
diff --git a/test/wpt/tests/fetch/api/policies/csp-blocked.js.headers b/test/fixtures/wpt/fetch/api/policies/csp-blocked.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/csp-blocked.js.headers
rename to test/fixtures/wpt/fetch/api/policies/csp-blocked.js.headers
diff --git a/test/wpt/tests/fetch/api/policies/nested-policy.js b/test/fixtures/wpt/fetch/api/policies/nested-policy.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/nested-policy.js
rename to test/fixtures/wpt/fetch/api/policies/nested-policy.js
diff --git a/test/wpt/tests/fetch/api/policies/nested-policy.js.headers b/test/fixtures/wpt/fetch/api/policies/nested-policy.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/nested-policy.js.headers
rename to test/fixtures/wpt/fetch/api/policies/nested-policy.js.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer-service-worker.https.html b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer-service-worker.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer-service-worker.https.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer-service-worker.https.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer-worker.html b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer-worker.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer-worker.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer-worker.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer.html b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer.html.headers b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer.html.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.html.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer.js b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer.js
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.js
diff --git a/test/wpt/tests/fetch/api/policies/referrer-no-referrer.js.headers b/test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-no-referrer.js.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-no-referrer.js.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-service-worker.https.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin-service-worker.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-service-worker.https.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-service-worker.https.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin-worker.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin-worker.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin-worker.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin-worker.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.html.headers b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.html.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.html.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.js b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.js
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.js
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.js.headers b/test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-when-cross-origin.js.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-when-cross-origin.js.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin-worker.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin-worker.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin-worker.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin-worker.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin.html b/test/fixtures/wpt/fetch/api/policies/referrer-origin.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin.html.headers b/test/fixtures/wpt/fetch/api/policies/referrer-origin.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin.html.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin.html.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin.js b/test/fixtures/wpt/fetch/api/policies/referrer-origin.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin.js
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin.js
diff --git a/test/wpt/tests/fetch/api/policies/referrer-origin.js.headers b/test/fixtures/wpt/fetch/api/policies/referrer-origin.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-origin.js.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-origin.js.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url-service-worker.https.html b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url-service-worker.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url-service-worker.https.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url-service-worker.https.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url-worker.html b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url-worker.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url-worker.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url-worker.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url.html b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.html
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url.html
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.html
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url.html.headers b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url.html.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.html.headers
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url.js b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.js
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url.js
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.js
diff --git a/test/wpt/tests/fetch/api/policies/referrer-unsafe-url.js.headers b/test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/policies/referrer-unsafe-url.js.headers
rename to test/fixtures/wpt/fetch/api/policies/referrer-unsafe-url.js.headers
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-back-to-original-origin.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-back-to-original-origin.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-back-to-original-origin.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-back-to-original-origin.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-count.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-count.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-count.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-count.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-empty-location.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-empty-location.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-empty-location.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-empty-location.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.any.js
similarity index 92%
rename from test/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.any.js
index beda8bb8e78..c9ac13f3dbb 100644
--- a/test/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js
+++ b/test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.any.js
@@ -1,7 +1,6 @@
// META: global=window
+// META: timeout=long
// META: title=Fetch API: keepalive handling
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.https.any.js
similarity index 83%
rename from test/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.https.any.js
index 6765ecac6d7..54e4bc31fa1 100644
--- a/test/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js
+++ b/test/fixtures/wpt/fetch/api/redirect/redirect-keepalive.https.any.js
@@ -1,7 +1,5 @@
// META: global=window
// META: title=Fetch API: keepalive handling
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-location-escape.tentative.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-location-escape.tentative.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-location-escape.tentative.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-location-escape.tentative.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-location.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-location.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-location.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-location.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-method.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-method.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-method.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-method.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-mode.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-mode.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-mode.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-mode.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-origin.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-origin.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-origin.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-origin.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-referrer-override.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-referrer-override.any.js
similarity index 97%
rename from test/wpt/tests/fetch/api/redirect/redirect-referrer-override.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-referrer-override.any.js
index 56e55d79e14..337f8dd0698 100644
--- a/test/wpt/tests/fetch/api/redirect/redirect-referrer-override.any.js
+++ b/test/fixtures/wpt/fetch/api/redirect/redirect-referrer-override.any.js
@@ -3,7 +3,7 @@
// META: script=../resources/utils.js
// META: script=/common/get-host-info.sub.js
-function getExpectation(expectations, init, initScenario, redirectPolicy, redirectScenario) {
+function getExpectation(expectations, initPolicy, initScenario, redirectPolicy, redirectScenario) {
let policies = [
expectations[initPolicy][initScenario],
expectations[redirectPolicy][redirectScenario]
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-referrer.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-referrer.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-referrer.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-referrer.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-schemes.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-schemes.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-schemes.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-schemes.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-to-dataurl.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-to-dataurl.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-to-dataurl.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-to-dataurl.any.js
diff --git a/test/wpt/tests/fetch/api/redirect/redirect-upload.h2.any.js b/test/fixtures/wpt/fetch/api/redirect/redirect-upload.h2.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/redirect/redirect-upload.h2.any.js
rename to test/fixtures/wpt/fetch/api/redirect/redirect-upload.h2.any.js
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination-frame.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination-frame.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination-frame.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination-frame.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination-iframe.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination-iframe.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination-iframe.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination-iframe.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination-no-load-event.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination-no-load-event.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination-no-load-event.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination-no-load-event.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination-prefetch.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination-prefetch.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination-prefetch.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination-prefetch.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination-worker.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination-worker.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination-worker.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination-worker.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/fetch-destination.https.html b/test/fixtures/wpt/fetch/api/request/destination/fetch-destination.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/fetch-destination.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/fetch-destination.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.css b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.css
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.css
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.css
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.es b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.es
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.es
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.es
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.es.headers b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.es.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.es.headers
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.es.headers
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.html b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.html
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.html
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.json b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.json
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.json
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.json
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.png b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.png
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.png
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.png
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy.ttf b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy.ttf
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy.ttf
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy.ttf
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy_audio.mp3 b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy_audio.mp3
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy_audio.mp3
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy_audio.mp3
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy_audio.oga b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy_audio.oga
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy_audio.oga
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy_audio.oga
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy_video.mp4 b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy_video.mp4
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy_video.mp4
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy_video.mp4
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/dummy_video.webm b/test/fixtures/wpt/fetch/api/request/destination/resources/dummy_video.webm
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/dummy_video.webm
rename to test/fixtures/wpt/fetch/api/request/destination/resources/dummy_video.webm
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/empty.https.html b/test/fixtures/wpt/fetch/api/request/destination/resources/empty.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/empty.https.html
rename to test/fixtures/wpt/fetch/api/request/destination/resources/empty.https.html
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-frame.js b/test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-frame.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-frame.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-frame.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-iframe.js b/test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-iframe.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-iframe.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-iframe.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-no-load-event.js b/test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-no-load-event.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker-no-load-event.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker-no-load-event.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker.js b/test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/fetch-destination-worker.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/fetch-destination-worker.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/import-declaration-type-css.js b/test/fixtures/wpt/fetch/api/request/destination/resources/import-declaration-type-css.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/import-declaration-type-css.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/import-declaration-type-css.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/import-declaration-type-json.js b/test/fixtures/wpt/fetch/api/request/destination/resources/import-declaration-type-json.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/import-declaration-type-json.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/import-declaration-type-json.js
diff --git a/test/wpt/tests/fetch/api/request/destination/resources/importer.js b/test/fixtures/wpt/fetch/api/request/destination/resources/importer.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/destination/resources/importer.js
rename to test/fixtures/wpt/fetch/api/request/destination/resources/importer.js
diff --git a/test/wpt/tests/fetch/api/request/forbidden-method.any.js b/test/fixtures/wpt/fetch/api/request/forbidden-method.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/forbidden-method.any.js
rename to test/fixtures/wpt/fetch/api/request/forbidden-method.any.js
diff --git a/test/wpt/tests/fetch/api/request/multi-globals/construct-in-detached-frame.window.js b/test/fixtures/wpt/fetch/api/request/multi-globals/construct-in-detached-frame.window.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/multi-globals/construct-in-detached-frame.window.js
rename to test/fixtures/wpt/fetch/api/request/multi-globals/construct-in-detached-frame.window.js
diff --git a/test/wpt/tests/fetch/api/request/multi-globals/current/current.html b/test/fixtures/wpt/fetch/api/request/multi-globals/current/current.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/multi-globals/current/current.html
rename to test/fixtures/wpt/fetch/api/request/multi-globals/current/current.html
diff --git a/test/wpt/tests/fetch/api/request/multi-globals/incumbent/incumbent.html b/test/fixtures/wpt/fetch/api/request/multi-globals/incumbent/incumbent.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/multi-globals/incumbent/incumbent.html
rename to test/fixtures/wpt/fetch/api/request/multi-globals/incumbent/incumbent.html
diff --git a/test/wpt/tests/fetch/api/request/multi-globals/url-parsing.html b/test/fixtures/wpt/fetch/api/request/multi-globals/url-parsing.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/multi-globals/url-parsing.html
rename to test/fixtures/wpt/fetch/api/request/multi-globals/url-parsing.html
diff --git a/test/fixtures/wpt/fetch/api/request/request-bad-port.any.js b/test/fixtures/wpt/fetch/api/request/request-bad-port.any.js
new file mode 100644
index 00000000000..915063bab56
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/request/request-bad-port.any.js
@@ -0,0 +1,94 @@
+// META: global=window,worker
+
+// list of bad ports according to
+// https://fetch.spec.whatwg.org/#port-blocking
+var BLOCKED_PORTS_LIST = [
+ 1, // tcpmux
+ 7, // echo
+ 9, // discard
+ 11, // systat
+ 13, // daytime
+ 15, // netstat
+ 17, // qotd
+ 19, // chargen
+ 20, // ftp-data
+ 21, // ftp
+ 22, // ssh
+ 23, // telnet
+ 25, // smtp
+ 37, // time
+ 42, // name
+ 43, // nicname
+ 53, // domain
+ 69, // tftp
+ 77, // priv-rjs
+ 79, // finger
+ 87, // ttylink
+ 95, // supdup
+ 101, // hostriame
+ 102, // iso-tsap
+ 103, // gppitnp
+ 104, // acr-nema
+ 109, // pop2
+ 110, // pop3
+ 111, // sunrpc
+ 113, // auth
+ 115, // sftp
+ 117, // uucp-path
+ 119, // nntp
+ 123, // ntp
+ 135, // loc-srv / epmap
+ 137, // netbios-ns
+ 139, // netbios-ssn
+ 143, // imap2
+ 161, // snmp
+ 179, // bgp
+ 389, // ldap
+ 427, // afp (alternate)
+ 465, // smtp (alternate)
+ 512, // print / exec
+ 513, // login
+ 514, // shell
+ 515, // printer
+ 526, // tempo
+ 530, // courier
+ 531, // chat
+ 532, // netnews
+ 540, // uucp
+ 548, // afp
+ 554, // rtsp
+ 556, // remotefs
+ 563, // nntp+ssl
+ 587, // smtp (outgoing)
+ 601, // syslog-conn
+ 636, // ldap+ssl
+ 989, // ftps-data
+ 990, // ftps
+ 993, // ldap+ssl
+ 995, // pop3+ssl
+ 1719, // h323gatestat
+ 1720, // h323hostcall
+ 1723, // pptp
+ 2049, // nfs
+ 3659, // apple-sasl
+ 4045, // lockd
+ 4190, // sieve
+ 5060, // sip
+ 5061, // sips
+ 6000, // x11
+ 6566, // sane-port
+ 6665, // irc (alternate)
+ 6666, // irc (alternate)
+ 6667, // irc (default)
+ 6668, // irc (alternate)
+ 6669, // irc (alternate)
+ 6679, // osaut
+ 6697, // irc+tls
+ 10080, // amanda
+];
+
+BLOCKED_PORTS_LIST.map(function(a){
+ promise_test(function(t){
+ return promise_rejects_js(t, TypeError, fetch(`${location.origin}:${a}`))
+ }, 'Request on bad port ' + a + ' should throw TypeError.');
+});
diff --git a/test/wpt/tests/fetch/api/request/request-cache-default-conditional.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-default-conditional.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-default-conditional.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-default-conditional.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-default.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-default.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-default.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-default.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-force-cache.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-force-cache.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-force-cache.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-force-cache.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-no-cache.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-no-cache.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-no-cache.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-no-cache.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-no-store.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-no-store.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-no-store.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-no-store.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-only-if-cached.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-only-if-cached.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-only-if-cached.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-only-if-cached.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache-reload.any.js b/test/fixtures/wpt/fetch/api/request/request-cache-reload.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache-reload.any.js
rename to test/fixtures/wpt/fetch/api/request/request-cache-reload.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-cache.js b/test/fixtures/wpt/fetch/api/request/request-cache.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-cache.js
rename to test/fixtures/wpt/fetch/api/request/request-cache.js
diff --git a/test/wpt/tests/fetch/api/request/request-clone.sub.html b/test/fixtures/wpt/fetch/api/request/request-clone.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-clone.sub.html
rename to test/fixtures/wpt/fetch/api/request/request-clone.sub.html
diff --git a/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js b/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js
new file mode 100644
index 00000000000..27bb991871a
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js
@@ -0,0 +1,21 @@
+promise_test(async function () {
+ const req1 = new Request("https://example.com/", {
+ body: "req1",
+ method: "POST",
+ });
+
+ const text1 = await req1.text();
+ assert_equals(
+ text1,
+ "req1",
+ "The body of the first request should be 'req1'."
+ );
+
+ const req2 = new Request(req1, { body: "req2" });
+ const bodyText = await req2.text();
+ assert_equals(
+ bodyText,
+ "req2",
+ "The body of the second request should be overridden to 'req2'."
+ );
+}, "Check that the body of a new request can be overridden when created from an existing Request object");
diff --git a/test/wpt/tests/fetch/api/request/request-consume-empty.any.js b/test/fixtures/wpt/fetch/api/request/request-consume-empty.any.js
similarity index 86%
rename from test/wpt/tests/fetch/api/request/request-consume-empty.any.js
rename to test/fixtures/wpt/fetch/api/request/request-consume-empty.any.js
index 034a86041a7..0bf9672a795 100644
--- a/test/wpt/tests/fetch/api/request/request-consume-empty.any.js
+++ b/test/fixtures/wpt/fetch/api/request/request-consume-empty.any.js
@@ -8,23 +8,11 @@ function checkBodyText(test, request) {
});
}
-function checkBodyBlob(test, request) {
- return request.blob().then(function(bodyAsBlob) {
- var promise = new Promise(function(resolve, reject) {
- var reader = new FileReader();
- reader.onload = function(evt) {
- resolve(reader.result)
- };
- reader.onerror = function() {
- reject("Blob's reader failed");
- };
- reader.readAsText(bodyAsBlob);
- });
- return promise.then(function(body) {
- assert_equals(body, "", "Resolved value should be empty");
- assert_false(request.bodyUsed);
- });
- });
+async function checkBodyBlob(test, request) {
+ const bodyAsBlob = await request.blob();
+ const body = await bodyAsBlob.text();
+ assert_equals(body, "", "Resolved value should be empty");
+ assert_false(request.bodyUsed);
}
function checkBodyArrayBuffer(test, request) {
diff --git a/test/wpt/tests/fetch/api/request/request-consume.any.js b/test/fixtures/wpt/fetch/api/request/request-consume.any.js
similarity index 82%
rename from test/wpt/tests/fetch/api/request/request-consume.any.js
rename to test/fixtures/wpt/fetch/api/request/request-consume.any.js
index aff5d65244a..b4cbe7457d2 100644
--- a/test/wpt/tests/fetch/api/request/request-consume.any.js
+++ b/test/fixtures/wpt/fetch/api/request/request-consume.any.js
@@ -9,26 +9,15 @@ function checkBodyText(request, expectedBody) {
});
}
-function checkBodyBlob(request, expectedBody, checkContentType) {
- return request.blob().then(function(bodyAsBlob) {
- if (checkContentType)
- assert_equals(bodyAsBlob.type, "text/plain", "Blob body type should be computed from the request Content-Type");
-
- var promise = new Promise(function (resolve, reject) {
- var reader = new FileReader();
- reader.onload = function(evt) {
- resolve(reader.result)
- };
- reader.onerror = function() {
- reject("Blob's reader failed");
- };
- reader.readAsText(bodyAsBlob);
- });
- return promise.then(function(body) {
- assert_equals(body, expectedBody, "Retrieve and verify request's body");
- assert_true(request.bodyUsed, "body as blob: bodyUsed turned true");
- });
- });
+async function checkBodyBlob(request, expectedBody, checkContentType) {
+ const bodyAsBlob = await request.blob();
+
+ if (checkContentType)
+ assert_equals(bodyAsBlob.type, "text/plain", "Blob body type should be computed from the request Content-Type");
+
+ const body = await bodyAsBlob.text();
+ assert_equals(body, expectedBody, "Retrieve and verify request's body");
+ assert_true(request.bodyUsed, "body as blob: bodyUsed turned true");
}
function checkBodyArrayBuffer(request, expectedBody) {
@@ -38,6 +27,14 @@ function checkBodyArrayBuffer(request, expectedBody) {
});
}
+function checkBodyBytes(request, expectedBody) {
+ return request.bytes().then(function(bodyAsUint8Array) {
+ assert_true(bodyAsUint8Array instanceof Uint8Array);
+ validateBufferFromString(bodyAsUint8Array.buffer, expectedBody, "Retrieve and verify request's body");
+ assert_true(request.bodyUsed, "body as bytes: bodyUsed turned true");
+ });
+}
+
function checkBodyJSON(request, expectedBody) {
return request.json().then(function(bodyAsJSON) {
var strBody = JSON.stringify(bodyAsJSON)
@@ -69,6 +66,11 @@ function checkRequestBody(body, expected, bodyType) {
assert_false(request.bodyUsed, "bodyUsed is false at init");
return checkBodyArrayBuffer(request, expected);
}, "Consume " + bodyType + " request's body as arrayBuffer");
+ promise_test(function(test) {
+ var request = new Request("", {"method": "POST", "body": body });
+ assert_false(request.bodyUsed, "bodyUsed is false at init");
+ return checkBodyBytes(request, expected);
+ }, "Consume " + bodyType + " request's body as bytes");
promise_test(function(test) {
var request = new Request("", {"method": "POST", "body": body });
assert_false(request.bodyUsed, "bodyUsed is false at init");
@@ -124,6 +126,7 @@ checkBlobResponseBody(blob, textData, "blob", checkBodyBlob);
checkBlobResponseBody(blob, textData, "text", checkBodyText);
checkBlobResponseBody(blob, textData, "json", checkBodyJSON);
checkBlobResponseBody(blob, textData, "arrayBuffer", checkBodyArrayBuffer);
+checkBlobResponseBody(blob, textData, "bytes", checkBodyBytes);
checkBlobResponseBody(new Blob([""]), "", "blob (empty blob as input)", checkBodyBlob);
var goodJSONValues = ["null", "1", "true", "\"string\""];
diff --git a/test/wpt/tests/fetch/api/request/request-disturbed.any.js b/test/fixtures/wpt/fetch/api/request/request-disturbed.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-disturbed.any.js
rename to test/fixtures/wpt/fetch/api/request/request-disturbed.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-error.any.js b/test/fixtures/wpt/fetch/api/request/request-error.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-error.any.js
rename to test/fixtures/wpt/fetch/api/request/request-error.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-error.js b/test/fixtures/wpt/fetch/api/request/request-error.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-error.js
rename to test/fixtures/wpt/fetch/api/request/request-error.js
diff --git a/test/wpt/tests/fetch/api/request/request-headers.any.js b/test/fixtures/wpt/fetch/api/request/request-headers.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-headers.any.js
rename to test/fixtures/wpt/fetch/api/request/request-headers.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-init-001.sub.html b/test/fixtures/wpt/fetch/api/request/request-init-001.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-001.sub.html
rename to test/fixtures/wpt/fetch/api/request/request-init-001.sub.html
diff --git a/test/wpt/tests/fetch/api/request/request-init-002.any.js b/test/fixtures/wpt/fetch/api/request/request-init-002.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-002.any.js
rename to test/fixtures/wpt/fetch/api/request/request-init-002.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-init-003.sub.html b/test/fixtures/wpt/fetch/api/request/request-init-003.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-003.sub.html
rename to test/fixtures/wpt/fetch/api/request/request-init-003.sub.html
diff --git a/test/wpt/tests/fetch/api/request/request-init-contenttype.any.js b/test/fixtures/wpt/fetch/api/request/request-init-contenttype.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-contenttype.any.js
rename to test/fixtures/wpt/fetch/api/request/request-init-contenttype.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-init-priority.any.js b/test/fixtures/wpt/fetch/api/request/request-init-priority.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-priority.any.js
rename to test/fixtures/wpt/fetch/api/request/request-init-priority.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-init-stream.any.js b/test/fixtures/wpt/fetch/api/request/request-init-stream.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-init-stream.any.js
rename to test/fixtures/wpt/fetch/api/request/request-init-stream.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-keepalive-quota.html b/test/fixtures/wpt/fetch/api/request/request-keepalive-quota.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-keepalive-quota.html
rename to test/fixtures/wpt/fetch/api/request/request-keepalive-quota.html
diff --git a/test/wpt/tests/fetch/api/request/request-keepalive.any.js b/test/fixtures/wpt/fetch/api/request/request-keepalive.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-keepalive.any.js
rename to test/fixtures/wpt/fetch/api/request/request-keepalive.any.js
diff --git a/test/wpt/tests/fetch/api/request/request-reset-attributes.https.html b/test/fixtures/wpt/fetch/api/request/request-reset-attributes.https.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-reset-attributes.https.html
rename to test/fixtures/wpt/fetch/api/request/request-reset-attributes.https.html
diff --git a/test/wpt/tests/fetch/api/request/request-structure.any.js b/test/fixtures/wpt/fetch/api/request/request-structure.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/request-structure.any.js
rename to test/fixtures/wpt/fetch/api/request/request-structure.any.js
diff --git a/test/wpt/tests/fetch/api/request/resources/cache.py b/test/fixtures/wpt/fetch/api/request/resources/cache.py
similarity index 100%
rename from test/wpt/tests/fetch/api/request/resources/cache.py
rename to test/fixtures/wpt/fetch/api/request/resources/cache.py
diff --git a/test/wpt/tests/fetch/api/request/resources/hello.txt b/test/fixtures/wpt/fetch/api/request/resources/hello.txt
similarity index 100%
rename from test/wpt/tests/fetch/api/request/resources/hello.txt
rename to test/fixtures/wpt/fetch/api/request/resources/hello.txt
diff --git a/test/wpt/tests/fetch/api/request/resources/request-reset-attributes-worker.js b/test/fixtures/wpt/fetch/api/request/resources/request-reset-attributes-worker.js
similarity index 100%
rename from test/wpt/tests/fetch/api/request/resources/request-reset-attributes-worker.js
rename to test/fixtures/wpt/fetch/api/request/resources/request-reset-attributes-worker.js
diff --git a/test/wpt/tests/fetch/api/request/url-encoding.html b/test/fixtures/wpt/fetch/api/request/url-encoding.html
similarity index 100%
rename from test/wpt/tests/fetch/api/request/url-encoding.html
rename to test/fixtures/wpt/fetch/api/request/url-encoding.html
diff --git a/test/wpt/tests/fetch/api/resources/authentication.py b/test/fixtures/wpt/fetch/api/resources/authentication.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/authentication.py
rename to test/fixtures/wpt/fetch/api/resources/authentication.py
diff --git a/test/wpt/tests/fetch/api/resources/bad-chunk-encoding.py b/test/fixtures/wpt/fetch/api/resources/bad-chunk-encoding.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/bad-chunk-encoding.py
rename to test/fixtures/wpt/fetch/api/resources/bad-chunk-encoding.py
diff --git a/test/wpt/tests/fetch/api/resources/basic.html b/test/fixtures/wpt/fetch/api/resources/basic.html
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/basic.html
rename to test/fixtures/wpt/fetch/api/resources/basic.html
diff --git a/test/wpt/tests/fetch/api/resources/cache.py b/test/fixtures/wpt/fetch/api/resources/cache.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/cache.py
rename to test/fixtures/wpt/fetch/api/resources/cache.py
diff --git a/test/wpt/tests/fetch/api/resources/clean-stash.py b/test/fixtures/wpt/fetch/api/resources/clean-stash.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/clean-stash.py
rename to test/fixtures/wpt/fetch/api/resources/clean-stash.py
diff --git a/test/wpt/tests/fetch/api/resources/cors-top.txt b/test/fixtures/wpt/fetch/api/resources/cors-top.txt
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/cors-top.txt
rename to test/fixtures/wpt/fetch/api/resources/cors-top.txt
diff --git a/test/wpt/tests/fetch/api/resources/cors-top.txt.headers b/test/fixtures/wpt/fetch/api/resources/cors-top.txt.headers
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/cors-top.txt.headers
rename to test/fixtures/wpt/fetch/api/resources/cors-top.txt.headers
diff --git a/test/wpt/tests/fetch/api/resources/data.json b/test/fixtures/wpt/fetch/api/resources/data.json
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/data.json
rename to test/fixtures/wpt/fetch/api/resources/data.json
diff --git a/test/wpt/tests/fetch/api/resources/dump-authorization-header.py b/test/fixtures/wpt/fetch/api/resources/dump-authorization-header.py
similarity index 66%
rename from test/wpt/tests/fetch/api/resources/dump-authorization-header.py
rename to test/fixtures/wpt/fetch/api/resources/dump-authorization-header.py
index a651aeb4e8b..0d82809f59d 100644
--- a/test/wpt/tests/fetch/api/resources/dump-authorization-header.py
+++ b/test/fixtures/wpt/fetch/api/resources/dump-authorization-header.py
@@ -2,6 +2,11 @@ def main(request, response):
headers = [(b"Content-Type", "text/html"),
(b"Cache-Control", b"no-cache")]
+ if (request.GET.first(b"strip_auth_header", False) and request.method == "OPTIONS" and
+ b"authorization" in request.headers.get(b"Access-Control-Request-Headers", b"").lower()):
+ # Auth header should not be sent for preflight after cross-origin redirect.
+ return 500, headers, "fail"
+
if b"Origin" in request.headers:
headers.append((b"Access-Control-Allow-Origin", request.headers.get(b"Origin", b"")))
headers.append((b"Access-Control-Allow-Credentials", b"true"))
diff --git a/test/wpt/tests/fetch/api/resources/echo-content.h2.py b/test/fixtures/wpt/fetch/api/resources/echo-content.h2.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/echo-content.h2.py
rename to test/fixtures/wpt/fetch/api/resources/echo-content.h2.py
diff --git a/test/wpt/tests/fetch/api/resources/echo-content.py b/test/fixtures/wpt/fetch/api/resources/echo-content.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/echo-content.py
rename to test/fixtures/wpt/fetch/api/resources/echo-content.py
diff --git a/test/wpt/tests/fetch/api/resources/empty.txt b/test/fixtures/wpt/fetch/api/resources/empty.txt
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/empty.txt
rename to test/fixtures/wpt/fetch/api/resources/empty.txt
diff --git a/test/fixtures/wpt/fetch/api/resources/huge-response.py b/test/fixtures/wpt/fetch/api/resources/huge-response.py
new file mode 100644
index 00000000000..16a60078e53
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/resources/huge-response.py
@@ -0,0 +1,22 @@
+# A Python script that generates a huge response. Implemented as a script to
+# avoid needing to add a huge file to the repository.
+
+TOTAL_SIZE = 8 * 1024 * 1024 * 1024 # 8 GB
+CHUNK_SIZE = 1024 * 1024 # 1 MB
+
+assert TOTAL_SIZE % CHUNK_SIZE == 0
+
+
+def main(request, response):
+ response.headers.set(b"Content-type", b"text/plain")
+ response.headers.set(b"Content-Length", str(TOTAL_SIZE).encode())
+ response.headers.set(b"Cache-Control", b"max-age=86400")
+ response.write_status_headers()
+
+ chunk = bytes(CHUNK_SIZE)
+ total_sent = 0
+
+ while total_sent < TOTAL_SIZE:
+ if not response.writer.write(chunk):
+ break
+ total_sent += CHUNK_SIZE
diff --git a/test/wpt/tests/fetch/api/resources/infinite-slow-response.py b/test/fixtures/wpt/fetch/api/resources/infinite-slow-response.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/infinite-slow-response.py
rename to test/fixtures/wpt/fetch/api/resources/infinite-slow-response.py
diff --git a/test/wpt/tests/fetch/api/resources/inspect-headers.py b/test/fixtures/wpt/fetch/api/resources/inspect-headers.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/inspect-headers.py
rename to test/fixtures/wpt/fetch/api/resources/inspect-headers.py
diff --git a/test/wpt/tests/fetch/api/resources/keepalive-helper.js b/test/fixtures/wpt/fetch/api/resources/keepalive-helper.js
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/keepalive-helper.js
rename to test/fixtures/wpt/fetch/api/resources/keepalive-helper.js
diff --git a/test/wpt/tests/fetch/api/resources/keepalive-iframe.html b/test/fixtures/wpt/fetch/api/resources/keepalive-iframe.html
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/keepalive-iframe.html
rename to test/fixtures/wpt/fetch/api/resources/keepalive-iframe.html
diff --git a/test/wpt/tests/fetch/api/resources/keepalive-redirect-iframe.html b/test/fixtures/wpt/fetch/api/resources/keepalive-redirect-iframe.html
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/keepalive-redirect-iframe.html
rename to test/fixtures/wpt/fetch/api/resources/keepalive-redirect-iframe.html
diff --git a/test/wpt/tests/fetch/api/resources/keepalive-redirect-window.html b/test/fixtures/wpt/fetch/api/resources/keepalive-redirect-window.html
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/keepalive-redirect-window.html
rename to test/fixtures/wpt/fetch/api/resources/keepalive-redirect-window.html
diff --git a/test/wpt/tests/fetch/api/resources/method.py b/test/fixtures/wpt/fetch/api/resources/method.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/method.py
rename to test/fixtures/wpt/fetch/api/resources/method.py
diff --git a/test/wpt/tests/fetch/api/resources/preflight.py b/test/fixtures/wpt/fetch/api/resources/preflight.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/preflight.py
rename to test/fixtures/wpt/fetch/api/resources/preflight.py
diff --git a/test/wpt/tests/fetch/api/resources/redirect-empty-location.py b/test/fixtures/wpt/fetch/api/resources/redirect-empty-location.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/redirect-empty-location.py
rename to test/fixtures/wpt/fetch/api/resources/redirect-empty-location.py
diff --git a/test/wpt/tests/fetch/api/resources/redirect.h2.py b/test/fixtures/wpt/fetch/api/resources/redirect.h2.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/redirect.h2.py
rename to test/fixtures/wpt/fetch/api/resources/redirect.h2.py
diff --git a/test/wpt/tests/fetch/api/resources/redirect.py b/test/fixtures/wpt/fetch/api/resources/redirect.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/redirect.py
rename to test/fixtures/wpt/fetch/api/resources/redirect.py
diff --git a/test/wpt/tests/fetch/api/resources/sandboxed-iframe.html b/test/fixtures/wpt/fetch/api/resources/sandboxed-iframe.html
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/sandboxed-iframe.html
rename to test/fixtures/wpt/fetch/api/resources/sandboxed-iframe.html
diff --git a/test/wpt/tests/fetch/api/resources/script-with-header.py b/test/fixtures/wpt/fetch/api/resources/script-with-header.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/script-with-header.py
rename to test/fixtures/wpt/fetch/api/resources/script-with-header.py
diff --git a/test/wpt/tests/fetch/api/resources/stash-put.py b/test/fixtures/wpt/fetch/api/resources/stash-put.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/stash-put.py
rename to test/fixtures/wpt/fetch/api/resources/stash-put.py
diff --git a/test/wpt/tests/fetch/api/resources/stash-take.py b/test/fixtures/wpt/fetch/api/resources/stash-take.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/stash-take.py
rename to test/fixtures/wpt/fetch/api/resources/stash-take.py
diff --git a/test/wpt/tests/fetch/api/resources/status.py b/test/fixtures/wpt/fetch/api/resources/status.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/status.py
rename to test/fixtures/wpt/fetch/api/resources/status.py
diff --git a/test/wpt/tests/fetch/api/resources/sw-intercept-abort.js b/test/fixtures/wpt/fetch/api/resources/sw-intercept-abort.js
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/sw-intercept-abort.js
rename to test/fixtures/wpt/fetch/api/resources/sw-intercept-abort.js
diff --git a/test/wpt/tests/fetch/api/resources/sw-intercept.js b/test/fixtures/wpt/fetch/api/resources/sw-intercept.js
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/sw-intercept.js
rename to test/fixtures/wpt/fetch/api/resources/sw-intercept.js
diff --git a/test/wpt/tests/fetch/api/resources/top.txt b/test/fixtures/wpt/fetch/api/resources/top.txt
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/top.txt
rename to test/fixtures/wpt/fetch/api/resources/top.txt
diff --git a/test/wpt/tests/fetch/api/resources/trickle.py b/test/fixtures/wpt/fetch/api/resources/trickle.py
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/trickle.py
rename to test/fixtures/wpt/fetch/api/resources/trickle.py
diff --git a/test/wpt/tests/fetch/api/resources/utils.js b/test/fixtures/wpt/fetch/api/resources/utils.js
similarity index 100%
rename from test/wpt/tests/fetch/api/resources/utils.js
rename to test/fixtures/wpt/fetch/api/resources/utils.js
diff --git a/test/wpt/tests/fetch/api/response/json.any.js b/test/fixtures/wpt/fetch/api/response/json.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/json.any.js
rename to test/fixtures/wpt/fetch/api/response/json.any.js
diff --git a/test/wpt/tests/fetch/api/response/many-empty-chunks-crash.html b/test/fixtures/wpt/fetch/api/response/many-empty-chunks-crash.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/many-empty-chunks-crash.html
rename to test/fixtures/wpt/fetch/api/response/many-empty-chunks-crash.html
diff --git a/test/wpt/tests/fetch/api/response/multi-globals/current/current.html b/test/fixtures/wpt/fetch/api/response/multi-globals/current/current.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/multi-globals/current/current.html
rename to test/fixtures/wpt/fetch/api/response/multi-globals/current/current.html
diff --git a/test/wpt/tests/fetch/api/response/multi-globals/incumbent/incumbent.html b/test/fixtures/wpt/fetch/api/response/multi-globals/incumbent/incumbent.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/multi-globals/incumbent/incumbent.html
rename to test/fixtures/wpt/fetch/api/response/multi-globals/incumbent/incumbent.html
diff --git a/test/wpt/tests/fetch/api/response/multi-globals/relevant/relevant.html b/test/fixtures/wpt/fetch/api/response/multi-globals/relevant/relevant.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/multi-globals/relevant/relevant.html
rename to test/fixtures/wpt/fetch/api/response/multi-globals/relevant/relevant.html
diff --git a/test/wpt/tests/fetch/api/response/multi-globals/url-parsing.html b/test/fixtures/wpt/fetch/api/response/multi-globals/url-parsing.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/multi-globals/url-parsing.html
rename to test/fixtures/wpt/fetch/api/response/multi-globals/url-parsing.html
diff --git a/test/fixtures/wpt/fetch/api/response/response-arraybuffer-realm.window.js b/test/fixtures/wpt/fetch/api/response/response-arraybuffer-realm.window.js
new file mode 100644
index 00000000000..19a5dfa5ff6
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/response/response-arraybuffer-realm.window.js
@@ -0,0 +1,23 @@
+// META: title=realm of Response arrayBuffer()
+
+'use strict';
+
+promise_test(async () => {
+ await new Promise(resolve => {
+ onload = resolve;
+ });
+
+ let iframe = document.createElement('iframe');
+ document.body.appendChild(iframe);
+ iframe.srcdoc = '';
+ await new Promise(resolve => {
+ iframe.onload = resolve;
+ });
+
+ let otherRealm = iframe.contentWindow;
+
+ let ab = await window.Response.prototype.arrayBuffer.call(new otherRealm.Response(''));
+
+ assert_true(ab instanceof otherRealm.ArrayBuffer, "ArrayBuffer should be created in receiver's realm");
+ assert_false(ab instanceof ArrayBuffer, "ArrayBuffer should not be created in the arrayBuffer() methods's realm");
+}, 'realm of the ArrayBuffer from Response arrayBuffer()');
diff --git a/test/fixtures/wpt/fetch/api/response/response-blob-realm.any.js b/test/fixtures/wpt/fetch/api/response/response-blob-realm.any.js
new file mode 100644
index 00000000000..1be105416a0
--- /dev/null
+++ b/test/fixtures/wpt/fetch/api/response/response-blob-realm.any.js
@@ -0,0 +1,23 @@
+// META: title=realm of Response bytes()
+
+"use strict";
+
+promise_test(async () => {
+ await new Promise(resolve => {
+ onload = resolve;
+ });
+
+ let iframe = document.createElement("iframe");
+ document.body.appendChild(iframe);
+ iframe.srcdoc = "";
+ await new Promise(resolve => {
+ iframe.onload = resolve;
+ });
+
+ let otherRealm = iframe.contentWindow;
+
+ let ab = await window.Response.prototype.bytes.call(new otherRealm.Response(""));
+
+ assert_true(ab instanceof otherRealm.Uint8Array, "Uint8Array should be created in receiver's realm");
+ assert_false(ab instanceof Uint8Array, "Uint8Array should not be created in the bytes() methods's realm");
+}, "realm of the Uint8Array from Response bytes()");
diff --git a/test/wpt/tests/fetch/api/response/response-body-read-task-handling.html b/test/fixtures/wpt/fetch/api/response/response-body-read-task-handling.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-body-read-task-handling.html
rename to test/fixtures/wpt/fetch/api/response/response-body-read-task-handling.html
diff --git a/test/wpt/tests/fetch/api/response/response-cancel-stream.any.js b/test/fixtures/wpt/fetch/api/response/response-cancel-stream.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-cancel-stream.any.js
rename to test/fixtures/wpt/fetch/api/response/response-cancel-stream.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-clone-iframe.window.js b/test/fixtures/wpt/fetch/api/response/response-clone-iframe.window.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-clone-iframe.window.js
rename to test/fixtures/wpt/fetch/api/response/response-clone-iframe.window.js
diff --git a/test/wpt/tests/fetch/api/response/response-clone.any.js b/test/fixtures/wpt/fetch/api/response/response-clone.any.js
similarity index 98%
rename from test/wpt/tests/fetch/api/response/response-clone.any.js
rename to test/fixtures/wpt/fetch/api/response/response-clone.any.js
index f5cda75149e..c0c844948db 100644
--- a/test/wpt/tests/fetch/api/response/response-clone.any.js
+++ b/test/fixtures/wpt/fetch/api/response/response-clone.any.js
@@ -135,6 +135,7 @@ testReadableStreamClone(new Uint16Array(arrayBuffer, 2), "Uint16Array");
testReadableStreamClone(new Uint32Array(arrayBuffer), "Uint32Array");
testReadableStreamClone(typeof BigInt64Array === "function" ? new BigInt64Array(arrayBuffer) : undefined, "BigInt64Array");
testReadableStreamClone(typeof BigUint64Array === "function" ? new BigUint64Array(arrayBuffer) : undefined, "BigUint64Array");
+testReadableStreamClone(typeof Float16Array === "function" ? new Float16Array(arrayBuffer) : undefined, "Float16Array");
testReadableStreamClone(new Float32Array(arrayBuffer), "Float32Array");
testReadableStreamClone(new Float64Array(arrayBuffer), "Float64Array");
testReadableStreamClone(new DataView(arrayBuffer, 2, 8), "DataView");
diff --git a/test/wpt/tests/fetch/api/response/response-consume-empty.any.js b/test/fixtures/wpt/fetch/api/response/response-consume-empty.any.js
similarity index 85%
rename from test/wpt/tests/fetch/api/response/response-consume-empty.any.js
rename to test/fixtures/wpt/fetch/api/response/response-consume-empty.any.js
index 0fa85ecbcb2..a5df3562586 100644
--- a/test/wpt/tests/fetch/api/response/response-consume-empty.any.js
+++ b/test/fixtures/wpt/fetch/api/response/response-consume-empty.any.js
@@ -8,23 +8,12 @@ function checkBodyText(test, response) {
});
}
-function checkBodyBlob(test, response) {
- return response.blob().then(function(bodyAsBlob) {
- var promise = new Promise(function(resolve, reject) {
- var reader = new FileReader();
- reader.onload = function(evt) {
- resolve(reader.result)
- };
- reader.onerror = function() {
- reject("Blob's reader failed");
- };
- reader.readAsText(bodyAsBlob);
- });
- return promise.then(function(body) {
- assert_equals(body, "", "Resolved value should be empty");
- assert_false(response.bodyUsed);
- });
- });
+async function checkBodyBlob(test, response) {
+ const bodyAsBlob = await response.blob();
+ const body = await bodyAsBlob.text();
+
+ assert_equals(body, "", "Resolved value should be empty");
+ assert_false(response.bodyUsed);
}
function checkBodyArrayBuffer(test, response) {
diff --git a/test/wpt/tests/fetch/api/response/response-consume-stream.any.js b/test/fixtures/wpt/fetch/api/response/response-consume-stream.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-consume-stream.any.js
rename to test/fixtures/wpt/fetch/api/response/response-consume-stream.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-consume.html b/test/fixtures/wpt/fetch/api/response/response-consume.html
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-consume.html
rename to test/fixtures/wpt/fetch/api/response/response-consume.html
diff --git a/test/wpt/tests/fetch/api/response/response-error-from-stream.any.js b/test/fixtures/wpt/fetch/api/response/response-error-from-stream.any.js
similarity index 91%
rename from test/wpt/tests/fetch/api/response/response-error-from-stream.any.js
rename to test/fixtures/wpt/fetch/api/response/response-error-from-stream.any.js
index 118eb7d5cb3..33cad40e757 100644
--- a/test/wpt/tests/fetch/api/response/response-error-from-stream.any.js
+++ b/test/fixtures/wpt/fetch/api/response/response-error-from-stream.any.js
@@ -47,6 +47,7 @@ promise_test(test => {
// test start() errors for all Body reader methods
runRequestPromiseTest(newStreamWithStartError(), 'arrayBuffer', 'ReadableStream start() Error propagates to Response.arrayBuffer() Promise');
runRequestPromiseTest(newStreamWithStartError(), 'blob', 'ReadableStream start() Error propagates to Response.blob() Promise');
+runRequestPromiseTest(newStreamWithStartError(), 'bytes', 'ReadableStream start() Error propagates to Response.bytes() Promise');
runRequestPromiseTest(newStreamWithStartError(), 'formData', 'ReadableStream start() Error propagates to Response.formData() Promise');
runRequestPromiseTest(newStreamWithStartError(), 'json', 'ReadableStream start() Error propagates to Response.json() Promise');
runRequestPromiseTest(newStreamWithStartError(), 'text', 'ReadableStream start() Error propagates to Response.text() Promise');
@@ -54,6 +55,7 @@ runRequestPromiseTest(newStreamWithStartError(), 'text', 'ReadableStream
// test pull() errors for all Body reader methods
runRequestPromiseTest(newStreamWithPullError(), 'arrayBuffer', 'ReadableStream pull() Error propagates to Response.arrayBuffer() Promise');
runRequestPromiseTest(newStreamWithPullError(), 'blob', 'ReadableStream pull() Error propagates to Response.blob() Promise');
+runRequestPromiseTest(newStreamWithPullError(), 'bytes', 'ReadableStream pull() Error propagates to Response.bytes() Promise');
runRequestPromiseTest(newStreamWithPullError(), 'formData', 'ReadableStream pull() Error propagates to Response.formData() Promise');
runRequestPromiseTest(newStreamWithPullError(), 'json', 'ReadableStream pull() Error propagates to Response.json() Promise');
runRequestPromiseTest(newStreamWithPullError(), 'text', 'ReadableStream pull() Error propagates to Response.text() Promise');
diff --git a/test/wpt/tests/fetch/api/response/response-error.any.js b/test/fixtures/wpt/fetch/api/response/response-error.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-error.any.js
rename to test/fixtures/wpt/fetch/api/response/response-error.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-from-stream.any.js b/test/fixtures/wpt/fetch/api/response/response-from-stream.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-from-stream.any.js
rename to test/fixtures/wpt/fetch/api/response/response-from-stream.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-headers-guard.any.js b/test/fixtures/wpt/fetch/api/response/response-headers-guard.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-headers-guard.any.js
rename to test/fixtures/wpt/fetch/api/response/response-headers-guard.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-init-001.any.js b/test/fixtures/wpt/fetch/api/response/response-init-001.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-init-001.any.js
rename to test/fixtures/wpt/fetch/api/response/response-init-001.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-init-002.any.js b/test/fixtures/wpt/fetch/api/response/response-init-002.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-init-002.any.js
rename to test/fixtures/wpt/fetch/api/response/response-init-002.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-init-contenttype.any.js b/test/fixtures/wpt/fetch/api/response/response-init-contenttype.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-init-contenttype.any.js
rename to test/fixtures/wpt/fetch/api/response/response-init-contenttype.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-static-error.any.js b/test/fixtures/wpt/fetch/api/response/response-static-error.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-static-error.any.js
rename to test/fixtures/wpt/fetch/api/response/response-static-error.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-static-json.any.js b/test/fixtures/wpt/fetch/api/response/response-static-json.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-static-json.any.js
rename to test/fixtures/wpt/fetch/api/response/response-static-json.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-static-redirect.any.js b/test/fixtures/wpt/fetch/api/response/response-static-redirect.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-static-redirect.any.js
rename to test/fixtures/wpt/fetch/api/response/response-static-redirect.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-bad-chunk.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-bad-chunk.any.js
similarity index 90%
rename from test/wpt/tests/fetch/api/response/response-stream-bad-chunk.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-bad-chunk.any.js
index d3d92e16772..8e83cd19087 100644
--- a/test/wpt/tests/fetch/api/response/response-stream-bad-chunk.any.js
+++ b/test/fixtures/wpt/fetch/api/response/response-stream-bad-chunk.any.js
@@ -19,6 +19,7 @@ function runChunkTest(responseReaderMethod, testDescription) {
runChunkTest('arrayBuffer', 'ReadableStream with non-Uint8Array chunk passed to Response.arrayBuffer() causes TypeError');
runChunkTest('blob', 'ReadableStream with non-Uint8Array chunk passed to Response.blob() causes TypeError');
+runChunkTest('bytes', 'ReadableStream with non-Uint8Array chunk passed to Response.bytes() causes TypeError');
runChunkTest('formData', 'ReadableStream with non-Uint8Array chunk passed to Response.formData() causes TypeError');
runChunkTest('json', 'ReadableStream with non-Uint8Array chunk passed to Response.json() causes TypeError');
runChunkTest('text', 'ReadableStream with non-Uint8Array chunk passed to Response.text() causes TypeError');
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-1.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-1.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-1.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-1.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-2.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-2.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-2.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-2.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-3.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-3.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-3.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-3.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-4.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-4.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-4.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-4.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-5.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-5.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-5.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-5.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-6.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-6.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-6.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-6.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-by-pipe.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-by-pipe.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-by-pipe.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-by-pipe.any.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-disturbed-util.js b/test/fixtures/wpt/fetch/api/response/response-stream-disturbed-util.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-disturbed-util.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-disturbed-util.js
diff --git a/test/wpt/tests/fetch/api/response/response-stream-with-broken-then.any.js b/test/fixtures/wpt/fetch/api/response/response-stream-with-broken-then.any.js
similarity index 100%
rename from test/wpt/tests/fetch/api/response/response-stream-with-broken-then.any.js
rename to test/fixtures/wpt/fetch/api/response/response-stream-with-broken-then.any.js
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cache.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cache.tentative.https.html
new file mode 100644
index 00000000000..c8bcf7fdf12
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cache.tentative.https.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cookies.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cookies.tentative.https.html
new file mode 100644
index 00000000000..aa1673e88c8
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-cookies.tentative.https.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-storage.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-storage.tentative.https.html
new file mode 100644
index 00000000000..22747eb6565
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-clear-site-data-storage.tentative.https.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-decompression.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-decompression.tentative.https.html
new file mode 100644
index 00000000000..c7b3b7c3a5a
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-decompression.tentative.https.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-element.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-element.tentative.https.html
new file mode 100644
index 00000000000..23a271d4818
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-element.tentative.https.html
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-header.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-header.tentative.https.html
new file mode 100644
index 00000000000..6f6a792ade6
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-fetch-with-link-header.tentative.https.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/dictionary-registration.tentative.https.html b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-registration.tentative.https.html
new file mode 100644
index 00000000000..f0782aff3bd
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/dictionary-registration.tentative.https.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/resources/clear-site-data.py b/test/fixtures/wpt/fetch/compression-dictionary/resources/clear-site-data.py
new file mode 100644
index 00000000000..0db51bf797f
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/resources/clear-site-data.py
@@ -0,0 +1,4 @@
+def main(request, response):
+ directive = request.GET.first(b"directive")
+ response.headers.set(b"Clear-Site-Data", b"\"" + directive + b"\"")
+ return b"OK"
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/resources/compressed-data.py b/test/fixtures/wpt/fetch/compression-dictionary/resources/compressed-data.py
new file mode 100644
index 00000000000..4be4b555640
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/resources/compressed-data.py
@@ -0,0 +1,28 @@
+def main(request, response):
+ response.headers.set(b"Access-Control-Allow-Origin", b"*")
+ response.headers.set(b"Content-Type", b"text/plain")
+ response.headers.set(
+ b"Content-Dictionary",
+ b":U5abz16WDg7b8KS93msLPpOB4Vbef1uRzoORYkJw9BY=:")
+
+ # `br_d_data` and `zstd_d_data` are generated using the following commands:
+ #
+ # $ echo "This is a test dictionary." > /tmp/dict
+ # $ echo -n "This is compressed test data using a test dictionary" \
+ # > /tmp/data
+ # $ brotli -o /tmp/out.brd -D /tmp/dict /tmp/data
+ # $ xxd -p /tmp/out.brd | tr -d '\n' | sed 's/\(..\)/\\x\1/g'
+ br_d_data = b"\xa1\x98\x01\x80\x62\xa4\x4c\x1d\xdf\x12\x84\x8c\xae\xc2\xca\x60\x22\x07\x6e\x81\x05\x14\xc9\xb7\xc3\x44\x8e\xbc\x16\xe0\x15\x0e\xec\xc1\xee\x34\x33\x3e\x0d"
+ # $ zstd -o /tmp/out.zstdd -D /tmp/dict /tmp/data
+ # $ xxd -p /tmp/out.zstdd | tr -d '\n' | sed 's/\(..\)/\\x\1/g'
+ zstd_d_data = b"\x28\xb5\x2f\xfd\x24\x34\xf5\x00\x00\x98\x63\x6f\x6d\x70\x72\x65\x73\x73\x65\x64\x61\x74\x61\x20\x75\x73\x69\x6e\x67\x03\x00\x59\xf9\x73\x54\x46\x27\x26\x10\x9e\x99\xf2\xbc"
+
+ if b'content_encoding' in request.GET:
+ content_encoding = request.GET.first(b"content_encoding")
+ response.headers.set(b"Content-Encoding", content_encoding)
+ if content_encoding == b"br-d":
+ # Send the pre compressed file
+ response.content = br_d_data
+ if content_encoding == b"zstd-d":
+ # Send the pre compressed file
+ response.content = zstd_d_data
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/resources/compression-dictionary-util.js b/test/fixtures/wpt/fetch/compression-dictionary/resources/compression-dictionary-util.js
new file mode 100644
index 00000000000..7d86f594a80
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/resources/compression-dictionary-util.js
@@ -0,0 +1,120 @@
+
+const kDefaultDictionaryContent = 'This is a test dictionary.\n';
+const kDefaultDictionaryHashBase64 =
+ ':U5abz16WDg7b8KS93msLPpOB4Vbef1uRzoORYkJw9BY=:';
+const kRegisterDictionaryPath = './resources/register-dictionary.py';
+const kCompressedDataPath = './resources/compressed-data.py';
+const kExpectedCompressedData =
+ `This is compressed test data using a test dictionary`;
+const kCheckAvailableDictionaryHeaderMaxRetry = 10;
+const kCheckAvailableDictionaryHeaderRetryTimeout = 200;
+const kCheckPreviousRequestHeadersMaxRetry = 5;
+const kCheckPreviousRequestHeadersRetryTimeout = 250;
+
+// Gets the remote URL corresponding to `relative_path`.
+function getRemoteHostUrl(relative_path) {
+ const remote_origin = new URL(get_host_info().HTTPS_REMOTE_ORIGIN);
+ let result = new URL(relative_path, location.href);
+ result.protocol = remote_origin.protocol;
+ result.hostname = remote_origin.hostname;
+ result.port = remote_origin.port;
+ return result.href;
+}
+
+// Calculates the Structured Field Byte Sequence containing the SHA-256 hash of
+// the contents of the dictionary text.
+async function calculateDictionaryHash(dictionary_text) {
+ const encoded = (new TextEncoder()).encode(dictionary_text);
+ const digest = await crypto.subtle.digest('SHA-256', encoded)
+ return ':' + btoa(String.fromCharCode(...new Uint8Array(digest))) + ':';
+}
+
+// Checks the HTTP request headers which is sent to the server.
+async function checkHeaders(check_remote = false) {
+ let url = './resources/echo-headers.py';
+ if (check_remote) {
+ url = getRemoteHostUrl(url);
+ }
+ return await (await fetch(url)).json();
+}
+
+// Checks the "available-dictionary" header in the HTTP request headers.
+async function checkAvailableDictionaryHeader(check_remote = false) {
+ return (await checkHeaders(check_remote))['available-dictionary'];
+}
+
+// Waits until the "available-dictionary" header is available in the HTTP
+// request headers, and returns the header. If the header is not available after
+// the specified number of retries, returns an error message. If the
+// `expected_header` is specified, this method waits until the header is
+// available and matches the `expected_header`.
+async function waitUntilAvailableDictionaryHeader(test, {
+ max_retry = kCheckAvailableDictionaryHeaderMaxRetry,
+ expected_header = undefined,
+ check_remote = false
+}) {
+ for (let retry_count = 0; retry_count <= max_retry; retry_count++) {
+ const header = await checkAvailableDictionaryHeader(check_remote);
+ if (header) {
+ if (expected_header === undefined || header == expected_header) {
+ return header;
+ }
+ }
+ await new Promise(
+ (resolve) => test.step_timeout(
+ resolve, kCheckAvailableDictionaryHeaderRetryTimeout));
+ }
+ return '"available-dictionary" header is not available';
+}
+
+// Checks the HTTP request headers which was sent to the server with `token`
+// to register a dictionary.
+async function checkPreviousRequestHeaders(token, check_remote = false) {
+ let url = `./resources/register-dictionary.py?get_previous_header=${token}`;
+ if (check_remote) {
+ url = getRemoteHostUrl(url);
+ }
+ return await (await fetch(url)).json();
+}
+
+// Waits until the HTTP request headers which was sent to the server with
+// `token` to register a dictionary is available, and returns the header. If the
+// header is not available after the specified number of retries, returns
+// `undefined`.
+async function waitUntilPreviousRequestHeaders(
+ test, token, check_remote = false) {
+ for (let retry_count = 0; retry_count <= kCheckPreviousRequestHeadersMaxRetry;
+ retry_count++) {
+ const header =
+ (await checkPreviousRequestHeaders(token, check_remote))['headers'];
+ if (header) {
+ return header;
+ }
+ await new Promise(
+ (resolve) => test.step_timeout(
+ resolve, kCheckPreviousRequestHeadersRetryTimeout));
+ }
+ return undefined;
+}
+
+// Clears the site data for the specified directive by sending a request to
+// `./resources/clear-site-data.py` which returns `Clear-Site-Data` response
+// header.
+// Note: When `directive` is 'cache' or 'cookies' is specified, registered
+// compression dictionaries should be also cleared.
+async function clearSiteData(directive = 'cache') {
+ return await (await fetch(
+ `./resources/clear-site-data.py?directive=${directive}`))
+ .text();
+}
+
+// A utility test method that adds the `clearSiteData()` method to the
+// testharness cleanup function. This is intended to ensure that registered
+// dictionaries are cleared in tests and that registered dictionaries do not
+// interfere with subsequent tests.
+function compression_dictionary_promise_test(func, name, properties) {
+ promise_test(async (test) => {
+ test.add_cleanup(clearSiteData);
+ await func(test);
+ }, name, properties);
+}
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/resources/echo-headers.py b/test/fixtures/wpt/fetch/compression-dictionary/resources/echo-headers.py
new file mode 100644
index 00000000000..aabd99eb101
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/resources/echo-headers.py
@@ -0,0 +1,10 @@
+import json
+
+def main(request, response):
+ response.headers.set(b"Access-Control-Allow-Origin", b"*")
+ headers = {}
+ for header in request.headers:
+ key = header.decode('utf-8')
+ value = request.headers.get(header).decode('utf-8')
+ headers[key] = value
+ return json.dumps(headers)
diff --git a/test/wpt/tests/fetch/range/resources/basic.html b/test/fixtures/wpt/fetch/compression-dictionary/resources/empty.html
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/basic.html
rename to test/fixtures/wpt/fetch/compression-dictionary/resources/empty.html
diff --git a/test/fixtures/wpt/fetch/compression-dictionary/resources/register-dictionary.py b/test/fixtures/wpt/fetch/compression-dictionary/resources/register-dictionary.py
new file mode 100644
index 00000000000..0bd57225ef1
--- /dev/null
+++ b/test/fixtures/wpt/fetch/compression-dictionary/resources/register-dictionary.py
@@ -0,0 +1,37 @@
+import json
+
+def main(request, response):
+ response.headers.set(b"Access-Control-Allow-Origin", b"*")
+ match = b"/fetch/compression-dictionary/resources/*"
+ content = b"This is a test dictionary.\n"
+ if b"match" in request.GET:
+ match = request.GET.first(b"match")
+ if b"content" in request.GET:
+ content = request.GET.first(b"content")
+
+ token = request.GET.first(b"save_header", None)
+ if token is not None:
+ headers = {}
+ for header in request.headers:
+ key = header.decode('utf-8')
+ value = request.headers.get(header).decode('utf-8')
+ headers[key] = value
+ with request.server.stash.lock:
+ request.server.stash.put(token, json.dumps(headers))
+
+ previous_token = request.GET.first(b"get_previous_header", None)
+ if previous_token is not None:
+ result = {}
+ with request.server.stash.lock:
+ store = request.server.stash.take(previous_token)
+ if store is not None:
+ headers = json.loads(store)
+ result["headers"] = headers
+ return json.dumps(result)
+
+ options = b"match=\"" + match + b"\""
+ if b"id" in request.GET:
+ options += b", id=\"" + request.GET.first(b"id") + b"\""
+ response.headers.set(b"Use-As-Dictionary", options)
+ response.headers.set(b"Cache-Control", b"max-age=3600")
+ return content
diff --git a/test/wpt/tests/fetch/connection-pool/network-partition-key.html b/test/fixtures/wpt/fetch/connection-pool/network-partition-key.html
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/network-partition-key.html
rename to test/fixtures/wpt/fetch/connection-pool/network-partition-key.html
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-about-blank-checker.html b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-about-blank-checker.html
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-about-blank-checker.html
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-about-blank-checker.html
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-checker.html b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-checker.html
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-checker.html
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-checker.html
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-iframe-checker.html b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-iframe-checker.html
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-iframe-checker.html
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-iframe-checker.html
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-key.js b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-key.js
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-key.js
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-key.js
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-key.py b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-key.py
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-key.py
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-key.py
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-worker-checker.html b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-worker-checker.html
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-worker-checker.html
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-worker-checker.html
diff --git a/test/wpt/tests/fetch/connection-pool/resources/network-partition-worker.js b/test/fixtures/wpt/fetch/connection-pool/resources/network-partition-worker.js
similarity index 100%
rename from test/wpt/tests/fetch/connection-pool/resources/network-partition-worker.js
rename to test/fixtures/wpt/fetch/connection-pool/resources/network-partition-worker.js
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/bad-br-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/br/bad-br-body.https.any.js
new file mode 100644
index 00000000000..43ea90a336c
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/bad-br-body.https.any.js
@@ -0,0 +1,12 @@
+// META: global=window
+
+[
+ "arrayBuffer",
+].forEach(method => {
+ promise_test(t => {
+ return fetch("resources/bad-br-body.py").then(res => {
+ assert_equals(res.status, 200);
+ return promise_rejects_js(t, TypeError, res[method]());
+ });
+ }, "Consuming the body of a resource with bad br content with " + method + "() should reject");
+});
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/big-br-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/br/big-br-body.https.any.js
new file mode 100644
index 00000000000..1427dd73026
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/big-br-body.https.any.js
@@ -0,0 +1,55 @@
+// META: global=window,worker
+
+const EXPECTED_SIZE = 27000000;
+const EXPECTED_SHA256 = [
+ 74, 100, 37, 243, 147, 61, 116, 60, 241, 221, 126,
+ 18, 24, 71, 204, 28, 50, 62, 201, 130, 152, 225,
+ 217, 183, 10, 201, 143, 214, 102, 155, 212, 248,
+ ];
+
+promise_test(async () => {
+ const response = await fetch('resources/big.text.br');
+ assert_true(response.ok);
+ const arrayBuffer = await response.arrayBuffer();
+ assert_equals(arrayBuffer.byteLength, EXPECTED_SIZE,
+ 'uncompressed size should match');
+ const sha256 = await crypto.subtle.digest('SHA-256', arrayBuffer);
+ assert_array_equals(new Uint8Array(sha256), EXPECTED_SHA256,
+ 'digest should match');
+}, 'large br data should be decompressed successfully');
+
+promise_test(async () => {
+ const response = await fetch('resources/big.text.br');
+ assert_true(response.ok);
+ const reader = response.body.getReader({mode: 'byob'});
+ let offset = 0;
+ // Pre-allocate space for the output. The response body will be read
+ // chunk-by-chunk into this array.
+ let ab = new ArrayBuffer(EXPECTED_SIZE);
+ while (offset < EXPECTED_SIZE) {
+ // To stress the data pipe, we want to use a different size read each
+ // time. Unfortunately, JavaScript doesn't have a seeded random number
+ // generator, so this creates the possibility of making this test flaky if
+ // it doesn't work for some edge cases.
+ let size = Math.floor(Math.random() * 65535 + 1);
+ if (size + offset > EXPECTED_SIZE) {
+ size = EXPECTED_SIZE - offset;
+ }
+ const u8 = new Uint8Array(ab, offset, size);
+ const { value, done } = await reader.read(u8);
+ ab = value.buffer;
+ // Check that we got our original array back.
+ assert_equals(ab.byteLength, EXPECTED_SIZE,
+ 'backing array should be the same size');
+ assert_equals(offset, value.byteOffset, 'offset should match');
+ assert_less_than_equal(value.byteLength, size,
+ 'we should not have got more than we asked for');
+ offset = value.byteOffset + value.byteLength;
+ if (done) break;
+ }
+ assert_equals(offset, EXPECTED_SIZE,
+ 'we should have read the whole thing');
+ const sha256 = await crypto.subtle.digest('SHA-256', new Uint8Array(ab));
+ assert_array_equals(new Uint8Array(sha256), EXPECTED_SHA256,
+ 'digest should match');
+}, 'large br data should be decompressed successfully with byte stream');
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/br-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/br/br-body.https.any.js
new file mode 100644
index 00000000000..2c2dbb5d293
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/br-body.https.any.js
@@ -0,0 +1,15 @@
+// META: global=window,worker
+
+const expectedDecompressedSize = 10500;
+[
+ "text",
+ "octetstream"
+].forEach(contentType => {
+ promise_test(async t => {
+ let response = await fetch(`resources/foo.${contentType}.br`);
+ assert_true(response.ok);
+ let arrayBuffer = await response.arrayBuffer()
+ let u8 = new Uint8Array(arrayBuffer);
+ assert_equals(u8.length, expectedDecompressedSize);
+ }, `fetched br data with content type ${contentType} should be decompressed.`);
+});
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/bad-br-body.py b/test/fixtures/wpt/fetch/content-encoding/br/resources/bad-br-body.py
new file mode 100644
index 00000000000..0710e7ffdee
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/resources/bad-br-body.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ headers = [(b"Content-Encoding", b"br")]
+ return headers, b"not actually br"
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br b/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br
new file mode 100644
index 00000000000..b3a530d757d
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br.headers b/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br.headers
new file mode 100644
index 00000000000..aba00bd5d4a
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/resources/big.text.br.headers
@@ -0,0 +1,3 @@
+Content-type: text/plain
+Content-Encoding: br
+Cache-Control: no-store
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br
new file mode 100644
index 00000000000..30cb2f7095e
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br.headers b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br.headers
new file mode 100644
index 00000000000..c0c19bc82af
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.octetstream.br.headers
@@ -0,0 +1,2 @@
+Content-type: application/octet-stream
+Content-Encoding: br
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br
new file mode 100644
index 00000000000..30cb2f7095e
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br.headers b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br.headers
new file mode 100644
index 00000000000..8c03b823e09
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/br/resources/foo.text.br.headers
@@ -0,0 +1,2 @@
+Content-type: text/plain
+Content-Encoding: br
diff --git a/test/wpt/tests/fetch/content-encoding/bad-gzip-body.any.js b/test/fixtures/wpt/fetch/content-encoding/gzip/bad-gzip-body.any.js
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/bad-gzip-body.any.js
rename to test/fixtures/wpt/fetch/content-encoding/gzip/bad-gzip-body.any.js
diff --git a/test/wpt/tests/fetch/content-encoding/big-gzip-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/gzip/big-gzip-body.https.any.js
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/big-gzip-body.https.any.js
rename to test/fixtures/wpt/fetch/content-encoding/gzip/big-gzip-body.https.any.js
diff --git a/test/wpt/tests/fetch/content-encoding/gzip-body.any.js b/test/fixtures/wpt/fetch/content-encoding/gzip/gzip-body.any.js
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/gzip-body.any.js
rename to test/fixtures/wpt/fetch/content-encoding/gzip/gzip-body.any.js
diff --git a/test/wpt/tests/fetch/content-encoding/resources/bad-gzip-body.py b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/bad-gzip-body.py
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/bad-gzip-body.py
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/bad-gzip-body.py
diff --git a/test/wpt/tests/fetch/content-encoding/resources/big.text.gz b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/big.text.gz
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/big.text.gz
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/big.text.gz
diff --git a/test/wpt/tests/fetch/content-encoding/resources/big.text.gz.headers b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/big.text.gz.headers
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/big.text.gz.headers
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/big.text.gz.headers
diff --git a/test/wpt/tests/fetch/content-encoding/resources/foo.octetstream.gz b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.octetstream.gz
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/foo.octetstream.gz
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.octetstream.gz
diff --git a/test/wpt/tests/fetch/content-encoding/resources/foo.octetstream.gz.headers b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.octetstream.gz.headers
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/foo.octetstream.gz.headers
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.octetstream.gz.headers
diff --git a/test/wpt/tests/fetch/content-encoding/resources/foo.text.gz b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.text.gz
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/foo.text.gz
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.text.gz
diff --git a/test/wpt/tests/fetch/content-encoding/resources/foo.text.gz.headers b/test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.text.gz.headers
similarity index 100%
rename from test/wpt/tests/fetch/content-encoding/resources/foo.text.gz.headers
rename to test/fixtures/wpt/fetch/content-encoding/gzip/resources/foo.text.gz.headers
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/bad-zstd-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/zstd/bad-zstd-body.https.any.js
new file mode 100644
index 00000000000..3f32e4dfba7
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/bad-zstd-body.https.any.js
@@ -0,0 +1,22 @@
+// META: global=window,worker
+
+promise_test((test) => {
+ return fetch("resources/bad-zstd-body.py").then(res => {
+ assert_equals(res.status, 200);
+ });
+}, "Fetching a resource with bad zstd content should still resolve");
+
+[
+ "arrayBuffer",
+ "blob",
+ "formData",
+ "json",
+ "text"
+].forEach(method => {
+ promise_test(t => {
+ return fetch("resources/bad-zstd-body.py").then(res => {
+ assert_equals(res.status, 200);
+ return promise_rejects_js(t, TypeError, res[method]());
+ });
+ }, "Consuming the body of a resource with bad zstd content with " + method + "() should reject");
+});
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/big-window-zstd-body.tentative.https.any.js b/test/fixtures/wpt/fetch/content-encoding/zstd/big-window-zstd-body.tentative.https.any.js
new file mode 100644
index 00000000000..c1dc9449567
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/big-window-zstd-body.tentative.https.any.js
@@ -0,0 +1,9 @@
+// META: global=window,worker
+// See https://github.com/facebook/zstd/issues/2713 for discussion about
+// standardizing window size limits.
+
+promise_test(async t => {
+ const response = await fetch('resources/big.window.zst');
+ assert_true(response.ok);
+ await promise_rejects_js(t, TypeError, response.text());
+}, 'Consuming the body of a resource with too large of a zstd window size should reject');
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/big-zstd-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/zstd/big-zstd-body.https.any.js
new file mode 100644
index 00000000000..6835f6e4255
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/big-zstd-body.https.any.js
@@ -0,0 +1,55 @@
+// META: global=window,worker
+
+const EXPECTED_SIZE = 27000000;
+const EXPECTED_SHA256 = [
+ 74, 100, 37, 243, 147, 61, 116, 60, 241, 221, 126,
+ 18, 24, 71, 204, 28, 50, 62, 201, 130, 152, 225,
+ 217, 183, 10, 201, 143, 214, 102, 155, 212, 248,
+ ];
+
+promise_test(async () => {
+ const response = await fetch('resources/big.text.zst');
+ assert_true(response.ok);
+ const arrayBuffer = await response.arrayBuffer();
+ assert_equals(arrayBuffer.byteLength, EXPECTED_SIZE,
+ 'uncompressed size should match');
+ const sha256 = await crypto.subtle.digest('SHA-256', arrayBuffer);
+ assert_array_equals(new Uint8Array(sha256), EXPECTED_SHA256,
+ 'digest should match');
+}, 'large zstd data should be decompressed successfully');
+
+promise_test(async () => {
+ const response = await fetch('resources/big.text.zst');
+ assert_true(response.ok);
+ const reader = response.body.getReader({mode: 'byob'});
+ let offset = 0;
+ // Pre-allocate space for the output. The response body will be read
+ // chunk-by-chunk into this array.
+ let ab = new ArrayBuffer(EXPECTED_SIZE);
+ while (offset < EXPECTED_SIZE) {
+ // To stress the data pipe, we want to use a different size read each
+ // time. Unfortunately, JavaScript doesn't have a seeded random number
+ // generator, so this creates the possibility of making this test flaky if
+ // it doesn't work for some edge cases.
+ let size = Math.floor(Math.random() * 65535 + 1);
+ if (size + offset > EXPECTED_SIZE) {
+ size = EXPECTED_SIZE - offset;
+ }
+ const u8 = new Uint8Array(ab, offset, size);
+ const { value, done } = await reader.read(u8);
+ ab = value.buffer;
+ // Check that we got our original array back.
+ assert_equals(ab.byteLength, EXPECTED_SIZE,
+ 'backing array should be the same size');
+ assert_equals(offset, value.byteOffset, 'offset should match');
+ assert_less_than_equal(value.byteLength, size,
+ 'we should not have got more than we asked for');
+ offset = value.byteOffset + value.byteLength;
+ if (done) break;
+ }
+ assert_equals(offset, EXPECTED_SIZE,
+ 'we should have read the whole thing');
+ const sha256 = await crypto.subtle.digest('SHA-256', new Uint8Array(ab));
+ assert_array_equals(new Uint8Array(sha256), EXPECTED_SHA256,
+ 'digest should match');
+}, 'large zstd data should be decompressed successfully with byte stream');
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/bad-zstd-body.py b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/bad-zstd-body.py
new file mode 100644
index 00000000000..496f26881dc
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/bad-zstd-body.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ headers = [(b"Content-Encoding", b"zstd")]
+ return headers, b"not actually zstd"
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst
new file mode 100644
index 00000000000..30eda2443f3
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst.headers b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst.headers
new file mode 100644
index 00000000000..ea5b05cf2c2
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.text.zst.headers
@@ -0,0 +1,3 @@
+Content-type: text/plain
+Content-Encoding: zstd
+Cache-Control: no-store
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst
new file mode 100644
index 00000000000..a1bca732283
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst.headers b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst.headers
new file mode 100644
index 00000000000..c5974e126a3
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/big.window.zst.headers
@@ -0,0 +1,2 @@
+Content-type: text/plain
+Content-Encoding: zstd
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst
new file mode 100644
index 00000000000..a73bbdd2245
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst.headers b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst.headers
new file mode 100644
index 00000000000..e397816f545
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.octetstream.zst.headers
@@ -0,0 +1,2 @@
+Content-type: application/octet-stream
+Content-Encoding: zstd
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst
new file mode 100644
index 00000000000..a73bbdd2245
Binary files /dev/null and b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst differ
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst.headers b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst.headers
new file mode 100644
index 00000000000..c5974e126a3
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/resources/foo.text.zst.headers
@@ -0,0 +1,2 @@
+Content-type: text/plain
+Content-Encoding: zstd
diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/zstd-body.https.any.js b/test/fixtures/wpt/fetch/content-encoding/zstd/zstd-body.https.any.js
new file mode 100644
index 00000000000..86923857432
--- /dev/null
+++ b/test/fixtures/wpt/fetch/content-encoding/zstd/zstd-body.https.any.js
@@ -0,0 +1,15 @@
+// META: global=window,worker
+
+const expectedDecompressedSize = 10500;
+[
+ "text",
+ "octetstream"
+].forEach(contentType => {
+ promise_test(async t => {
+ let response = await fetch(`resources/foo.${contentType}.zst`);
+ assert_true(response.ok);
+ let arrayBuffer = await response.arrayBuffer()
+ let u8 = new Uint8Array(arrayBuffer);
+ assert_equals(u8.length, expectedDecompressedSize);
+ }, `fetched zstd data with content type ${contentType} should be decompressed.`);
+});
diff --git a/test/wpt/tests/fetch/content-length/api-and-duplicate-headers.any.js b/test/fixtures/wpt/fetch/content-length/api-and-duplicate-headers.any.js
similarity index 100%
rename from test/wpt/tests/fetch/content-length/api-and-duplicate-headers.any.js
rename to test/fixtures/wpt/fetch/content-length/api-and-duplicate-headers.any.js
diff --git a/test/wpt/tests/fetch/content-length/content-length.html b/test/fixtures/wpt/fetch/content-length/content-length.html
similarity index 100%
rename from test/wpt/tests/fetch/content-length/content-length.html
rename to test/fixtures/wpt/fetch/content-length/content-length.html
diff --git a/test/wpt/tests/fetch/content-length/content-length.html.headers b/test/fixtures/wpt/fetch/content-length/content-length.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/content-length/content-length.html.headers
rename to test/fixtures/wpt/fetch/content-length/content-length.html.headers
diff --git a/test/wpt/tests/fetch/content-length/parsing.window.js b/test/fixtures/wpt/fetch/content-length/parsing.window.js
similarity index 100%
rename from test/wpt/tests/fetch/content-length/parsing.window.js
rename to test/fixtures/wpt/fetch/content-length/parsing.window.js
diff --git a/test/wpt/tests/fetch/content-length/resources/content-length.py b/test/fixtures/wpt/fetch/content-length/resources/content-length.py
similarity index 100%
rename from test/wpt/tests/fetch/content-length/resources/content-length.py
rename to test/fixtures/wpt/fetch/content-length/resources/content-length.py
diff --git a/test/wpt/tests/fetch/content-length/resources/content-lengths.json b/test/fixtures/wpt/fetch/content-length/resources/content-lengths.json
similarity index 100%
rename from test/wpt/tests/fetch/content-length/resources/content-lengths.json
rename to test/fixtures/wpt/fetch/content-length/resources/content-lengths.json
diff --git a/test/wpt/tests/fetch/content-length/resources/identical-duplicates.asis b/test/fixtures/wpt/fetch/content-length/resources/identical-duplicates.asis
similarity index 100%
rename from test/wpt/tests/fetch/content-length/resources/identical-duplicates.asis
rename to test/fixtures/wpt/fetch/content-length/resources/identical-duplicates.asis
diff --git a/test/wpt/tests/fetch/content-length/too-long.window.js b/test/fixtures/wpt/fetch/content-length/too-long.window.js
similarity index 100%
rename from test/wpt/tests/fetch/content-length/too-long.window.js
rename to test/fixtures/wpt/fetch/content-length/too-long.window.js
diff --git a/test/wpt/tests/fetch/content-type/README.md b/test/fixtures/wpt/fetch/content-type/README.md
similarity index 100%
rename from test/wpt/tests/fetch/content-type/README.md
rename to test/fixtures/wpt/fetch/content-type/README.md
diff --git a/test/wpt/tests/fetch/content-type/multipart-malformed.any.js b/test/fixtures/wpt/fetch/content-type/multipart-malformed.any.js
similarity index 100%
rename from test/wpt/tests/fetch/content-type/multipart-malformed.any.js
rename to test/fixtures/wpt/fetch/content-type/multipart-malformed.any.js
diff --git a/test/wpt/tests/fetch/content-type/multipart.window.js b/test/fixtures/wpt/fetch/content-type/multipart.window.js
similarity index 100%
rename from test/wpt/tests/fetch/content-type/multipart.window.js
rename to test/fixtures/wpt/fetch/content-type/multipart.window.js
diff --git a/test/wpt/tests/fetch/content-type/resources/content-type.py b/test/fixtures/wpt/fetch/content-type/resources/content-type.py
similarity index 100%
rename from test/wpt/tests/fetch/content-type/resources/content-type.py
rename to test/fixtures/wpt/fetch/content-type/resources/content-type.py
diff --git a/test/wpt/tests/fetch/content-type/resources/content-types.json b/test/fixtures/wpt/fetch/content-type/resources/content-types.json
similarity index 100%
rename from test/wpt/tests/fetch/content-type/resources/content-types.json
rename to test/fixtures/wpt/fetch/content-type/resources/content-types.json
diff --git a/test/wpt/tests/fetch/content-type/resources/script-content-types.json b/test/fixtures/wpt/fetch/content-type/resources/script-content-types.json
similarity index 100%
rename from test/wpt/tests/fetch/content-type/resources/script-content-types.json
rename to test/fixtures/wpt/fetch/content-type/resources/script-content-types.json
diff --git a/test/wpt/tests/fetch/content-type/response.window.js b/test/fixtures/wpt/fetch/content-type/response.window.js
similarity index 100%
rename from test/wpt/tests/fetch/content-type/response.window.js
rename to test/fixtures/wpt/fetch/content-type/response.window.js
diff --git a/test/wpt/tests/fetch/content-type/script.window.js b/test/fixtures/wpt/fetch/content-type/script.window.js
similarity index 100%
rename from test/wpt/tests/fetch/content-type/script.window.js
rename to test/fixtures/wpt/fetch/content-type/script.window.js
diff --git a/test/wpt/tests/fetch/corb/README.md b/test/fixtures/wpt/fetch/corb/README.md
similarity index 100%
rename from test/wpt/tests/fetch/corb/README.md
rename to test/fixtures/wpt/fetch/corb/README.md
diff --git a/test/wpt/tests/fetch/corb/img-html-correctly-labeled.sub-ref.html b/test/fixtures/wpt/fetch/corb/img-html-correctly-labeled.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-html-correctly-labeled.sub-ref.html
rename to test/fixtures/wpt/fetch/corb/img-html-correctly-labeled.sub-ref.html
diff --git a/test/wpt/tests/fetch/corb/img-html-correctly-labeled.sub.html b/test/fixtures/wpt/fetch/corb/img-html-correctly-labeled.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-html-correctly-labeled.sub.html
rename to test/fixtures/wpt/fetch/corb/img-html-correctly-labeled.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-mime-types-coverage.tentative.sub.html b/test/fixtures/wpt/fetch/corb/img-mime-types-coverage.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-mime-types-coverage.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/img-mime-types-coverage.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html b/test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html
rename to test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html
diff --git a/test/wpt/tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html b/test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-png-mislabeled-as-html.sub-ref.html b/test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-png-mislabeled-as-html.sub-ref.html
rename to test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html.sub-ref.html
diff --git a/test/wpt/tests/fetch/corb/img-png-mislabeled-as-html.sub.html b/test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-png-mislabeled-as-html.sub.html
rename to test/fixtures/wpt/fetch/corb/img-png-mislabeled-as-html.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-doctype-html-mimetype-empty.sub.html b/test/fixtures/wpt/fetch/corb/img-svg-doctype-html-mimetype-empty.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-doctype-html-mimetype-empty.sub.html
rename to test/fixtures/wpt/fetch/corb/img-svg-doctype-html-mimetype-empty.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-doctype-html-mimetype-svg.sub.html b/test/fixtures/wpt/fetch/corb/img-svg-doctype-html-mimetype-svg.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-doctype-html-mimetype-svg.sub.html
rename to test/fixtures/wpt/fetch/corb/img-svg-doctype-html-mimetype-svg.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-invalid.sub-ref.html b/test/fixtures/wpt/fetch/corb/img-svg-invalid.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-invalid.sub-ref.html
rename to test/fixtures/wpt/fetch/corb/img-svg-invalid.sub-ref.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-labeled-as-dash.sub.html b/test/fixtures/wpt/fetch/corb/img-svg-labeled-as-dash.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-labeled-as-dash.sub.html
rename to test/fixtures/wpt/fetch/corb/img-svg-labeled-as-dash.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-labeled-as-svg-xml.sub.html b/test/fixtures/wpt/fetch/corb/img-svg-labeled-as-svg-xml.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-labeled-as-svg-xml.sub.html
rename to test/fixtures/wpt/fetch/corb/img-svg-labeled-as-svg-xml.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg-xml-decl.sub.html b/test/fixtures/wpt/fetch/corb/img-svg-xml-decl.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg-xml-decl.sub.html
rename to test/fixtures/wpt/fetch/corb/img-svg-xml-decl.sub.html
diff --git a/test/wpt/tests/fetch/corb/img-svg.sub-ref.html b/test/fixtures/wpt/fetch/corb/img-svg.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/img-svg.sub-ref.html
rename to test/fixtures/wpt/fetch/corb/img-svg.sub-ref.html
diff --git a/test/wpt/tests/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html b/test/fixtures/wpt/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/preload-image-png-mislabeled-as-html-nosniff.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css b/test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html-nosniff.css
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css
rename to test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html-nosniff.css
diff --git a/test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css.headers b/test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html-nosniff.css.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html-nosniff.css.headers
rename to test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html-nosniff.css.headers
diff --git a/test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html.css b/test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html.css
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html.css
rename to test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html.css
diff --git a/test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html.css.headers b/test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html.css.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/css-mislabeled-as-html.css.headers
rename to test/fixtures/wpt/fetch/corb/resources/css-mislabeled-as-html.css.headers
diff --git a/test/wpt/tests/fetch/corb/resources/css-with-json-parser-breaker.css b/test/fixtures/wpt/fetch/corb/resources/css-with-json-parser-breaker.css
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/css-with-json-parser-breaker.css
rename to test/fixtures/wpt/fetch/corb/resources/css-with-json-parser-breaker.css
diff --git a/test/wpt/tests/fetch/corb/resources/empty-labeled-as-png.png b/test/fixtures/wpt/fetch/corb/resources/empty-labeled-as-png.png
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/empty-labeled-as-png.png
rename to test/fixtures/wpt/fetch/corb/resources/empty-labeled-as-png.png
diff --git a/test/wpt/tests/fetch/corb/resources/empty-labeled-as-png.png.headers b/test/fixtures/wpt/fetch/corb/resources/empty-labeled-as-png.png.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/empty-labeled-as-png.png.headers
rename to test/fixtures/wpt/fetch/corb/resources/empty-labeled-as-png.png.headers
diff --git a/test/wpt/tests/fetch/corb/resources/html-correctly-labeled.html b/test/fixtures/wpt/fetch/corb/resources/html-correctly-labeled.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-correctly-labeled.html
rename to test/fixtures/wpt/fetch/corb/resources/html-correctly-labeled.html
diff --git a/test/wpt/tests/fetch/corb/resources/html-correctly-labeled.html.headers b/test/fixtures/wpt/fetch/corb/resources/html-correctly-labeled.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-correctly-labeled.html.headers
rename to test/fixtures/wpt/fetch/corb/resources/html-correctly-labeled.html.headers
diff --git a/test/wpt/tests/fetch/corb/resources/html-js-polyglot.js b/test/fixtures/wpt/fetch/corb/resources/html-js-polyglot.js
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-js-polyglot.js
rename to test/fixtures/wpt/fetch/corb/resources/html-js-polyglot.js
diff --git a/test/wpt/tests/fetch/corb/resources/html-js-polyglot.js.headers b/test/fixtures/wpt/fetch/corb/resources/html-js-polyglot.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-js-polyglot.js.headers
rename to test/fixtures/wpt/fetch/corb/resources/html-js-polyglot.js.headers
diff --git a/test/wpt/tests/fetch/corb/resources/html-js-polyglot2.js b/test/fixtures/wpt/fetch/corb/resources/html-js-polyglot2.js
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-js-polyglot2.js
rename to test/fixtures/wpt/fetch/corb/resources/html-js-polyglot2.js
diff --git a/test/wpt/tests/fetch/corb/resources/html-js-polyglot2.js.headers b/test/fixtures/wpt/fetch/corb/resources/html-js-polyglot2.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/html-js-polyglot2.js.headers
rename to test/fixtures/wpt/fetch/corb/resources/html-js-polyglot2.js.headers
diff --git a/test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js b/test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html-nosniff.js
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js
rename to test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html-nosniff.js
diff --git a/test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js.headers b/test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html-nosniff.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html-nosniff.js.headers
rename to test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html-nosniff.js.headers
diff --git a/test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html.js b/test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html.js
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html.js
rename to test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html.js
diff --git a/test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html.js.headers b/test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/js-mislabeled-as-html.js.headers
rename to test/fixtures/wpt/fetch/corb/resources/js-mislabeled-as-html.js.headers
diff --git a/test/wpt/tests/fetch/corb/resources/png-correctly-labeled.png b/test/fixtures/wpt/fetch/corb/resources/png-correctly-labeled.png
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-correctly-labeled.png
rename to test/fixtures/wpt/fetch/corb/resources/png-correctly-labeled.png
diff --git a/test/wpt/tests/fetch/corb/resources/png-correctly-labeled.png.headers b/test/fixtures/wpt/fetch/corb/resources/png-correctly-labeled.png.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-correctly-labeled.png.headers
rename to test/fixtures/wpt/fetch/corb/resources/png-correctly-labeled.png.headers
diff --git a/test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png b/test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html-nosniff.png
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png
rename to test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html-nosniff.png
diff --git a/test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png.headers b/test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html-nosniff.png.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html-nosniff.png.headers
rename to test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html-nosniff.png.headers
diff --git a/test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html.png b/test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html.png
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html.png
rename to test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html.png
diff --git a/test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html.png.headers b/test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html.png.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/png-mislabeled-as-html.png.headers
rename to test/fixtures/wpt/fetch/corb/resources/png-mislabeled-as-html.png.headers
diff --git a/test/wpt/tests/fetch/corb/resources/response_block_probe.js b/test/fixtures/wpt/fetch/corb/resources/response_block_probe.js
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/response_block_probe.js
rename to test/fixtures/wpt/fetch/corb/resources/response_block_probe.js
diff --git a/test/wpt/tests/fetch/corb/resources/response_block_probe.js.headers b/test/fixtures/wpt/fetch/corb/resources/response_block_probe.js.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/response_block_probe.js.headers
rename to test/fixtures/wpt/fetch/corb/resources/response_block_probe.js.headers
diff --git a/test/wpt/tests/fetch/corb/resources/sniffable-resource.py b/test/fixtures/wpt/fetch/corb/resources/sniffable-resource.py
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/sniffable-resource.py
rename to test/fixtures/wpt/fetch/corb/resources/sniffable-resource.py
diff --git a/test/wpt/tests/fetch/corb/resources/subframe-that-posts-html-containing-blob-url-to-parent.html b/test/fixtures/wpt/fetch/corb/resources/subframe-that-posts-html-containing-blob-url-to-parent.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/subframe-that-posts-html-containing-blob-url-to-parent.html
rename to test/fixtures/wpt/fetch/corb/resources/subframe-that-posts-html-containing-blob-url-to-parent.html
diff --git a/test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg b/test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg.headers b/test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg.headers
rename to test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-empty.svg.headers
diff --git a/test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg b/test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg.headers b/test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg.headers
rename to test/fixtures/wpt/fetch/corb/resources/svg-doctype-html-mimetype-svg.svg.headers
diff --git a/test/wpt/tests/fetch/corb/resources/svg-labeled-as-dash.svg b/test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-dash.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-labeled-as-dash.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-dash.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg-labeled-as-dash.svg.headers b/test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-dash.svg.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-labeled-as-dash.svg.headers
rename to test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-dash.svg.headers
diff --git a/test/wpt/tests/fetch/corb/resources/svg-labeled-as-svg-xml.svg b/test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-svg-xml.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-labeled-as-svg-xml.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-svg-xml.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg-labeled-as-svg-xml.svg.headers b/test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-svg-xml.svg.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-labeled-as-svg-xml.svg.headers
rename to test/fixtures/wpt/fetch/corb/resources/svg-labeled-as-svg-xml.svg.headers
diff --git a/test/wpt/tests/fetch/corb/resources/svg-xml-decl.svg b/test/fixtures/wpt/fetch/corb/resources/svg-xml-decl.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg-xml-decl.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg-xml-decl.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg.svg b/test/fixtures/wpt/fetch/corb/resources/svg.svg
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg.svg
rename to test/fixtures/wpt/fetch/corb/resources/svg.svg
diff --git a/test/wpt/tests/fetch/corb/resources/svg.svg.headers b/test/fixtures/wpt/fetch/corb/resources/svg.svg.headers
similarity index 100%
rename from test/wpt/tests/fetch/corb/resources/svg.svg.headers
rename to test/fixtures/wpt/fetch/corb/resources/svg.svg.headers
diff --git a/test/wpt/tests/fetch/corb/response_block.tentative.https.html b/test/fixtures/wpt/fetch/corb/response_block.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/response_block.tentative.https.html
rename to test/fixtures/wpt/fetch/corb/response_block.tentative.https.html
diff --git a/test/wpt/tests/fetch/corb/script-html-correctly-labeled.tentative.sub.html b/test/fixtures/wpt/fetch/corb/script-html-correctly-labeled.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-html-correctly-labeled.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/script-html-correctly-labeled.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-html-js-polyglot.sub.html b/test/fixtures/wpt/fetch/corb/script-html-js-polyglot.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-html-js-polyglot.sub.html
rename to test/fixtures/wpt/fetch/corb/script-html-js-polyglot.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-html-via-cross-origin-blob-url.sub.html b/test/fixtures/wpt/fetch/corb/script-html-via-cross-origin-blob-url.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-html-via-cross-origin-blob-url.sub.html
rename to test/fixtures/wpt/fetch/corb/script-html-via-cross-origin-blob-url.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-js-mislabeled-as-html-nosniff.sub.html b/test/fixtures/wpt/fetch/corb/script-js-mislabeled-as-html-nosniff.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-js-mislabeled-as-html-nosniff.sub.html
rename to test/fixtures/wpt/fetch/corb/script-js-mislabeled-as-html-nosniff.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-js-mislabeled-as-html.sub.html b/test/fixtures/wpt/fetch/corb/script-js-mislabeled-as-html.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-js-mislabeled-as-html.sub.html
rename to test/fixtures/wpt/fetch/corb/script-js-mislabeled-as-html.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html b/test/fixtures/wpt/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html b/test/fixtures/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html
rename to test/fixtures/wpt/fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html
diff --git a/test/wpt/tests/fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html b/test/fixtures/wpt/fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html
rename to test/fixtures/wpt/fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html
diff --git a/test/wpt/tests/fetch/corb/style-css-mislabeled-as-html.sub.html b/test/fixtures/wpt/fetch/corb/style-css-mislabeled-as-html.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/style-css-mislabeled-as-html.sub.html
rename to test/fixtures/wpt/fetch/corb/style-css-mislabeled-as-html.sub.html
diff --git a/test/wpt/tests/fetch/corb/style-css-with-json-parser-breaker.sub.html b/test/fixtures/wpt/fetch/corb/style-css-with-json-parser-breaker.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/style-css-with-json-parser-breaker.sub.html
rename to test/fixtures/wpt/fetch/corb/style-css-with-json-parser-breaker.sub.html
diff --git a/test/wpt/tests/fetch/corb/style-html-correctly-labeled.sub.html b/test/fixtures/wpt/fetch/corb/style-html-correctly-labeled.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/corb/style-html-correctly-labeled.sub.html
rename to test/fixtures/wpt/fetch/corb/style-html-correctly-labeled.sub.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html b/test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch-in-iframe.html
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch-in-iframe.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/fetch.any.js b/test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch.any.js
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/fetch.any.js
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch.any.js
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/fetch.https.any.js b/test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch.https.any.js
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/fetch.https.any.js
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/fetch.https.any.js
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/iframe-loads.html b/test/fixtures/wpt/fetch/cross-origin-resource-policy/iframe-loads.html
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/iframe-loads.html
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/iframe-loads.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/image-loads.html b/test/fixtures/wpt/fetch/cross-origin-resource-policy/image-loads.html
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/image-loads.html
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/image-loads.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/green.png b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/green.png
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/green.png
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/green.png
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/hello.py b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/hello.py
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/hello.py
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/hello.py
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/iframe.py b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/iframe.py
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/iframe.py
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/iframe.py
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/iframeFetch.html
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/iframeFetch.html
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/iframeFetch.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/image.py b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/image.py
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/image.py
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/image.py
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/redirect.py
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/redirect.py
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/script.py b/test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/script.py
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/resources/script.py
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/resources/script.py
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js b/test/fixtures/wpt/fetch/cross-origin-resource-policy/scheme-restriction.any.js
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.any.js
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/scheme-restriction.any.js
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js b/test/fixtures/wpt/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/script-loads.html b/test/fixtures/wpt/fetch/cross-origin-resource-policy/script-loads.html
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/script-loads.html
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/script-loads.html
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/syntax.any.js b/test/fixtures/wpt/fetch/cross-origin-resource-policy/syntax.any.js
similarity index 100%
rename from test/wpt/tests/fetch/cross-origin-resource-policy/syntax.any.js
rename to test/fixtures/wpt/fetch/cross-origin-resource-policy/syntax.any.js
diff --git a/test/wpt/tests/fetch/data-urls/README.md b/test/fixtures/wpt/fetch/data-urls/README.md
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/README.md
rename to test/fixtures/wpt/fetch/data-urls/README.md
diff --git a/test/wpt/tests/fetch/data-urls/base64.any.js b/test/fixtures/wpt/fetch/data-urls/base64.any.js
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/base64.any.js
rename to test/fixtures/wpt/fetch/data-urls/base64.any.js
diff --git a/test/wpt/tests/fetch/data-urls/navigate.window.js b/test/fixtures/wpt/fetch/data-urls/navigate.window.js
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/navigate.window.js
rename to test/fixtures/wpt/fetch/data-urls/navigate.window.js
diff --git a/test/wpt/tests/fetch/data-urls/processing.any.js b/test/fixtures/wpt/fetch/data-urls/processing.any.js
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/processing.any.js
rename to test/fixtures/wpt/fetch/data-urls/processing.any.js
diff --git a/test/wpt/tests/fetch/data-urls/resources/base64.json b/test/fixtures/wpt/fetch/data-urls/resources/base64.json
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/resources/base64.json
rename to test/fixtures/wpt/fetch/data-urls/resources/base64.json
diff --git a/test/wpt/tests/fetch/data-urls/resources/data-urls.json b/test/fixtures/wpt/fetch/data-urls/resources/data-urls.json
similarity index 100%
rename from test/wpt/tests/fetch/data-urls/resources/data-urls.json
rename to test/fixtures/wpt/fetch/data-urls/resources/data-urls.json
diff --git a/test/wpt/tests/fetch/fetch-later/META.yml b/test/fixtures/wpt/fetch/fetch-later/META.yml
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/META.yml
rename to test/fixtures/wpt/fetch/fetch-later/META.yml
diff --git a/test/wpt/tests/fetch/fetch-later/README.md b/test/fixtures/wpt/fetch/fetch-later/README.md
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/README.md
rename to test/fixtures/wpt/fetch/fetch-later/README.md
diff --git a/test/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/activate-after.tentative.https.window.js
similarity index 92%
rename from test/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/activate-after.tentative.https.window.js
index 08750dd3fe4..e62da0508a0 100644
--- a/test/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/activate-after.tentative.https.window.js
@@ -1,11 +1,9 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/basic.tentative.https.window.js
similarity index 94%
rename from test/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/basic.tentative.https.window.js
index bf92716681e..37f72ab89e5 100644
--- a/test/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/basic.tentative.https.window.js
@@ -1,6 +1,3 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
-
'use strict';
test(() => {
diff --git a/test/wpt/tests/fetch/fetch-later/basic.tentative.https.worker.js b/test/fixtures/wpt/fetch/fetch-later/basic.tentative.https.worker.js
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/basic.tentative.https.worker.js
rename to test/fixtures/wpt/fetch/fetch-later/basic.tentative.https.worker.js
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-no-referrer-when-downgrade.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-no-referrer-when-downgrade.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-no-referrer-when-downgrade.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-no-referrer-when-downgrade.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-no-referrer.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-no-referrer.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-no-referrer.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-no-referrer.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-origin-when-cross-origin.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-origin-when-cross-origin.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-origin-when-cross-origin.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-origin-when-cross-origin.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-origin.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-origin.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-origin.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-origin.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-same-origin.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-same-origin.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-same-origin.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-same-origin.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-strict-origin-when-cross-origin.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-strict-origin-when-cross-origin.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-strict-origin-when-cross-origin.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-strict-origin-when-cross-origin.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-strict-origin.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-strict-origin.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-strict-origin.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-strict-origin.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/headers/header-referrer-unsafe-url.tentative.https.html b/test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-unsafe-url.tentative.https.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/headers/header-referrer-unsafe-url.tentative.https.html
rename to test/fixtures/wpt/fetch/fetch-later/headers/header-referrer-unsafe-url.tentative.https.html
diff --git a/test/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/iframe.tentative.https.window.js
similarity index 92%
rename from test/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/iframe.tentative.https.window.js
index 62505bc81d9..305272af419 100644
--- a/test/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/iframe.tentative.https.window.js
@@ -1,8 +1,6 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/new-window.tentative.https.window.js
similarity index 94%
rename from test/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/new-window.tentative.https.window.js
index 37b38d7f1dc..27922f46266 100644
--- a/test/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/new-window.tentative.https.window.js
@@ -1,8 +1,6 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/non-secure.window.js b/test/fixtures/wpt/fetch/fetch-later/non-secure.window.js
similarity index 60%
rename from test/wpt/tests/fetch/fetch-later/non-secure.window.js
rename to test/fixtures/wpt/fetch/fetch-later/non-secure.window.js
index 2f2c3ea8d34..c13932e353c 100644
--- a/test/wpt/tests/fetch/fetch-later/non-secure.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/non-secure.window.js
@@ -1,6 +1,3 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
-
'use strict';
test(() => {
diff --git a/test/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js
similarity index 83%
rename from test/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js
index 5aa759c2346..32a3e106a0c 100644
--- a/test/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js
@@ -1,9 +1,7 @@
// META: title=FetchLater: allowed by CSP
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
const {
diff --git a/test/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js
similarity index 86%
rename from test/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js
index 88490950d3a..ca9d881e8cd 100644
--- a/test/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js
@@ -1,9 +1,7 @@
// META: title=FetchLater: blocked by CSP
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
const {
diff --git a/test/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js
similarity index 87%
rename from test/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js
index db6b4234b97..584f476b456 100644
--- a/test/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js
@@ -1,9 +1,7 @@
// META: title=FetchLater: redirect blocked by CSP
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
// META: timeout=long
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/quota.tentative.https.window.js
similarity index 96%
rename from test/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/quota.tentative.https.window.js
index 4fc5979374c..9d0ae4287df 100644
--- a/test/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/quota.tentative.https.window.js
@@ -1,8 +1,6 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/fixtures/wpt/fetch/fetch-later/resources/fetch-later-helper.js b/test/fixtures/wpt/fetch/fetch-later/resources/fetch-later-helper.js
new file mode 100644
index 00000000000..566b3e0a1a4
--- /dev/null
+++ b/test/fixtures/wpt/fetch/fetch-later/resources/fetch-later-helper.js
@@ -0,0 +1,206 @@
+'use strict';
+
+const ROOT_NAME = 'fetch/fetch-later';
+
+function parallelPromiseTest(func, description) {
+ async_test((t) => {
+ Promise.resolve(func(t)).then(() => t.done()).catch(t.step_func((e) => {
+ throw e;
+ }));
+ }, description);
+}
+
+/** @enum {string} */
+const BeaconDataType = {
+ String: 'String',
+ ArrayBuffer: 'ArrayBuffer',
+ FormData: 'FormData',
+ URLSearchParams: 'URLSearchParams',
+ Blob: 'Blob',
+ File: 'File',
+};
+
+/** @enum {string} */
+const BeaconDataTypeToSkipCharset = {
+ String: '',
+ ArrayBuffer: '',
+ FormData: '\n\r', // CRLF characters will be normalized by FormData
+ URLSearchParams: ';,/?:@&=+$', // reserved URI characters
+ Blob: '',
+ File: '',
+};
+
+const BEACON_PAYLOAD_KEY = 'payload';
+
+// Creates beacon data of the given `dataType` from `data`.
+// @param {string} data - A string representation of the beacon data. Note that
+// it cannot contain UTF-16 surrogates for all `BeaconDataType` except BLOB.
+// @param {BeaconDataType} dataType - must be one of `BeaconDataType`.
+// @param {string} contentType - Request Content-Type.
+function makeBeaconData(data, dataType, contentType) {
+ switch (dataType) {
+ case BeaconDataType.String:
+ return data;
+ case BeaconDataType.ArrayBuffer:
+ return new TextEncoder().encode(data).buffer;
+ case BeaconDataType.FormData:
+ const formData = new FormData();
+ if (data.length > 0) {
+ formData.append(BEACON_PAYLOAD_KEY, data);
+ }
+ return formData;
+ case BeaconDataType.URLSearchParams:
+ if (data.length > 0) {
+ return new URLSearchParams(`${BEACON_PAYLOAD_KEY}=${data}`);
+ }
+ return new URLSearchParams();
+ case BeaconDataType.Blob: {
+ const options = {type: contentType || undefined};
+ return new Blob([data], options);
+ }
+ case BeaconDataType.File: {
+ const options = {type: contentType || 'text/plain'};
+ return new File([data], 'file.txt', options);
+ }
+ default:
+ throw Error(`Unsupported beacon dataType: ${dataType}`);
+ }
+}
+
+// Create a string of `end`-`begin` characters, with characters starting from
+// UTF-16 code unit `begin` to `end`-1.
+function generateSequentialData(begin, end, skip) {
+ const codeUnits = Array(end - begin).fill().map((el, i) => i + begin);
+ if (skip) {
+ return String.fromCharCode(
+ ...codeUnits.filter(c => !skip.includes(String.fromCharCode(c))));
+ }
+ return String.fromCharCode(...codeUnits);
+}
+
+function generatePayload(size) {
+ if (size == 0) {
+ return '';
+ }
+ const prefix = String(size) + ':';
+ if (size < prefix.length) {
+ return Array(size).fill('*').join('');
+ }
+ if (size == prefix.length) {
+ return prefix;
+ }
+
+ return prefix + Array(size - prefix.length).fill('*').join('');
+}
+
+function generateSetBeaconURL(uuid, options) {
+ const host = (options && options.host) || '';
+ let url = `${host}/${ROOT_NAME}/resources/set_beacon.py?uuid=${uuid}`;
+ if (options) {
+ if (options.expectOrigin !== undefined) {
+ url = `${url}&expectOrigin=${options.expectOrigin}`;
+ }
+ if (options.expectPreflight !== undefined) {
+ url = `${url}&expectPreflight=${options.expectPreflight}`;
+ }
+ if (options.expectCredentials !== undefined) {
+ url = `${url}&expectCredentials=${options.expectCredentials}`;
+ }
+
+ if (options.useRedirectHandler) {
+ const redirect = `${host}/common/redirect.py` +
+ `?location=${encodeURIComponent(url)}`;
+ url = redirect;
+ }
+ }
+ return url;
+}
+
+async function poll(asyncFunc, expected) {
+ const maxRetries = 30;
+ const waitInterval = 100; // milliseconds.
+ const delay = ms => new Promise(res => setTimeout(res, ms));
+
+ let result = {data: []};
+ for (let i = 0; i < maxRetries; i++) {
+ result = await asyncFunc();
+ if (!expected(result)) {
+ await delay(waitInterval);
+ continue;
+ }
+ return result;
+ }
+ return result;
+}
+
+// Waits until the `options.count` number of beacon data available from the
+// server. Defaults to 1.
+// If `options.data` is set, it will be used to compare with the data from the
+// response.
+async function expectBeacon(uuid, options) {
+ const expectedCount =
+ (options && options.count !== undefined) ? options.count : 1;
+
+ const res = await poll(
+ async () => {
+ const res = await fetch(
+ `/${ROOT_NAME}/resources/get_beacon.py?uuid=${uuid}`,
+ {cache: 'no-store'});
+ return await res.json();
+ },
+ (res) => {
+ if (expectedCount == 0) {
+ // If expecting no beacon, we should try to wait as long as possible.
+ // So always returning false here until `poll()` decides to terminate
+ // itself.
+ return false;
+ }
+ return res.data.length == expectedCount;
+ });
+ if (!options || !options.data) {
+ assert_equals(
+ res.data.length, expectedCount,
+ 'Number of sent beacons does not match expected count:');
+ return;
+ }
+
+ if (expectedCount == 0) {
+ assert_equals(
+ res.data.length, 0,
+ 'Number of sent beacons does not match expected count:');
+ return;
+ }
+
+ const decoder = options && options.percentDecoded ? (s) => {
+ // application/x-www-form-urlencoded serializer encodes space as '+'
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
+ s = s.replace(/\+/g, '%20');
+ return decodeURIComponent(s);
+ } : (s) => s;
+
+ assert_equals(
+ res.data.length, options.data.length,
+ `The size of beacon data ${
+ res.data.length} from server does not match expected value ${
+ options.data.length}.`);
+ for (let i = 0; i < options.data.length; i++) {
+ assert_equals(
+ decoder(res.data[i]), options.data[i],
+ 'The beacon data does not match expected value.');
+ }
+}
+
+function generateHTML(script) {
+ return ``;
+}
+
+// Loads `script` into an iframe and appends it to the current document.
+// Returns the loaded iframe element.
+async function loadScriptAsIframe(script) {
+ const iframe = document.createElement('iframe');
+ iframe.srcdoc = generateHTML(script);
+ const iframeLoaded = new Promise(resolve => iframe.onload = resolve);
+ document.body.appendChild(iframe);
+ await iframeLoaded;
+ return iframe;
+}
diff --git a/test/wpt/tests/fetch/fetch-later/resources/fetch-later.html b/test/fixtures/wpt/fetch/fetch-later/resources/fetch-later.html
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/resources/fetch-later.html
rename to test/fixtures/wpt/fetch/fetch-later/resources/fetch-later.html
diff --git a/test/fixtures/wpt/fetch/fetch-later/resources/get_beacon.py b/test/fixtures/wpt/fetch/fetch-later/resources/get_beacon.py
new file mode 100644
index 00000000000..32cb9a9ba30
--- /dev/null
+++ b/test/fixtures/wpt/fetch/fetch-later/resources/get_beacon.py
@@ -0,0 +1,30 @@
+"""An HTTP request handler for WPT that handles /get_beacon.py requests."""
+
+import json
+
+_BEACON_ID_KEY = b"uuid"
+_BEACON_DATA_PATH = "beacon_data"
+
+
+def main(request, response):
+ """Retrieves the beacon data keyed by the given uuid from server storage.
+
+ The response content is a JSON string in one of the following formats:
+ - "{'data': ['abc', null, '123',...]}"
+ - "{'data': []}" indicates that no data has been set for this uuid.
+ """
+ if _BEACON_ID_KEY not in request.GET:
+ response.status = 400
+ return "Must provide a UUID to store beacon data"
+ uuid = request.GET.first(_BEACON_ID_KEY)
+
+ with request.server.stash.lock:
+ body = {'data': []}
+ data = request.server.stash.take(key=uuid, path=_BEACON_DATA_PATH)
+ if data:
+ body['data'] = data
+ # The stash is read-once/write-once, so it has to be put back after
+ # reading if `data` is not None.
+ request.server.stash.put(
+ key=uuid, value=data, path=_BEACON_DATA_PATH)
+ return [(b'Content-Type', b'text/plain')], json.dumps(body)
diff --git a/test/wpt/tests/fetch/fetch-later/resources/header-referrer-helper.js b/test/fixtures/wpt/fetch/fetch-later/resources/header-referrer-helper.js
similarity index 100%
rename from test/wpt/tests/fetch/fetch-later/resources/header-referrer-helper.js
rename to test/fixtures/wpt/fetch/fetch-later/resources/header-referrer-helper.js
diff --git a/test/fixtures/wpt/fetch/fetch-later/resources/set_beacon.py b/test/fixtures/wpt/fetch/fetch-later/resources/set_beacon.py
new file mode 100644
index 00000000000..1c71f23e578
--- /dev/null
+++ b/test/fixtures/wpt/fetch/fetch-later/resources/set_beacon.py
@@ -0,0 +1,83 @@
+"""An HTTP request handler for WPT that handles /set_beacon.py requests."""
+
+_BEACON_ID_KEY = b"uuid"
+_BEACON_DATA_PATH = "beacon_data"
+_BEACON_FORM_PAYLOAD_KEY = b"payload"
+_BEACON_BODY_PAYLOAD_KEY = "payload="
+_BEACON_EXPECT_ORIGIN_KEY = b"expectOrigin"
+_BEACON_EXPECT_PREFLIGHT_KEY = b"expectPreflight"
+_BEACON_EXPECT_CREDS_KEY = b"expectCredentials"
+
+
+def main(request, response):
+ """Stores the given beacon's data keyed by uuid in the server.
+
+ For GET request, this handler assumes no data.
+ For POST request, this handler extracts data from request body:
+ - Content-Type=multipart/form-data: data keyed by 'payload'.
+ - the entire request body.
+
+ Multiple data can be added for the same uuid.
+
+ The data is stored as UTF-8 format.
+ """
+ if _BEACON_ID_KEY not in request.GET:
+ response.status = 400
+ return "Must provide a UUID to store beacon data"
+ uuid = request.GET.first(_BEACON_ID_KEY)
+
+ expected_origin = request.GET.get(_BEACON_EXPECT_ORIGIN_KEY)
+ if b"origin" in request.headers:
+ origin = request.headers.get(b"origin")
+ if expected_origin:
+ assert origin == expected_origin, f"expected {expected_origin}, got {origin}"
+ response.headers.set(b"Access-Control-Allow-Origin", origin)
+ else:
+ assert expected_origin is None, f"expected None, got {expected_origin}"
+
+ # Handles preflight request first.
+ if request.method == u"OPTIONS":
+ assert request.GET.get(
+ _BEACON_EXPECT_PREFLIGHT_KEY) == b"true", "Preflight not expected."
+
+ # preflight must not have cookies.
+ assert b"Cookie" not in request.headers
+
+ requested_headers = request.headers.get(
+ b"Access-Control-Request-Headers")
+ assert b"content-type" in requested_headers, f"expected content-type, got {requested_headers}"
+ response.headers.set(b"Access-Control-Allow-Headers", b"content-type")
+
+ requested_method = request.headers.get(b"Access-Control-Request-Method")
+ assert requested_method == b"POST", f"expected POST, got {requested_method}"
+ response.headers.set(b"Access-Control-Allow-Methods", b"POST")
+
+ return response
+
+ expect_creds = request.GET.get(_BEACON_EXPECT_CREDS_KEY) == b"true"
+ if expect_creds:
+ assert b"Cookie" in request.headers
+ else:
+ assert b"Cookie" not in request.headers
+
+ data = None
+ if request.method == u"POST":
+ if b"multipart/form-data" in request.headers.get(b"Content-Type", b""):
+ if _BEACON_FORM_PAYLOAD_KEY in request.POST:
+ data = request.POST.first(_BEACON_FORM_PAYLOAD_KEY).decode(
+ 'utf-8')
+ elif request.body:
+ data = request.body.decode('utf-8')
+ if data.startswith(_BEACON_BODY_PAYLOAD_KEY):
+ data = data.split(_BEACON_BODY_PAYLOAD_KEY)[1]
+
+ with request.server.stash.lock:
+ saved_data = request.server.stash.take(key=uuid, path=_BEACON_DATA_PATH)
+ if not saved_data:
+ saved_data = [data]
+ else:
+ saved_data.append(data)
+ request.server.stash.put(
+ key=uuid, value=saved_data, path=_BEACON_DATA_PATH)
+
+ response.status = 200
diff --git a/test/fixtures/wpt/fetch/fetch-later/send-on-deactivate-with-background-sync.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/send-on-deactivate-with-background-sync.tentative.https.window.js
new file mode 100644
index 00000000000..881bdd23f93
--- /dev/null
+++ b/test/fixtures/wpt/fetch/fetch-later/send-on-deactivate-with-background-sync.tentative.https.window.js
@@ -0,0 +1,128 @@
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/get-host-info.sub.js
+// META: script=/common/utils.js
+// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
+// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
+// META: timeout=long
+
+'use strict';
+
+async function setBackgroundSyncEnabled(enabled) {
+ const status = enabled ? 'granted' : 'denied';
+ await test_driver.set_permission({name: 'background-sync'}, status);
+}
+
+parallelPromiseTest(async t => {
+ // Enables BackgroundSync permission such that deferred request won't be
+ // immediately sent out on entering BFCache.
+ await setBackgroundSyncEnabled(true);
+
+ const uuid = token();
+ const url = generateSetBeaconURL(uuid);
+ // Sets no option to test the default behavior when a document enters BFCache.
+ const helper = new RemoteContextHelper();
+ // Opens a window with noopener so that BFCache will work.
+ const rc1 = await helper.addWindow(
+ /*config=*/ null, /*options=*/ {features: 'noopener'});
+
+ // Creates a fetchLater request with default config in remote, which should
+ // only be sent on page discarded (not on entering BFCache).
+ await rc1.executeScript(url => {
+ fetchLater(url);
+ // Add a pageshow listener to stash the BFCache event.
+ window.addEventListener('pageshow', e => {
+ window.pageshowEvent = e;
+ });
+ }, [url]);
+ // Navigates away to let page enter BFCache.
+ const rc2 = await rc1.navigateToNew();
+ // Navigates back.
+ await rc2.historyBack();
+ // Verifies the page was BFCached.
+ assert_true(await rc1.executeScript(() => {
+ return window.pageshowEvent.persisted;
+ }));
+
+ // By default, pending requests are all flushed on BFCache no matter
+ // BackgroundSync is on or not. See http://b/310541607#comment28.
+ await expectBeacon(uuid, {count: 1});
+}, `fetchLater() does send on page entering BFCache even if BackgroundSync is on.`);
+
+parallelPromiseTest(async t => {
+ // Enables BackgroundSync permission such that deferred request won't be
+ // immediately sent out on entering BFCache.
+ await setBackgroundSyncEnabled(true);
+
+ const uuid = token();
+ const url = generateSetBeaconURL(uuid);
+ // activateAfter = 0s means the request should be sent out right on
+ // document becoming deactivated (BFCached or frozen) after navigating away.
+ const options = {activateAfter: 0};
+ const helper = new RemoteContextHelper();
+ // Opens a window with noopener so that BFCache will work.
+ const rc1 = await helper.addWindow(
+ /*config=*/ null, /*options=*/ {features: 'noopener'});
+
+ // Creates a fetchLater request in remote which should only be sent on
+ // navigating away.
+ await rc1.executeScript((url, options) => {
+ fetchLater(url, options);
+
+ // Add a pageshow listener to stash the BFCache event.
+ window.addEventListener('pageshow', e => {
+ window.pageshowEvent = e;
+ });
+ }, [url, options]);
+ // Navigates away to trigger request sending.
+ const rc2 = await rc1.navigateToNew();
+ // Navigates back.
+ await rc2.historyBack();
+ // Verifies the page was BFCached.
+ assert_true(await rc1.executeScript(() => {
+ return window.pageshowEvent.persisted;
+ }));
+
+ await expectBeacon(uuid, {count: 1});
+}, `fetchLater() with activateAfter=0 sends on page entering BFCache if BackgroundSync is on.`);
+
+parallelPromiseTest(async t => {
+ // Enables BackgroundSync permission such that deferred request won't be
+ // immediately sent out on entering BFCache.
+ await setBackgroundSyncEnabled(true);
+
+ const uuid = token();
+ const url = generateSetBeaconURL(uuid);
+ // activateAfter = 1m means the request should NOT be sent out on
+ // document becoming deactivated (BFCached or frozen) until after 1 minute.
+ const options = {activateAfter: 60000};
+ const helper = new RemoteContextHelper();
+ // Opens a window with noopener so that BFCache will work.
+ const rc1 = await helper.addWindow(
+ /*config=*/ null, /*options=*/ {features: 'noopener'});
+
+ // Creates a fetchLater request in remote which should only be sent on
+ // navigating away.
+ await rc1.executeScript((url, options) => {
+ fetchLater(url, options);
+
+ // Adds a pageshow listener to stash the BFCache event.
+ window.addEventListener('pageshow', e => {
+ window.pageshowEvent = e;
+ });
+ }, [url, options]);
+ // Navigates away to trigger request sending.
+ const rc2 = await rc1.navigateToNew();
+ // Navigates back.
+ await rc2.historyBack();
+ // Verifies the page was BFCached.
+ assert_true(await rc1.executeScript(() => {
+ return window.pageshowEvent.persisted;
+ }));
+
+ // By default, pending requests are all flushed on BFCache no matter
+ // BackgroundSync is on or not. See http://b/310541607#comment28.
+ await expectBeacon(uuid, {count: 1});
+}, `fetchLater() with activateAfter=1m does send on page entering BFCache even if BackgroundSync is on.`);
diff --git a/test/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/send-on-deactivate.tentative.https.window.js
similarity index 97%
rename from test/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/send-on-deactivate.tentative.https.window.js
index 94877e8321a..3bcf07483ad 100644
--- a/test/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/send-on-deactivate.tentative.https.window.js
@@ -1,11 +1,9 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js
similarity index 82%
rename from test/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js
index c49e0bde87b..6ddafd78131 100644
--- a/test/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js
@@ -1,7 +1,5 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js
similarity index 87%
rename from test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js
index 03078b2b516..0bbe94c39f0 100644
--- a/test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js
@@ -1,7 +1,5 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
// META: timeout=long
'use strict';
diff --git a/test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js
similarity index 85%
rename from test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js
rename to test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js
index 25ce98d446e..05bb2dc1149 100644
--- a/test/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js
@@ -1,7 +1,5 @@
-// META: script=/resources/testharness.js
-// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
-// META: script=/pending-beacon/resources/pending_beacon-helper.js
+// META: script=/fetch/fetch-later/resources/fetch-later-helper.js
// META: timeout=long
'use strict';
diff --git a/test/wpt/tests/fetch/h1-parsing/README.md b/test/fixtures/wpt/fetch/h1-parsing/README.md
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/README.md
rename to test/fixtures/wpt/fetch/h1-parsing/README.md
diff --git a/test/wpt/tests/fetch/h1-parsing/lone-cr.window.js b/test/fixtures/wpt/fetch/h1-parsing/lone-cr.window.js
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/lone-cr.window.js
rename to test/fixtures/wpt/fetch/h1-parsing/lone-cr.window.js
diff --git a/test/wpt/tests/fetch/h1-parsing/resources-with-0x00-in-header.window.js b/test/fixtures/wpt/fetch/h1-parsing/resources-with-0x00-in-header.window.js
similarity index 80%
rename from test/wpt/tests/fetch/h1-parsing/resources-with-0x00-in-header.window.js
rename to test/fixtures/wpt/fetch/h1-parsing/resources-with-0x00-in-header.window.js
index 37a61c12b56..b617911105a 100644
--- a/test/wpt/tests/fetch/h1-parsing/resources-with-0x00-in-header.window.js
+++ b/test/fixtures/wpt/fetch/h1-parsing/resources-with-0x00-in-header.window.js
@@ -1,3 +1,5 @@
+// META: script=/common/get-host-info.sub.js
+
async_test(t => {
const script = document.createElement("script");
t.add_cleanup(() => script.remove());
@@ -29,3 +31,7 @@ async_test(t => {
img.onload = t.unreached_func();
document.body.append(img);
}, "Expect network error for image with 0x00 in a header");
+
+promise_test(async t => {
+ return promise_rejects_js(t, TypeError, fetch(get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis", {mode:"no-cors"}));
+}, "Expect network error for fetch with 0x00 in a header");
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/README.md b/test/fixtures/wpt/fetch/h1-parsing/resources/README.md
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/README.md
rename to test/fixtures/wpt/fetch/h1-parsing/resources/README.md
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis b/test/fixtures/wpt/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
rename to test/fixtures/wpt/fetch/h1-parsing/resources/blue-with-0x00-in-a-header.asis
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py b/test/fixtures/wpt/fetch/h1-parsing/resources/document-with-0x00-in-header.py
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/document-with-0x00-in-header.py
rename to test/fixtures/wpt/fetch/h1-parsing/resources/document-with-0x00-in-header.py
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/message.py b/test/fixtures/wpt/fetch/h1-parsing/resources/message.py
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/message.py
rename to test/fixtures/wpt/fetch/h1-parsing/resources/message.py
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py b/test/fixtures/wpt/fetch/h1-parsing/resources/script-with-0x00-in-header.py
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/script-with-0x00-in-header.py
rename to test/fixtures/wpt/fetch/h1-parsing/resources/script-with-0x00-in-header.py
diff --git a/test/wpt/tests/fetch/h1-parsing/resources/status-code.py b/test/fixtures/wpt/fetch/h1-parsing/resources/status-code.py
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/resources/status-code.py
rename to test/fixtures/wpt/fetch/h1-parsing/resources/status-code.py
diff --git a/test/wpt/tests/fetch/h1-parsing/status-code.window.js b/test/fixtures/wpt/fetch/h1-parsing/status-code.window.js
similarity index 100%
rename from test/wpt/tests/fetch/h1-parsing/status-code.window.js
rename to test/fixtures/wpt/fetch/h1-parsing/status-code.window.js
diff --git a/test/wpt/tests/fetch/http-cache/304-update.any.js b/test/fixtures/wpt/fetch/http-cache/304-update.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/304-update.any.js
rename to test/fixtures/wpt/fetch/http-cache/304-update.any.js
diff --git a/test/wpt/tests/fetch/http-cache/README.md b/test/fixtures/wpt/fetch/http-cache/README.md
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/README.md
rename to test/fixtures/wpt/fetch/http-cache/README.md
diff --git a/test/wpt/tests/fetch/http-cache/basic-auth-cache-test-ref.html b/test/fixtures/wpt/fetch/http-cache/basic-auth-cache-test-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/basic-auth-cache-test-ref.html
rename to test/fixtures/wpt/fetch/http-cache/basic-auth-cache-test-ref.html
diff --git a/test/wpt/tests/fetch/http-cache/basic-auth-cache-test.html b/test/fixtures/wpt/fetch/http-cache/basic-auth-cache-test.html
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/basic-auth-cache-test.html
rename to test/fixtures/wpt/fetch/http-cache/basic-auth-cache-test.html
diff --git a/test/wpt/tests/fetch/http-cache/cache-mode.any.js b/test/fixtures/wpt/fetch/http-cache/cache-mode.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/cache-mode.any.js
rename to test/fixtures/wpt/fetch/http-cache/cache-mode.any.js
diff --git a/test/wpt/tests/fetch/http-cache/cc-request.any.js b/test/fixtures/wpt/fetch/http-cache/cc-request.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/cc-request.any.js
rename to test/fixtures/wpt/fetch/http-cache/cc-request.any.js
diff --git a/test/wpt/tests/fetch/http-cache/credentials.tentative.any.js b/test/fixtures/wpt/fetch/http-cache/credentials.tentative.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/credentials.tentative.any.js
rename to test/fixtures/wpt/fetch/http-cache/credentials.tentative.any.js
diff --git a/test/wpt/tests/fetch/http-cache/freshness.any.js b/test/fixtures/wpt/fetch/http-cache/freshness.any.js
similarity index 88%
rename from test/wpt/tests/fetch/http-cache/freshness.any.js
rename to test/fixtures/wpt/fetch/http-cache/freshness.any.js
index 6b97c8244f6..86c2620aa66 100644
--- a/test/wpt/tests/fetch/http-cache/freshness.any.js
+++ b/test/fixtures/wpt/fetch/http-cache/freshness.any.js
@@ -59,6 +59,34 @@ var tests = [
}
]
},
+ {
+ name: "HTTP cache does not reuse a response with an invalid Expires with Last-Modified now",
+ requests: [
+ {
+ response_headers: [
+ ["Expires", "0"],
+ ['Last-Modified', 0]
+ ]
+ },
+ {
+ expected_type: "not_cached"
+ }
+ ]
+ },
+ {
+ name: "HTTP cache does not reuse a response with an invalid Expires with past Last-Modified",
+ requests: [
+ {
+ response_headers: [
+ ["Expires", "0"],
+ ['Last-Modified', -100000]
+ ]
+ },
+ {
+ expected_type: "not_cached"
+ }
+ ]
+ },
{
name: "HTTP cache reuses a response with positive Cache-Control: max-age",
requests: [
diff --git a/test/wpt/tests/fetch/http-cache/heuristic.any.js b/test/fixtures/wpt/fetch/http-cache/heuristic.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/heuristic.any.js
rename to test/fixtures/wpt/fetch/http-cache/heuristic.any.js
diff --git a/test/wpt/tests/fetch/http-cache/http-cache.js b/test/fixtures/wpt/fetch/http-cache/http-cache.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/http-cache.js
rename to test/fixtures/wpt/fetch/http-cache/http-cache.js
diff --git a/test/wpt/tests/fetch/http-cache/invalidate.any.js b/test/fixtures/wpt/fetch/http-cache/invalidate.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/invalidate.any.js
rename to test/fixtures/wpt/fetch/http-cache/invalidate.any.js
diff --git a/test/wpt/tests/fetch/http-cache/partial.any.js b/test/fixtures/wpt/fetch/http-cache/partial.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/partial.any.js
rename to test/fixtures/wpt/fetch/http-cache/partial.any.js
diff --git a/test/wpt/tests/fetch/http-cache/post-patch.any.js b/test/fixtures/wpt/fetch/http-cache/post-patch.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/post-patch.any.js
rename to test/fixtures/wpt/fetch/http-cache/post-patch.any.js
diff --git a/test/wpt/tests/fetch/http-cache/resources/http-cache.py b/test/fixtures/wpt/fetch/http-cache/resources/http-cache.py
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/resources/http-cache.py
rename to test/fixtures/wpt/fetch/http-cache/resources/http-cache.py
diff --git a/test/wpt/tests/fetch/http-cache/resources/securedimage.py b/test/fixtures/wpt/fetch/http-cache/resources/securedimage.py
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/resources/securedimage.py
rename to test/fixtures/wpt/fetch/http-cache/resources/securedimage.py
diff --git a/test/wpt/tests/fetch/http-cache/resources/split-cache-popup-with-iframe.html b/test/fixtures/wpt/fetch/http-cache/resources/split-cache-popup-with-iframe.html
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/resources/split-cache-popup-with-iframe.html
rename to test/fixtures/wpt/fetch/http-cache/resources/split-cache-popup-with-iframe.html
diff --git a/test/wpt/tests/fetch/http-cache/resources/split-cache-popup.html b/test/fixtures/wpt/fetch/http-cache/resources/split-cache-popup.html
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/resources/split-cache-popup.html
rename to test/fixtures/wpt/fetch/http-cache/resources/split-cache-popup.html
diff --git a/test/wpt/tests/fetch/http-cache/split-cache.html b/test/fixtures/wpt/fetch/http-cache/split-cache.html
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/split-cache.html
rename to test/fixtures/wpt/fetch/http-cache/split-cache.html
diff --git a/test/wpt/tests/fetch/http-cache/status.any.js b/test/fixtures/wpt/fetch/http-cache/status.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/status.any.js
rename to test/fixtures/wpt/fetch/http-cache/status.any.js
diff --git a/test/wpt/tests/fetch/http-cache/vary.any.js b/test/fixtures/wpt/fetch/http-cache/vary.any.js
similarity index 100%
rename from test/wpt/tests/fetch/http-cache/vary.any.js
rename to test/fixtures/wpt/fetch/http-cache/vary.any.js
diff --git a/test/wpt/tests/fetch/images/canvas-remote-read-remote-image-redirect.html b/test/fixtures/wpt/fetch/images/canvas-remote-read-remote-image-redirect.html
similarity index 100%
rename from test/wpt/tests/fetch/images/canvas-remote-read-remote-image-redirect.html
rename to test/fixtures/wpt/fetch/images/canvas-remote-read-remote-image-redirect.html
diff --git a/test/wpt/tests/fetch/metadata/META.yml b/test/fixtures/wpt/fetch/metadata/META.yml
similarity index 100%
rename from test/wpt/tests/fetch/metadata/META.yml
rename to test/fixtures/wpt/fetch/metadata/META.yml
diff --git a/test/wpt/tests/fetch/metadata/README.md b/test/fixtures/wpt/fetch/metadata/README.md
similarity index 100%
rename from test/wpt/tests/fetch/metadata/README.md
rename to test/fixtures/wpt/fetch/metadata/README.md
diff --git a/test/fixtures/wpt/fetch/metadata/WEB_FEATURES.yml b/test/fixtures/wpt/fetch/metadata/WEB_FEATURES.yml
new file mode 100644
index 00000000000..fb48eaa3112
--- /dev/null
+++ b/test/fixtures/wpt/fetch/metadata/WEB_FEATURES.yml
@@ -0,0 +1,3 @@
+features:
+- name: fetch-metadata
+ files: "**"
diff --git a/test/wpt/tests/fetch/metadata/audio-worklet.https.html b/test/fixtures/wpt/fetch/metadata/audio-worklet.https.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/audio-worklet.https.html
rename to test/fixtures/wpt/fetch/metadata/audio-worklet.https.html
diff --git a/test/wpt/tests/fetch/metadata/embed.https.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/embed.https.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/embed.https.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/embed.https.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/fetch-preflight.https.sub.any.js b/test/fixtures/wpt/fetch/metadata/fetch-preflight.https.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/fetch-preflight.https.sub.any.js
rename to test/fixtures/wpt/fetch/metadata/fetch-preflight.https.sub.any.js
diff --git a/test/wpt/tests/fetch/metadata/fetch.https.sub.any.js b/test/fixtures/wpt/fetch/metadata/fetch.https.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/fetch.https.sub.any.js
rename to test/fixtures/wpt/fetch/metadata/fetch.https.sub.any.js
diff --git a/test/wpt/tests/fetch/metadata/generated/audioworklet.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/audioworklet.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/audioworklet.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/audioworklet.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/css-font-face.https.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/generated/css-font-face.https.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/css-font-face.https.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/generated/css-font-face.https.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/generated/css-font-face.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/generated/css-font-face.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/css-font-face.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/generated/css-font-face.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/generated/css-images.https.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/generated/css-images.https.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/css-images.https.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/generated/css-images.https.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/generated/css-images.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/generated/css-images.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/css-images.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/generated/css-images.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-a.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-a.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-a.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-a.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-a.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-a.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-a.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-a.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-area.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-area.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-area.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-area.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-area.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-area.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-area.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-area.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-audio.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-audio.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-audio.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-audio.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-audio.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-audio.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-audio.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-audio.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-embed.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-embed.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-embed.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-embed.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-embed.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-embed.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-embed.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-embed.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-frame.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-frame.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-frame.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-frame.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-frame.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-frame.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-frame.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-frame.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-iframe.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-iframe.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-iframe.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-iframe.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-iframe.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-iframe.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-iframe.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-iframe.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-img-environment-change.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-img-environment-change.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-img-environment-change.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-img-environment-change.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-img-environment-change.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-img-environment-change.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-img-environment-change.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-img-environment-change.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-img.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-img.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-img.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-img.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-img.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-img.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-img.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-img.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-input-image.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-input-image.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-input-image.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-input-image.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-input-image.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-input-image.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-input-image.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-input-image.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-link-icon.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-link-icon.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-link-icon.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-link-icon.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-link-icon.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-link-icon.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-link-icon.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-link-icon.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-link-prefetch.https.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-link-prefetch.https.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-link-prefetch.https.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-link-prefetch.https.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-link-prefetch.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-link-prefetch.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-link-prefetch.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-link-prefetch.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-meta-refresh.https.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-meta-refresh.https.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-meta-refresh.https.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-meta-refresh.https.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-meta-refresh.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-meta-refresh.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-meta-refresh.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-meta-refresh.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-picture.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-picture.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-picture.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-picture.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-picture.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-picture.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-picture.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-picture.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-script.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-script.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-script.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-script.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-script.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-script.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-script.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-script.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-video-poster.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-video-poster.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-video-poster.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-video-poster.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-video-poster.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-video-poster.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-video-poster.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-video-poster.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-video.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-video.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-video.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-video.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/element-video.sub.html b/test/fixtures/wpt/fetch/metadata/generated/element-video.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/element-video.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/element-video.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/fetch-via-serviceworker.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/fetch-via-serviceworker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/fetch-via-serviceworker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/fetch-via-serviceworker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/fetch.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/fetch.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/fetch.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/fetch.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/fetch.sub.html b/test/fixtures/wpt/fetch/metadata/generated/fetch.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/fetch.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/fetch.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/form-submission.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/form-submission.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/form-submission.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/form-submission.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/form-submission.sub.html b/test/fixtures/wpt/fetch/metadata/generated/form-submission.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/form-submission.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/form-submission.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/header-link.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/header-link.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/header-link.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/header-link.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/header-link.https.sub.tentative.html b/test/fixtures/wpt/fetch/metadata/generated/header-link.https.sub.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/header-link.https.sub.tentative.html
rename to test/fixtures/wpt/fetch/metadata/generated/header-link.https.sub.tentative.html
diff --git a/test/wpt/tests/fetch/metadata/generated/header-link.sub.html b/test/fixtures/wpt/fetch/metadata/generated/header-link.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/header-link.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/header-link.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/header-refresh.https.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/header-refresh.https.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/header-refresh.https.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/header-refresh.https.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/header-refresh.optional.sub.html b/test/fixtures/wpt/fetch/metadata/generated/header-refresh.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/header-refresh.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/header-refresh.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/script-module-import-dynamic.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/script-module-import-dynamic.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/script-module-import-dynamic.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/script-module-import-dynamic.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/script-module-import-dynamic.sub.html b/test/fixtures/wpt/fetch/metadata/generated/script-module-import-dynamic.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/script-module-import-dynamic.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/script-module-import-dynamic.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/script-module-import-static.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/script-module-import-static.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/script-module-import-static.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/script-module-import-static.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/script-module-import-static.sub.html b/test/fixtures/wpt/fetch/metadata/generated/script-module-import-static.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/script-module-import-static.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/script-module-import-static.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/serviceworker.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/serviceworker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/serviceworker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/serviceworker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/svg-image.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/svg-image.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/svg-image.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/svg-image.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/svg-image.sub.html b/test/fixtures/wpt/fetch/metadata/generated/svg-image.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/svg-image.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/svg-image.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/window-history.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/window-history.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/window-history.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/window-history.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/window-history.sub.html b/test/fixtures/wpt/fetch/metadata/generated/window-history.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/window-history.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/window-history.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/window-location.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/window-location.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/window-location.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/window-location.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/window-location.sub.html b/test/fixtures/wpt/fetch/metadata/generated/window-location.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/window-location.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/window-location.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/worker-dedicated-constructor.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-constructor.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/worker-dedicated-constructor.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-constructor.https.sub.html
diff --git a/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-constructor.sub.html b/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-constructor.sub.html
new file mode 100644
index 00000000000..65b1837c636
--- /dev/null
+++ b/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-constructor.sub.html
@@ -0,0 +1,84 @@
+
+
+
+
+ HTTP headers on request for dedicated worker via the "Worker" constructor
+
+
+
+
+
diff --git a/test/wpt/tests/fetch/metadata/generated/worker-dedicated-importscripts.https.sub.html b/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-importscripts.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/worker-dedicated-importscripts.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-importscripts.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/generated/worker-dedicated-importscripts.sub.html b/test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-importscripts.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/generated/worker-dedicated-importscripts.sub.html
rename to test/fixtures/wpt/fetch/metadata/generated/worker-dedicated-importscripts.sub.html
diff --git a/test/wpt/tests/fetch/metadata/navigation.https.sub.html b/test/fixtures/wpt/fetch/metadata/navigation.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/navigation.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/navigation.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/object.https.sub.html b/test/fixtures/wpt/fetch/metadata/object.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/object.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/object.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/paint-worklet.https.html b/test/fixtures/wpt/fetch/metadata/paint-worklet.https.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/paint-worklet.https.html
rename to test/fixtures/wpt/fetch/metadata/paint-worklet.https.html
diff --git a/test/wpt/tests/fetch/metadata/preload.https.sub.html b/test/fixtures/wpt/fetch/metadata/preload.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/preload.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/preload.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.sub.html b/test/fixtures/wpt/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.sub.html
rename to test/fixtures/wpt/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.sub.html
diff --git a/test/wpt/tests/fetch/metadata/redirect/redirect-http-upgrade.sub.html b/test/fixtures/wpt/fetch/metadata/redirect/redirect-http-upgrade.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/redirect/redirect-http-upgrade.sub.html
rename to test/fixtures/wpt/fetch/metadata/redirect/redirect-http-upgrade.sub.html
diff --git a/test/wpt/tests/fetch/metadata/redirect/redirect-https-downgrade.sub.html b/test/fixtures/wpt/fetch/metadata/redirect/redirect-https-downgrade.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/redirect/redirect-https-downgrade.sub.html
rename to test/fixtures/wpt/fetch/metadata/redirect/redirect-https-downgrade.sub.html
diff --git a/test/wpt/tests/fetch/metadata/report.https.sub.html b/test/fixtures/wpt/fetch/metadata/report.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/report.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/report.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/report.https.sub.html.sub.headers b/test/fixtures/wpt/fetch/metadata/report.https.sub.html.sub.headers
similarity index 100%
rename from test/wpt/tests/fetch/metadata/report.https.sub.html.sub.headers
rename to test/fixtures/wpt/fetch/metadata/report.https.sub.html.sub.headers
diff --git a/test/wpt/tests/fetch/metadata/resources/appcache-iframe.sub.html b/test/fixtures/wpt/fetch/metadata/resources/appcache-iframe.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/appcache-iframe.sub.html
rename to test/fixtures/wpt/fetch/metadata/resources/appcache-iframe.sub.html
diff --git a/test/wpt/tests/fetch/metadata/resources/dedicatedWorker.js b/test/fixtures/wpt/fetch/metadata/resources/dedicatedWorker.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/dedicatedWorker.js
rename to test/fixtures/wpt/fetch/metadata/resources/dedicatedWorker.js
diff --git a/test/wpt/tests/fetch/metadata/resources/echo-as-json.py b/test/fixtures/wpt/fetch/metadata/resources/echo-as-json.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/echo-as-json.py
rename to test/fixtures/wpt/fetch/metadata/resources/echo-as-json.py
diff --git a/test/wpt/tests/fetch/metadata/resources/echo-as-script.py b/test/fixtures/wpt/fetch/metadata/resources/echo-as-script.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/echo-as-script.py
rename to test/fixtures/wpt/fetch/metadata/resources/echo-as-script.py
diff --git a/test/wpt/tests/fetch/metadata/resources/es-module.sub.js b/test/fixtures/wpt/fetch/metadata/resources/es-module.sub.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/es-module.sub.js
rename to test/fixtures/wpt/fetch/metadata/resources/es-module.sub.js
diff --git a/test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker--fallback--sw.js b/test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker--fallback--sw.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker--fallback--sw.js
rename to test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker--fallback--sw.js
diff --git a/test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker--respondWith--sw.js b/test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker--respondWith--sw.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker--respondWith--sw.js
rename to test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker--respondWith--sw.js
diff --git a/test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker-frame.html b/test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker-frame.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/fetch-via-serviceworker-frame.html
rename to test/fixtures/wpt/fetch/metadata/resources/fetch-via-serviceworker-frame.html
diff --git a/test/wpt/tests/fetch/metadata/resources/header-link.py b/test/fixtures/wpt/fetch/metadata/resources/header-link.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/header-link.py
rename to test/fixtures/wpt/fetch/metadata/resources/header-link.py
diff --git a/test/wpt/tests/fetch/metadata/resources/helper.js b/test/fixtures/wpt/fetch/metadata/resources/helper.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/helper.js
rename to test/fixtures/wpt/fetch/metadata/resources/helper.js
diff --git a/test/wpt/tests/fetch/metadata/resources/helper.sub.js b/test/fixtures/wpt/fetch/metadata/resources/helper.sub.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/helper.sub.js
rename to test/fixtures/wpt/fetch/metadata/resources/helper.sub.js
diff --git a/test/wpt/tests/fetch/metadata/resources/message-opener.html b/test/fixtures/wpt/fetch/metadata/resources/message-opener.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/message-opener.html
rename to test/fixtures/wpt/fetch/metadata/resources/message-opener.html
diff --git a/test/wpt/tests/fetch/metadata/resources/post-to-owner.py b/test/fixtures/wpt/fetch/metadata/resources/post-to-owner.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/post-to-owner.py
rename to test/fixtures/wpt/fetch/metadata/resources/post-to-owner.py
diff --git a/test/wpt/tests/fetch/metadata/resources/record-header.py b/test/fixtures/wpt/fetch/metadata/resources/record-header.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/record-header.py
rename to test/fixtures/wpt/fetch/metadata/resources/record-header.py
diff --git a/test/wpt/tests/fetch/metadata/resources/record-headers.py b/test/fixtures/wpt/fetch/metadata/resources/record-headers.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/record-headers.py
rename to test/fixtures/wpt/fetch/metadata/resources/record-headers.py
diff --git a/test/wpt/tests/fetch/metadata/resources/redirectTestHelper.sub.js b/test/fixtures/wpt/fetch/metadata/resources/redirectTestHelper.sub.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/redirectTestHelper.sub.js
rename to test/fixtures/wpt/fetch/metadata/resources/redirectTestHelper.sub.js
diff --git a/test/wpt/tests/fetch/metadata/resources/serviceworker-accessors-frame.html b/test/fixtures/wpt/fetch/metadata/resources/serviceworker-accessors-frame.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/serviceworker-accessors-frame.html
rename to test/fixtures/wpt/fetch/metadata/resources/serviceworker-accessors-frame.html
diff --git a/test/wpt/tests/fetch/metadata/resources/serviceworker-accessors.sw.js b/test/fixtures/wpt/fetch/metadata/resources/serviceworker-accessors.sw.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/serviceworker-accessors.sw.js
rename to test/fixtures/wpt/fetch/metadata/resources/serviceworker-accessors.sw.js
diff --git a/test/wpt/tests/fetch/metadata/resources/sharedWorker.js b/test/fixtures/wpt/fetch/metadata/resources/sharedWorker.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/sharedWorker.js
rename to test/fixtures/wpt/fetch/metadata/resources/sharedWorker.js
diff --git a/test/wpt/tests/fetch/metadata/resources/unload-with-beacon.html b/test/fixtures/wpt/fetch/metadata/resources/unload-with-beacon.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/unload-with-beacon.html
rename to test/fixtures/wpt/fetch/metadata/resources/unload-with-beacon.html
diff --git a/test/wpt/tests/fetch/metadata/resources/xslt-test.sub.xml b/test/fixtures/wpt/fetch/metadata/resources/xslt-test.sub.xml
similarity index 100%
rename from test/wpt/tests/fetch/metadata/resources/xslt-test.sub.xml
rename to test/fixtures/wpt/fetch/metadata/resources/xslt-test.sub.xml
diff --git a/test/wpt/tests/fetch/metadata/serviceworker-accessors.https.sub.html b/test/fixtures/wpt/fetch/metadata/serviceworker-accessors.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/serviceworker-accessors.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/serviceworker-accessors.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/sharedworker.https.sub.html b/test/fixtures/wpt/fetch/metadata/sharedworker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/sharedworker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/sharedworker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/style.https.sub.html b/test/fixtures/wpt/fetch/metadata/style.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/style.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/style.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/README.md b/test/fixtures/wpt/fetch/metadata/tools/README.md
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/README.md
rename to test/fixtures/wpt/fetch/metadata/tools/README.md
diff --git a/test/wpt/tests/fetch/metadata/tools/fetch-metadata.conf.yml b/test/fixtures/wpt/fetch/metadata/tools/fetch-metadata.conf.yml
similarity index 92%
rename from test/wpt/tests/fetch/metadata/tools/fetch-metadata.conf.yml
rename to test/fixtures/wpt/fetch/metadata/tools/fetch-metadata.conf.yml
index b277bcb7b53..b96bd2fd7b4 100644
--- a/test/wpt/tests/fetch/metadata/tools/fetch-metadata.conf.yml
+++ b/test/fixtures/wpt/fetch/metadata/tools/fetch-metadata.conf.yml
@@ -43,10 +43,8 @@ cases:
origins: [httpCrossSite]
description: Not sent to non-trustworthy cross-site destination
template_axes:
- # Unused
- appcache-manifest.sub.https.html: []
- # The `audioWorklet` interface is only available in secure contexts
- # https://webaudio.github.io/web-audio-api/#BaseAudioContext
+ # The `AudioWorklet` interface is only available in secure contexts
+ # https://webaudio.github.io/web-audio-api/#AudioWorklet
audioworklet.https.sub.html: []
# Service workers are only available in secure context
fetch-via-serviceworker.https.sub.html: []
@@ -91,6 +89,62 @@ cases:
svg-image.sub.html: [{}]
window-history.sub.html: [{}]
worker-dedicated-importscripts.sub.html: [{}]
+ # `new Worker()` only makes same-origin requests, therefore we split it
+ # out into the next block.
+ worker-dedicated-constructor.sub.html: []
+
+ - all_subtests:
+ expected: NULL
+ filename_flags: []
+ common_axis:
+ - headerName: sec-fetch-site
+ origins: [httpOrigin]
+ description: Not sent to non-trustworthy same-origin destination
+ - headerName: sec-fetch-mode
+ origins: [httpOrigin]
+ description: Not sent to non-trustworthy same-origin destination
+ - headerName: sec-fetch-dest
+ origins: [httpOrigin]
+ description: Not sent to non-trustworthy same-origin destination
+ - headerName: sec-fetch-user
+ origins: [httpOrigin]
+ description: Not sent to non-trustworthy same-origin destination
+ template_axes:
+ # All the templates in this block are unused with the exception of
+ # `worker-dedicated-constructor`
+ audioworklet.https.sub.html: []
+ fetch-via-serviceworker.https.sub.html: []
+ serviceworker.https.sub.html: []
+ css-images.sub.html: []
+ css-font-face.sub.html: []
+ element-a.sub.html: []
+ element-area.sub.html: []
+ element-audio.sub.html: []
+ element-embed.sub.html: []
+ element-frame.sub.html: []
+ element-iframe.sub.html: []
+ element-img.sub.html: []
+ element-img-environment-change.sub.html: []
+ element-input-image.sub.html: []
+ element-link-icon.sub.html: []
+ element-link-prefetch.optional.sub.html: []
+ element-meta-refresh.optional.sub.html: []
+ element-picture.sub.html: []
+ element-script.sub.html: []
+ element-video.sub.html: []
+ element-video-poster.sub.html: []
+ fetch.sub.html: []
+ form-submission.sub.html: []
+ header-link.sub.html: []
+ header-refresh.optional.sub.html: []
+ window-location.sub.html: []
+ script-module-import-dynamic.sub.html: []
+ script-module-import-static.sub.html: []
+ svg-image.sub.html: []
+ window-history.sub.html: []
+ worker-dedicated-importscripts.sub.html: []
+ # `new Worker()` only makes same-origin requests, so we populate its
+ # generated tests here.
worker-dedicated-constructor.sub.html: [{}]
# Sec-Fetch-Site - direct requests
@@ -117,7 +171,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
- appcache-manifest.sub.https.html: [{}]
audioworklet.https.sub.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
@@ -176,8 +229,8 @@ cases:
expected: cross-site
template_axes:
# Unused
- # The `audioWorklet` interface is only available in secure contexts
- # https://webaudio.github.io/web-audio-api/#BaseAudioContext
+ # The `AudioWorklet` interface is only available in secure contexts
+ # https://webaudio.github.io/web-audio-api/#AudioWorklet
audioworklet.https.sub.html: []
# Service workers are only available in secure context
fetch-via-serviceworker.https.sub.html: []
@@ -196,7 +249,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
- appcache-manifest.sub.https.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
css-font-face.sub.html:
@@ -289,7 +341,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
- appcache-manifest.sub.https.html: [{}]
audioworklet.https.sub.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
@@ -377,7 +428,6 @@ cases:
worker-dedicated-constructor.sub.html: []
worker-dedicated-importscripts.sub.html: []
# Avoid duplicate subtest for 'sec-fetch-site - HTTPS downgrade-upgrade'
- appcache-manifest.sub.https.html: []
css-images.sub.html:
- filename_flags: [tentative]
element-a.sub.html: [{}]
@@ -409,8 +459,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
- appcache-manifest.sub.https.html:
- - expected: no-cors
audioworklet.https.sub.html:
# https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
- expected: cors
@@ -586,8 +634,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
- appcache-manifest.sub.https.html:
- - expected: empty
audioworklet.https.sub.html:
# https://github.com/WebAudio/web-audio-api/issues/2203
- expected: audioworklet
@@ -709,8 +755,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
- appcache-manifest.sub.https.html:
- - expected: NULL
audioworklet.https.sub.html:
- expected: NULL
css-images.sub.html:
diff --git a/test/wpt/tests/fetch/metadata/tools/generate.py b/test/fixtures/wpt/fetch/metadata/tools/generate.py
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/generate.py
rename to test/fixtures/wpt/fetch/metadata/tools/generate.py
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/audioworklet.https.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/audioworklet.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/audioworklet.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/audioworklet.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/css-font-face.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/css-font-face.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/css-font-face.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/css-font-face.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/css-images.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/css-images.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/css-images.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/css-images.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-a.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-a.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-a.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-a.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-area.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-area.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-area.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-area.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-audio.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-audio.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-audio.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-audio.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-embed.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-embed.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-embed.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-embed.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-frame.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-frame.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-frame.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-frame.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-iframe.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-iframe.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-iframe.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-iframe.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-img-environment-change.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-img-environment-change.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-img-environment-change.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-img-environment-change.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-img.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-img.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-img.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-img.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-input-image.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-input-image.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-input-image.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-input-image.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-link-icon.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-link-icon.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-link-icon.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-link-icon.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-link-prefetch.optional.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-link-prefetch.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-link-prefetch.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-link-prefetch.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-meta-refresh.optional.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-meta-refresh.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-meta-refresh.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-meta-refresh.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-picture.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-picture.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-picture.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-picture.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-script.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-script.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-script.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-script.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-video-poster.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-video-poster.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-video-poster.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-video-poster.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/element-video.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/element-video.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/element-video.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/element-video.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/fetch-via-serviceworker.https.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/fetch-via-serviceworker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/fetch-via-serviceworker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/fetch-via-serviceworker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/fetch.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/fetch.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/fetch.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/fetch.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/form-submission.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/form-submission.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/form-submission.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/form-submission.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/header-link.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/header-link.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/header-link.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/header-link.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/header-refresh.optional.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/header-refresh.optional.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/header-refresh.optional.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/header-refresh.optional.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/script-module-import-dynamic.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/script-module-import-dynamic.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/script-module-import-dynamic.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/script-module-import-dynamic.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/script-module-import-static.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/script-module-import-static.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/script-module-import-static.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/script-module-import-static.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/serviceworker.https.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/serviceworker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/serviceworker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/serviceworker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/svg-image.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/svg-image.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/svg-image.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/svg-image.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/window-history.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/window-history.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/window-history.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/window-history.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/window-location.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/window-location.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/window-location.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/window-location.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/worker-dedicated-constructor.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/worker-dedicated-constructor.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/worker-dedicated-constructor.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/worker-dedicated-constructor.sub.html
diff --git a/test/wpt/tests/fetch/metadata/tools/templates/worker-dedicated-importscripts.sub.html b/test/fixtures/wpt/fetch/metadata/tools/templates/worker-dedicated-importscripts.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/tools/templates/worker-dedicated-importscripts.sub.html
rename to test/fixtures/wpt/fetch/metadata/tools/templates/worker-dedicated-importscripts.sub.html
diff --git a/test/wpt/tests/fetch/metadata/track.https.sub.html b/test/fixtures/wpt/fetch/metadata/track.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/track.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/track.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/trailing-dot.https.sub.any.js b/test/fixtures/wpt/fetch/metadata/trailing-dot.https.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/metadata/trailing-dot.https.sub.any.js
rename to test/fixtures/wpt/fetch/metadata/trailing-dot.https.sub.any.js
diff --git a/test/wpt/tests/fetch/metadata/unload.https.sub.html b/test/fixtures/wpt/fetch/metadata/unload.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/unload.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/unload.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/window-open.https.sub.html b/test/fixtures/wpt/fetch/metadata/window-open.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/window-open.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/window-open.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/worker.https.sub.html b/test/fixtures/wpt/fetch/metadata/worker.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/worker.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/worker.https.sub.html
diff --git a/test/wpt/tests/fetch/metadata/xslt.https.sub.html b/test/fixtures/wpt/fetch/metadata/xslt.https.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/metadata/xslt.https.sub.html
rename to test/fixtures/wpt/fetch/metadata/xslt.https.sub.html
diff --git a/test/wpt/tests/fetch/nosniff/image.html b/test/fixtures/wpt/fetch/nosniff/image.html
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/image.html
rename to test/fixtures/wpt/fetch/nosniff/image.html
diff --git a/test/wpt/tests/fetch/nosniff/importscripts.html b/test/fixtures/wpt/fetch/nosniff/importscripts.html
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/importscripts.html
rename to test/fixtures/wpt/fetch/nosniff/importscripts.html
diff --git a/test/wpt/tests/fetch/nosniff/importscripts.js b/test/fixtures/wpt/fetch/nosniff/importscripts.js
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/importscripts.js
rename to test/fixtures/wpt/fetch/nosniff/importscripts.js
diff --git a/test/wpt/tests/fetch/nosniff/parsing-nosniff.window.js b/test/fixtures/wpt/fetch/nosniff/parsing-nosniff.window.js
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/parsing-nosniff.window.js
rename to test/fixtures/wpt/fetch/nosniff/parsing-nosniff.window.js
diff --git a/test/wpt/tests/fetch/nosniff/resources/css.py b/test/fixtures/wpt/fetch/nosniff/resources/css.py
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/css.py
rename to test/fixtures/wpt/fetch/nosniff/resources/css.py
diff --git a/test/wpt/tests/fetch/nosniff/resources/image.py b/test/fixtures/wpt/fetch/nosniff/resources/image.py
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/image.py
rename to test/fixtures/wpt/fetch/nosniff/resources/image.py
diff --git a/test/wpt/tests/fetch/nosniff/resources/js.py b/test/fixtures/wpt/fetch/nosniff/resources/js.py
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/js.py
rename to test/fixtures/wpt/fetch/nosniff/resources/js.py
diff --git a/test/wpt/tests/fetch/nosniff/resources/nosniff.py b/test/fixtures/wpt/fetch/nosniff/resources/nosniff.py
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/nosniff.py
rename to test/fixtures/wpt/fetch/nosniff/resources/nosniff.py
diff --git a/test/wpt/tests/fetch/nosniff/resources/worker.py b/test/fixtures/wpt/fetch/nosniff/resources/worker.py
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/worker.py
rename to test/fixtures/wpt/fetch/nosniff/resources/worker.py
diff --git a/test/wpt/tests/fetch/nosniff/resources/x-content-type-options.json b/test/fixtures/wpt/fetch/nosniff/resources/x-content-type-options.json
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/resources/x-content-type-options.json
rename to test/fixtures/wpt/fetch/nosniff/resources/x-content-type-options.json
diff --git a/test/wpt/tests/fetch/nosniff/script.html b/test/fixtures/wpt/fetch/nosniff/script.html
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/script.html
rename to test/fixtures/wpt/fetch/nosniff/script.html
diff --git a/test/wpt/tests/fetch/nosniff/stylesheet.html b/test/fixtures/wpt/fetch/nosniff/stylesheet.html
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/stylesheet.html
rename to test/fixtures/wpt/fetch/nosniff/stylesheet.html
diff --git a/test/wpt/tests/fetch/nosniff/worker.html b/test/fixtures/wpt/fetch/nosniff/worker.html
similarity index 100%
rename from test/wpt/tests/fetch/nosniff/worker.html
rename to test/fixtures/wpt/fetch/nosniff/worker.html
diff --git a/test/wpt/tests/fetch/orb/resources/data.json b/test/fixtures/wpt/fetch/orb/resources/data.json
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/data.json
rename to test/fixtures/wpt/fetch/orb/resources/data.json
diff --git a/test/wpt/tests/fetch/orb/resources/data_non_ascii.json b/test/fixtures/wpt/fetch/orb/resources/data_non_ascii.json
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/data_non_ascii.json
rename to test/fixtures/wpt/fetch/orb/resources/data_non_ascii.json
diff --git a/test/wpt/tests/fetch/orb/resources/empty.json b/test/fixtures/wpt/fetch/orb/resources/empty.json
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/empty.json
rename to test/fixtures/wpt/fetch/orb/resources/empty.json
diff --git a/test/wpt/tests/fetch/orb/resources/font.ttf b/test/fixtures/wpt/fetch/orb/resources/font.ttf
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/font.ttf
rename to test/fixtures/wpt/fetch/orb/resources/font.ttf
diff --git a/test/wpt/tests/fetch/orb/resources/image.png b/test/fixtures/wpt/fetch/orb/resources/image.png
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/image.png
rename to test/fixtures/wpt/fetch/orb/resources/image.png
diff --git a/test/wpt/tests/fetch/orb/resources/js-unlabeled-utf16-without-bom.json b/test/fixtures/wpt/fetch/orb/resources/js-unlabeled-utf16-without-bom.json
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/js-unlabeled-utf16-without-bom.json
rename to test/fixtures/wpt/fetch/orb/resources/js-unlabeled-utf16-without-bom.json
diff --git a/test/wpt/tests/fetch/orb/resources/js-unlabeled.js b/test/fixtures/wpt/fetch/orb/resources/js-unlabeled.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/js-unlabeled.js
rename to test/fixtures/wpt/fetch/orb/resources/js-unlabeled.js
diff --git a/test/wpt/tests/fetch/orb/resources/png-mislabeled-as-html.png b/test/fixtures/wpt/fetch/orb/resources/png-mislabeled-as-html.png
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/png-mislabeled-as-html.png
rename to test/fixtures/wpt/fetch/orb/resources/png-mislabeled-as-html.png
diff --git a/test/wpt/tests/fetch/orb/resources/png-mislabeled-as-html.png.headers b/test/fixtures/wpt/fetch/orb/resources/png-mislabeled-as-html.png.headers
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/png-mislabeled-as-html.png.headers
rename to test/fixtures/wpt/fetch/orb/resources/png-mislabeled-as-html.png.headers
diff --git a/test/wpt/tests/fetch/orb/resources/png-unlabeled.png b/test/fixtures/wpt/fetch/orb/resources/png-unlabeled.png
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/png-unlabeled.png
rename to test/fixtures/wpt/fetch/orb/resources/png-unlabeled.png
diff --git a/test/wpt/tests/fetch/orb/resources/script-asm-js-invalid.js b/test/fixtures/wpt/fetch/orb/resources/script-asm-js-invalid.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script-asm-js-invalid.js
rename to test/fixtures/wpt/fetch/orb/resources/script-asm-js-invalid.js
diff --git a/test/wpt/tests/fetch/orb/resources/script-asm-js-valid.js b/test/fixtures/wpt/fetch/orb/resources/script-asm-js-valid.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script-asm-js-valid.js
rename to test/fixtures/wpt/fetch/orb/resources/script-asm-js-valid.js
diff --git a/test/wpt/tests/fetch/orb/resources/script-iso-8559-1.js b/test/fixtures/wpt/fetch/orb/resources/script-iso-8559-1.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script-iso-8559-1.js
rename to test/fixtures/wpt/fetch/orb/resources/script-iso-8559-1.js
diff --git a/test/wpt/tests/fetch/orb/resources/script-utf16-bom.js b/test/fixtures/wpt/fetch/orb/resources/script-utf16-bom.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script-utf16-bom.js
rename to test/fixtures/wpt/fetch/orb/resources/script-utf16-bom.js
diff --git a/test/wpt/tests/fetch/orb/resources/script-utf16-without-bom.js b/test/fixtures/wpt/fetch/orb/resources/script-utf16-without-bom.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script-utf16-without-bom.js
rename to test/fixtures/wpt/fetch/orb/resources/script-utf16-without-bom.js
diff --git a/test/wpt/tests/fetch/orb/resources/script.js b/test/fixtures/wpt/fetch/orb/resources/script.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/script.js
rename to test/fixtures/wpt/fetch/orb/resources/script.js
diff --git a/test/wpt/tests/fetch/orb/resources/sound.mp3 b/test/fixtures/wpt/fetch/orb/resources/sound.mp3
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/sound.mp3
rename to test/fixtures/wpt/fetch/orb/resources/sound.mp3
diff --git a/test/wpt/tests/fetch/orb/resources/text.txt b/test/fixtures/wpt/fetch/orb/resources/text.txt
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/text.txt
rename to test/fixtures/wpt/fetch/orb/resources/text.txt
diff --git a/test/wpt/tests/fetch/orb/resources/utils.js b/test/fixtures/wpt/fetch/orb/resources/utils.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/resources/utils.js
rename to test/fixtures/wpt/fetch/orb/resources/utils.js
diff --git a/test/wpt/tests/fetch/orb/tentative/compressed-image-sniffing.sub.html b/test/fixtures/wpt/fetch/orb/tentative/compressed-image-sniffing.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/compressed-image-sniffing.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/compressed-image-sniffing.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/content-range.sub.any.js b/test/fixtures/wpt/fetch/orb/tentative/content-range.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/content-range.sub.any.js
rename to test/fixtures/wpt/fetch/orb/tentative/content-range.sub.any.js
diff --git a/test/wpt/tests/fetch/orb/tentative/img-mime-types-coverage.tentative.sub.html b/test/fixtures/wpt/fetch/orb/tentative/img-mime-types-coverage.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/img-mime-types-coverage.tentative.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/img-mime-types-coverage.tentative.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/img-png-mislabeled-as-html.sub-ref.html b/test/fixtures/wpt/fetch/orb/tentative/img-png-mislabeled-as-html.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/img-png-mislabeled-as-html.sub-ref.html
rename to test/fixtures/wpt/fetch/orb/tentative/img-png-mislabeled-as-html.sub-ref.html
diff --git a/test/wpt/tests/fetch/orb/tentative/img-png-mislabeled-as-html.sub.html b/test/fixtures/wpt/fetch/orb/tentative/img-png-mislabeled-as-html.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/img-png-mislabeled-as-html.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/img-png-mislabeled-as-html.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/img-png-unlabeled.sub-ref.html b/test/fixtures/wpt/fetch/orb/tentative/img-png-unlabeled.sub-ref.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/img-png-unlabeled.sub-ref.html
rename to test/fixtures/wpt/fetch/orb/tentative/img-png-unlabeled.sub-ref.html
diff --git a/test/wpt/tests/fetch/orb/tentative/img-png-unlabeled.sub.html b/test/fixtures/wpt/fetch/orb/tentative/img-png-unlabeled.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/img-png-unlabeled.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/img-png-unlabeled.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/known-mime-type.sub.any.js b/test/fixtures/wpt/fetch/orb/tentative/known-mime-type.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/known-mime-type.sub.any.js
rename to test/fixtures/wpt/fetch/orb/tentative/known-mime-type.sub.any.js
diff --git a/test/wpt/tests/fetch/orb/tentative/nosniff.sub.any.js b/test/fixtures/wpt/fetch/orb/tentative/nosniff.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/nosniff.sub.any.js
rename to test/fixtures/wpt/fetch/orb/tentative/nosniff.sub.any.js
diff --git a/test/wpt/tests/fetch/orb/tentative/script-js-unlabeled-gziped.sub.html b/test/fixtures/wpt/fetch/orb/tentative/script-js-unlabeled-gziped.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/script-js-unlabeled-gziped.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/script-js-unlabeled-gziped.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/script-unlabeled.sub.html b/test/fixtures/wpt/fetch/orb/tentative/script-unlabeled.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/script-unlabeled.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/script-unlabeled.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/script-utf16-without-bom-hint-charset.sub.html b/test/fixtures/wpt/fetch/orb/tentative/script-utf16-without-bom-hint-charset.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/script-utf16-without-bom-hint-charset.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/script-utf16-without-bom-hint-charset.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/status.sub.any.js b/test/fixtures/wpt/fetch/orb/tentative/status.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/status.sub.any.js
rename to test/fixtures/wpt/fetch/orb/tentative/status.sub.any.js
diff --git a/test/wpt/tests/fetch/orb/tentative/status.sub.html b/test/fixtures/wpt/fetch/orb/tentative/status.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/status.sub.html
rename to test/fixtures/wpt/fetch/orb/tentative/status.sub.html
diff --git a/test/wpt/tests/fetch/orb/tentative/unknown-mime-type.sub.any.js b/test/fixtures/wpt/fetch/orb/tentative/unknown-mime-type.sub.any.js
similarity index 100%
rename from test/wpt/tests/fetch/orb/tentative/unknown-mime-type.sub.any.js
rename to test/fixtures/wpt/fetch/orb/tentative/unknown-mime-type.sub.any.js
diff --git a/test/wpt/tests/fetch/origin/assorted.window.js b/test/fixtures/wpt/fetch/origin/assorted.window.js
similarity index 100%
rename from test/wpt/tests/fetch/origin/assorted.window.js
rename to test/fixtures/wpt/fetch/origin/assorted.window.js
diff --git a/test/wpt/tests/fetch/origin/resources/redirect-and-stash.py b/test/fixtures/wpt/fetch/origin/resources/redirect-and-stash.py
similarity index 100%
rename from test/wpt/tests/fetch/origin/resources/redirect-and-stash.py
rename to test/fixtures/wpt/fetch/origin/resources/redirect-and-stash.py
diff --git a/test/wpt/tests/fetch/origin/resources/referrer-policy.py b/test/fixtures/wpt/fetch/origin/resources/referrer-policy.py
similarity index 100%
rename from test/wpt/tests/fetch/origin/resources/referrer-policy.py
rename to test/fixtures/wpt/fetch/origin/resources/referrer-policy.py
diff --git a/test/wpt/tests/fetch/private-network-access/META.yml b/test/fixtures/wpt/fetch/private-network-access/META.yml
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/META.yml
rename to test/fixtures/wpt/fetch/private-network-access/META.yml
diff --git a/test/wpt/tests/fetch/private-network-access/README.md b/test/fixtures/wpt/fetch/private-network-access/README.md
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/README.md
rename to test/fixtures/wpt/fetch/private-network-access/README.md
diff --git a/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.https.window.js
new file mode 100644
index 00000000000..4e860ad381d
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.https.window.js
@@ -0,0 +1,191 @@
+// META: script=/common/subset-tests-by-key.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+// META: timeout=long
+// META: variant=?include=from-local
+// META: variant=?include=from-private
+// META: variant=?include=from-public
+// META: variant=?include=from-treat-as-public
+//
+// These tests verify that secure contexts can navigate to less-public address
+// spaces via an anchor link iff the target server responds affirmatively to
+// preflight requests.
+
+setup(() => {
+ assert_true(window.isSecureContext);
+});
+
+// Source: secure local context.
+//
+// All fetches unaffected by Private Network Access.
+
+subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_LOCAL },
+ target: { server: Server.HTTPS_LOCAL },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to local: no preflight required.");
+
+subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_LOCAL },
+ target: { server: Server.HTTPS_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to private: no preflight required.");
+
+subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_LOCAL },
+ target: { server: Server.HTTPS_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to public: no preflight required.");
+
+// Generates tests of preflight behavior for a single (source, target) pair.
+//
+// Scenarios:
+//
+// - preflight response has non-2xx HTTP code
+// - preflight response is missing CORS headers
+// - preflight response is missing the PNA-specific `Access-Control` header
+// - success
+//
+function makePreflightTests({
+ key,
+ sourceName,
+ sourceServer,
+ sourceTreatAsPublic,
+ targetName,
+ targetServer,
+}) {
+ const prefix =
+ `${sourceName} to ${targetName}: `;
+
+ const source = {
+ server: sourceServer,
+ treatAsPublic: sourceTreatAsPublic,
+ };
+
+ promise_test_parallel(t => anchorTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.failure() },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "failed preflight.");
+
+ promise_test_parallel(t => anchorTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.noCorsHeader(token()) },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "missing CORS headers.");
+
+ promise_test_parallel(t => anchorTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.noPnaHeader(token()) },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "missing PNA header.");
+
+ promise_test_parallel(t => anchorTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.navigation(token()) },
+ },
+ expected: NavigationTestResult.SUCCESS,
+ }), prefix + "success.");
+}
+
+// Source: private secure context.
+//
+// Fetches to the local address space require a successful preflight response
+// carrying a PNA-specific header.
+
+subsetTestByKey('from-private', makePreflightTests, {
+ sourceServer: Server.HTTPS_PRIVATE,
+ sourceName: 'private',
+ targetServer: Server.HTTPS_LOCAL,
+ targetName: 'local',
+});
+
+subsetTestByKey("from-private", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_PRIVATE },
+ target: { server: Server.HTTPS_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to private: no preflight required.");
+
+subsetTestByKey("from-private", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_PRIVATE },
+ target: { server: Server.HTTPS_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to public: no preflight required.");
+
+// Source: public secure context.
+//
+// Fetches to the local and private address spaces require a successful
+// preflight response carrying a PNA-specific header.
+
+subsetTestByKey('from-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_PUBLIC,
+ sourceName: "public",
+ targetServer: Server.HTTPS_LOCAL,
+ targetName: "local",
+});
+
+subsetTestByKey('from-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_PUBLIC,
+ sourceName: "public",
+ targetServer: Server.HTTPS_PRIVATE,
+ targetName: "private",
+});
+
+subsetTestByKey("from-public", promise_test_parallel, t => anchorTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: { server: Server.HTTPS_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "public to public: no preflight required.");
+
+// The following tests verify that `CSP: treat-as-public-address` makes
+// documents behave as if they had been served from a public IP address.
+
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_LOCAL,
+ sourceTreatAsPublic: true,
+ sourceName: "treat-as-public-address",
+ targetServer: Server.OTHER_HTTPS_LOCAL,
+ targetName: "local",
+});
+
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
+ t => anchorTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {server: Server.HTTPS_LOCAL},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'treat-as-public-address to local (same-origin): no preflight required.');
+
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_LOCAL,
+ sourceTreatAsPublic: true,
+ sourceName: 'treat-as-public-address',
+ targetServer: Server.HTTPS_PRIVATE,
+ targetName: 'private',
+});
+
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
+ t => anchorTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {server: Server.HTTPS_PUBLIC},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'treat-as-public-address to public: no preflight required.');
diff --git a/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.window.js
new file mode 100644
index 00000000000..cb538658081
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/anchor.tentative.window.js
@@ -0,0 +1,95 @@
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+// META: timeout=long
+//
+// Spec: https://wicg.github.io/private-network-access/
+//
+// These tests verify that non-secure contexts cannot open a new window via an
+// anchor link to less-public address spaces.
+
+setup(() => {
+ // Making sure we are in a non secure context, as expected.
+ assert_false(window.isSecureContext);
+});
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to local: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to private: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to public: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "private to local: failure.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to private: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to public: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "public to local: failure.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.FAILURE,
+}), "public to private: failure.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "public to public: no preflight required.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "treat-as-public-address to local: failure.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.FAILURE,
+}), "treat-as-public-address to private: failure.");
+
+promise_test_parallel(t => anchorTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "treat-as-public-address to public: no preflight required.");
diff --git a/test/wpt/tests/fetch/private-network-access/fenced-frame-no-preflight-required.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/fenced-frame-no-preflight-required.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/fenced-frame-no-preflight-required.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fenced-frame-no-preflight-required.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/fenced-frame-subresource-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/fenced-frame-subresource-fetch.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/fenced-frame-subresource-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fenced-frame-subresource-fetch.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/fenced-frame.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/fenced-frame.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fenced-frame.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/fetch-from-treat-as-public.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/fetch-from-treat-as-public.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/fetch-from-treat-as-public.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fetch-from-treat-as-public.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/fetch.tentative.https.window.js
similarity index 99%
rename from test/wpt/tests/fetch/private-network-access/fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fetch.tentative.https.window.js
index dbc4f23f677..606443dc14d 100644
--- a/test/wpt/tests/fetch/private-network-access/fetch.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/fetch.tentative.https.window.js
@@ -236,7 +236,7 @@ subsetTestByKey("from-private", promise_test, t => fetchTest(t, {
subsetTestByKey("from-private", promise_test, t => fetchTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: {
- server: Server.HTTPS_PRIVATE,
+ server: Server.HTTPS_PUBLIC,
behavior: { response: ResponseBehavior.allowCrossOrigin() },
},
expected: FetchTestResult.SUCCESS,
diff --git a/test/wpt/tests/fetch/private-network-access/fetch.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/fetch.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/fetch.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/fetch.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/iframe.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/iframe.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/iframe.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/iframe.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/iframe.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/iframe.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/iframe.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/iframe.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js
similarity index 99%
rename from test/wpt/tests/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js
index 54485dc7047..dbae5193b5c 100644
--- a/test/wpt/tests/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/mixed-content-fetch.tentative.https.window.js
@@ -1,5 +1,6 @@
// META: script=/common/utils.js
// META: script=resources/support.sub.js
+// META: timeout=long
//
// Spec: https://wicg.github.io/private-network-access
//
diff --git a/test/wpt/tests/fetch/private-network-access/nested-worker.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/nested-worker.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/nested-worker.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/nested-worker.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/nested-worker.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/nested-worker.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/nested-worker.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/nested-worker.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/preflight-cache.https.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/preflight-cache.https.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/preflight-cache.https.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/preflight-cache.https.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/redirect.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/redirect.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/redirect.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/redirect.tentative.https.window.js
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/anchor.html b/test/fixtures/wpt/fetch/private-network-access/resources/anchor.html
new file mode 100644
index 00000000000..0780b3fa502
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/anchor.html
@@ -0,0 +1,16 @@
+
+
+Anchor
+
+
diff --git a/test/wpt/tests/fetch/private-network-access/resources/executor.html b/test/fixtures/wpt/fetch/private-network-access/resources/executor.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/executor.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/executor.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fenced-frame-fetcher.https.html b/test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-fetcher.https.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fenced-frame-fetcher.https.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-fetcher.https.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fenced-frame-fetcher.https.html.headers b/test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-fetcher.https.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fenced-frame-fetcher.https.html.headers
rename to test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-fetcher.https.html.headers
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access-target.https.html b/test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access-target.https.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access-target.https.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access-target.https.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html b/test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html.headers b/test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html.headers
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html.headers
rename to test/fixtures/wpt/fetch/private-network-access/resources/fenced-frame-private-network-access.https.html.headers
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fetcher.html b/test/fixtures/wpt/fetch/private-network-access/resources/fetcher.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fetcher.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/fetcher.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/fetcher.js b/test/fixtures/wpt/fetch/private-network-access/resources/fetcher.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/fetcher.js
rename to test/fixtures/wpt/fetch/private-network-access/resources/fetcher.js
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/iframed-no-preflight-received.html b/test/fixtures/wpt/fetch/private-network-access/resources/iframed-no-preflight-received.html
new file mode 100644
index 00000000000..20b5150d44a
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/iframed-no-preflight-received.html
@@ -0,0 +1,7 @@
+
+
+Iframed
+
diff --git a/test/wpt/tests/fetch/private-network-access/resources/iframed.html b/test/fixtures/wpt/fetch/private-network-access/resources/iframed.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/iframed.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/iframed.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/iframer.html b/test/fixtures/wpt/fetch/private-network-access/resources/iframer.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/iframer.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/iframer.html
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/no-preflight-received.html b/test/fixtures/wpt/fetch/private-network-access/resources/no-preflight-received.html
new file mode 100644
index 00000000000..5ee533e1820
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/no-preflight-received.html
@@ -0,0 +1,6 @@
+
+
+No preflight received
+
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/open-to-existing-window.html b/test/fixtures/wpt/fetch/private-network-access/resources/open-to-existing-window.html
new file mode 100644
index 00000000000..6460024bc80
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/open-to-existing-window.html
@@ -0,0 +1,12 @@
+
+
+Opener to an existing window
+
+
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/openee.html b/test/fixtures/wpt/fetch/private-network-access/resources/openee.html
new file mode 100644
index 00000000000..8f0a859cb32
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/openee.html
@@ -0,0 +1,8 @@
+
+
+Openee
+
diff --git a/test/wpt/tests/fetch/private-network-access/resources/opener.html b/test/fixtures/wpt/fetch/private-network-access/resources/opener.html
similarity index 63%
rename from test/wpt/tests/fetch/private-network-access/resources/opener.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/opener.html
index 40e3b60bb52..78b66c6db7b 100644
--- a/test/wpt/tests/fetch/private-network-access/resources/opener.html
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/opener.html
@@ -4,8 +4,8 @@
diff --git a/test/wpt/tests/fetch/private-network-access/resources/preflight.py b/test/fixtures/wpt/fetch/private-network-access/resources/preflight.py
similarity index 92%
rename from test/wpt/tests/fetch/private-network-access/resources/preflight.py
rename to test/fixtures/wpt/fetch/private-network-access/resources/preflight.py
index 255bd56a33e..44676632394 100644
--- a/test/wpt/tests/fetch/private-network-access/resources/preflight.py
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/preflight.py
@@ -78,9 +78,8 @@ def _get_response_headers(method, mode, origin):
return [
acam,
("Access-Control-Allow-Origin", origin),
- _ACAPN,
("Access-Control-Allow-Credentials", "true"),
- ("Access-Control-Allow-Headers", "Upgrade-Insecure-Requests")
+ _ACAPN,
]
return []
@@ -89,7 +88,8 @@ def _get_expect_single_preflight(request):
return request.GET.get(b"expect-single-preflight")
def _is_preflight_optional(request):
- return request.GET.get(b"is-preflight-optional")
+ return request.GET.get(b"is-preflight-optional") or \
+ request.GET.get(b"file-if-no-preflight-received")
def _get_preflight_uuid(request):
return request.GET.get(b"preflight-uuid")
@@ -129,8 +129,12 @@ def _handle_preflight_request(request, response):
return (headers, "preflight")
-def _final_response_body(request):
- file_name = request.GET.get(b"file")
+def _final_response_body(request, missing_preflight):
+ file_name = None
+ if missing_preflight and not request.GET.get(b"is-preflight-optional"):
+ file_name = request.GET.get(b"file-if-no-preflight-received")
+ if file_name is None:
+ file_name = request.GET.get(b"file")
if file_name is None:
return request.GET.get(b"body") or "success"
@@ -146,13 +150,14 @@ def _final_response_body(request):
return prefix + contents
def _handle_final_request(request, response):
+ missing_preflight = False
if _should_treat_as_public_once(request):
headers = [("Content-Security-Policy", "treat-as-public-address"),]
else:
uuid = _get_preflight_uuid(request)
if uuid is not None:
- if (request.server.stash.take(uuid) is None and
- not _is_preflight_optional(request)):
+ missing_preflight = request.server.stash.take(uuid) is None
+ if missing_preflight and not _is_preflight_optional(request):
return (405, [], "no preflight received")
request.server.stash.put(uuid, "final")
@@ -172,7 +177,7 @@ def _handle_final_request(request, response):
if _is_loaded_in_fenced_frame(request):
headers.append(("Supports-Loading-Mode", "fenced-frame"))
- body = _final_response_body(request)
+ body = _final_response_body(request, missing_preflight)
return (headers, body)
def main(request, response):
diff --git a/test/wpt/tests/fetch/private-network-access/resources/service-worker-bridge.html b/test/fixtures/wpt/fetch/private-network-access/resources/service-worker-bridge.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/service-worker-bridge.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/service-worker-bridge.html
diff --git a/test/fixtures/wpt/fetch/private-network-access/resources/service-worker-fetch-all.js b/test/fixtures/wpt/fetch/private-network-access/resources/service-worker-fetch-all.js
new file mode 100644
index 00000000000..78ac8d1576b
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/service-worker-fetch-all.js
@@ -0,0 +1,20 @@
+self.addEventListener("install", () => {
+ // Skip waiting before replacing the previously-active service worker, if any.
+ // This allows the bridge script to notice the controller change and query
+ // the install time via fetch.
+ self.skipWaiting();
+});
+
+self.addEventListener("activate", (event) => {
+ // Claim all clients so that the bridge script notices the activation.
+ event.waitUntil(self.clients.claim());
+});
+
+self.addEventListener("fetch", (event) => {
+ const url = new URL(event.request.url).searchParams.get("proxied-url");
+ if (url) {
+ event.respondWith(fetch(url));
+ } else {
+ event.respondWith(fetch(event.request));
+ }
+});
diff --git a/test/wpt/tests/fetch/private-network-access/resources/service-worker.js b/test/fixtures/wpt/fetch/private-network-access/resources/service-worker.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/service-worker.js
rename to test/fixtures/wpt/fetch/private-network-access/resources/service-worker.js
diff --git a/test/wpt/tests/fetch/private-network-access/resources/shared-fetcher.js b/test/fixtures/wpt/fetch/private-network-access/resources/shared-fetcher.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/shared-fetcher.js
rename to test/fixtures/wpt/fetch/private-network-access/resources/shared-fetcher.js
diff --git a/test/wpt/tests/fetch/private-network-access/resources/shared-worker-blob-fetcher.html b/test/fixtures/wpt/fetch/private-network-access/resources/shared-worker-blob-fetcher.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/shared-worker-blob-fetcher.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/shared-worker-blob-fetcher.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/shared-worker-fetcher.html b/test/fixtures/wpt/fetch/private-network-access/resources/shared-worker-fetcher.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/shared-worker-fetcher.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/shared-worker-fetcher.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/socket-opener.html b/test/fixtures/wpt/fetch/private-network-access/resources/socket-opener.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/socket-opener.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/socket-opener.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/support.sub.js b/test/fixtures/wpt/fetch/private-network-access/resources/support.sub.js
similarity index 85%
rename from test/wpt/tests/fetch/private-network-access/resources/support.sub.js
rename to test/fixtures/wpt/fetch/private-network-access/resources/support.sub.js
index c3bdb8139ba..7d133b02889 100644
--- a/test/wpt/tests/fetch/private-network-access/resources/support.sub.js
+++ b/test/fixtures/wpt/fetch/private-network-access/resources/support.sub.js
@@ -446,6 +446,10 @@ async function iframeTest(t, { source, target, expected }) {
const targetUrl = preflightUrl(target);
targetUrl.searchParams.set("file", "iframed.html");
targetUrl.searchParams.set("iframe-uuid", uuid);
+ targetUrl.searchParams.set(
+ "file-if-no-preflight-received",
+ "iframed-no-preflight-received.html",
+ );
const sourceUrl =
resolveUrl("resources/iframer.html", sourceResolveOptions(source));
@@ -470,13 +474,18 @@ async function iframeTest(t, { source, target, expected }) {
assert_equals(result, expected);
}
-const WindowOpenTestResult = {
+const NavigationTestResult = {
SUCCESS: "success",
- FAILURE: "failure",
+ FAILURE: "timeout",
};
async function windowOpenTest(t, { source, target, expected }) {
const targetUrl = preflightUrl(target);
+ targetUrl.searchParams.set("file", "openee.html");
+ targetUrl.searchParams.set(
+ "file-if-no-preflight-received",
+ "no-preflight-received.html",
+ );
const sourceUrl =
resolveUrl("resources/opener.html", sourceResolveOptions(source));
@@ -487,7 +496,69 @@ async function windowOpenTest(t, { source, target, expected }) {
iframe.contentWindow.postMessage({ url: targetUrl.href }, "*");
- assert_equals(await reply, expected);
+ const result = await Promise.race([
+ reply,
+ new Promise((resolve) => {
+ t.step_timeout(() => resolve("timeout"), 10000 /* ms */);
+ }),
+ ]);
+
+ assert_equals(result, expected);
+}
+
+async function windowOpenExistingTest(t, { source, target, expected }) {
+ const targetUrl = preflightUrl(target);
+ targetUrl.searchParams.set("file", "openee.html");
+ targetUrl.searchParams.set(
+ "file-if-no-preflight-received",
+ "no-preflight-received.html",
+ );
+
+ const sourceUrl = resolveUrl(
+ 'resources/open-to-existing-window.html', sourceResolveOptions(source));
+ sourceUrl.searchParams.set("url", targetUrl);
+ sourceUrl.searchParams.set("token", token());
+
+ const iframe = await appendIframe(t, document, sourceUrl);
+ const reply = futureMessage({ source: iframe.contentWindow });
+
+ iframe.contentWindow.postMessage({ url: targetUrl.href }, "*");
+
+ const result = await Promise.race([
+ reply,
+ new Promise((resolve) => {
+ t.step_timeout(() => resolve("timeout"), 10000 /* ms */);
+ }),
+ ]);
+
+ assert_equals(result, expected);
+}
+
+async function anchorTest(t, { source, target, expected }) {
+ const targetUrl = preflightUrl(target);
+ targetUrl.searchParams.set("file", "openee.html");
+ targetUrl.searchParams.set(
+ "file-if-no-preflight-received",
+ "no-preflight-received.html",
+ );
+
+ const sourceUrl =
+ resolveUrl("resources/anchor.html", sourceResolveOptions(source));
+ sourceUrl.searchParams.set("url", targetUrl);
+
+ const iframe = await appendIframe(t, document, sourceUrl);
+ const reply = futureMessage({ source: iframe.contentWindow });
+
+ iframe.contentWindow.postMessage({ url: targetUrl.href }, "*");
+
+ const result = await Promise.race([
+ reply,
+ new Promise((resolve) => {
+ t.step_timeout(() => resolve("timeout"), 10000 /* ms */);
+ }),
+ ]);
+
+ assert_equals(result, expected);
}
// Similar to `iframeTest`, but replaced iframes with fenced frames.
@@ -784,3 +855,66 @@ async function sharedWorkerBlobFetchTest(t, { source, target, expected }) {
assert_equals(status, expected.status, "response status");
assert_equals(body, expected.body, "response body");
}
+
+async function makeServiceWorkerTest(t, { source, target, expected, fetch_document=false }) {
+ const bridgeUrl = resolveUrl(
+ "resources/service-worker-bridge.html",
+ sourceResolveOptions({ server: source.server }));
+
+ const scriptUrl = fetch_document?
+ resolveUrl("resources/service-worker-fetch-all.js", sourceResolveOptions(source)):
+ resolveUrl("resources/service-worker.js", sourceResolveOptions(source));
+
+ const realTargetUrl = preflightUrl(target);
+
+ // Fetch a URL within the service worker's scope, but tell it which URL to
+ // really fetch.
+ const targetUrl = new URL("service-worker-proxy", scriptUrl);
+ targetUrl.searchParams.append("proxied-url", realTargetUrl.href);
+
+ const iframe = await appendIframe(t, document, bridgeUrl);
+
+ const request = (message) => {
+ const reply = futureMessage();
+ iframe.contentWindow.postMessage(message, "*");
+ return reply;
+ };
+
+ {
+ const { error, loaded } = await request({
+ action: "register",
+ url: scriptUrl.href,
+ });
+
+ assert_equals(error, undefined, "register error");
+ assert_true(loaded, "response loaded");
+ }
+
+ try {
+ const { controlled, numControllerChanges } = await request({
+ action: "wait",
+ numControllerChanges: 1,
+ });
+
+ assert_equals(numControllerChanges, 1, "controller change");
+ assert_true(controlled, "bridge script is controlled");
+
+ const { error, ok, body } = await request({
+ action: "fetch",
+ url: targetUrl.href,
+ });
+
+ assert_equals(error, expected.error, "fetch error");
+ assert_equals(ok, expected.ok, "response ok");
+ assert_equals(body, expected.body, "response body");
+ } finally {
+ // Always unregister the service worker.
+ const { error, unregistered } = await request({
+ action: "unregister",
+ scope: new URL("./", scriptUrl).href,
+ });
+
+ assert_equals(error, undefined, "unregister error");
+ assert_true(unregistered, "unregistered");
+ }
+}
diff --git a/test/wpt/tests/fetch/private-network-access/resources/worker-blob-fetcher.html b/test/fixtures/wpt/fetch/private-network-access/resources/worker-blob-fetcher.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/worker-blob-fetcher.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/worker-blob-fetcher.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/worker-fetcher.html b/test/fixtures/wpt/fetch/private-network-access/resources/worker-fetcher.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/worker-fetcher.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/worker-fetcher.html
diff --git a/test/wpt/tests/fetch/private-network-access/resources/worker-fetcher.js b/test/fixtures/wpt/fetch/private-network-access/resources/worker-fetcher.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/worker-fetcher.js
rename to test/fixtures/wpt/fetch/private-network-access/resources/worker-fetcher.js
diff --git a/test/wpt/tests/fetch/private-network-access/resources/xhr-sender.html b/test/fixtures/wpt/fetch/private-network-access/resources/xhr-sender.html
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/resources/xhr-sender.html
rename to test/fixtures/wpt/fetch/private-network-access/resources/xhr-sender.html
diff --git a/test/wpt/tests/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js
similarity index 99%
rename from test/wpt/tests/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js
index 6369b166e21..8d1028cc5ee 100644
--- a/test/wpt/tests/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/service-worker-background-fetch.tentative.https.window.js
@@ -1,5 +1,6 @@
// META: script=/common/utils.js
// META: script=resources/support.sub.js
+// META: timeout=long
//
// Spec: https://wicg.github.io/private-network-access/#integration-fetch
// Spec: https://wicg.github.io/background-fetch/
diff --git a/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document-treat-as-public.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document-treat-as-public.tentative.https.window.js
new file mode 100644
index 00000000000..6fc29ce4725
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document-treat-as-public.tentative.https.window.js
@@ -0,0 +1,101 @@
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+//
+// Spec: https://wicg.github.io/private-network-access/#integration-fetch
+//
+// These tests check that fetches from within `ServiceWorker` scripts are
+// subject to Private Network Access checks, just like fetches from within
+// documents.
+
+// Results that may be expected in tests.
+const TestResult = {
+ SUCCESS: { ok: true, body: "success" },
+ FAILURE: { error: "TypeError" },
+};
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {
+ server: Server.OTHER_HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
+ },
+ expected: TestResult.FAILURE,
+ fetch_document: true,
+}), "treat-as-public to local: failed preflight.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {
+ server: Server.OTHER_HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.success(token()),
+ response: ResponseBehavior.allowCrossOrigin(),
+ },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "treat-as-public to local: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTPS_LOCAL },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "treat-as-public to local (same-origin): no preflight required.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {
+ server: Server.HTTPS_PRIVATE,
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
+ },
+ expected: TestResult.FAILURE,
+ fetch_document: true,
+}), "treat-as-public to private: failed preflight.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {
+ server: Server.HTTPS_PRIVATE,
+ behavior: {
+ preflight: PreflightBehavior.success(token()),
+ response: ResponseBehavior.allowCrossOrigin(),
+ },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "treat-as-public to private: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {
+ server: Server.HTTPS_PUBLIC,
+ behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "treat-as-public to public: success.");
diff --git a/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document.tentative.https.window.js
new file mode 100644
index 00000000000..ec380555a80
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch-document.tentative.https.window.js
@@ -0,0 +1,114 @@
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+//
+// Spec: https://wicg.github.io/private-network-access/#integration-fetch
+//
+// These tests check that fetches from within `ServiceWorker` scripts are
+// subject to Private Network Access checks, just like fetches from within
+// documents.
+
+// Results that may be expected in tests.
+const TestResult = {
+ SUCCESS: { ok: true, body: "success" },
+ FAILURE: { error: "TypeError" },
+};
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_LOCAL },
+ target: { server: Server.HTTPS_LOCAL },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "local to local: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PRIVATE },
+ target: {
+ server: Server.HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
+ },
+ expected: TestResult.FAILURE,
+ fetch_document: true,
+}), "private to local: failed preflight.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PRIVATE },
+ target: {
+ server: Server.HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.success(token()),
+ response: ResponseBehavior.allowCrossOrigin(),
+ },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "private to local: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PRIVATE },
+ target: { server: Server.HTTPS_PRIVATE },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "private to private: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: {
+ server: Server.HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
+ },
+ expected: TestResult.FAILURE,
+ fetch_document: true,
+}), "public to local: failed preflight.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: {
+ server: Server.HTTPS_LOCAL,
+ behavior: {
+ preflight: PreflightBehavior.success(token()),
+ response: ResponseBehavior.allowCrossOrigin(),
+ },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "public to local: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: {
+ server: Server.HTTPS_PRIVATE,
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
+ },
+ expected: TestResult.FAILURE,
+ fetch_document: true,
+}), "public to private: failed preflight.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: {
+ server: Server.HTTPS_PRIVATE,
+ behavior: {
+ preflight: PreflightBehavior.success(token()),
+ response: ResponseBehavior.allowCrossOrigin(),
+ },
+ },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "public to private: success.");
+
+promise_test(t => makeServiceWorkerTest(t, {
+ source: { server: Server.HTTPS_PUBLIC },
+ target: { server: Server.HTTPS_PUBLIC },
+ expected: TestResult.SUCCESS,
+ fetch_document: true,
+}), "public to public: success.");
+
diff --git a/test/wpt/tests/fetch/private-network-access/service-worker-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch.tentative.https.window.js
similarity index 58%
rename from test/wpt/tests/fetch/private-network-access/service-worker-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/service-worker-fetch.tentative.https.window.js
index cb6d1f79b01..5fc5800ba04 100644
--- a/test/wpt/tests/fetch/private-network-access/service-worker-fetch.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/service-worker-fetch.tentative.https.window.js
@@ -16,84 +16,25 @@ const TestResult = {
FAILURE: { error: "TypeError" },
};
-async function makeTest(t, { source, target, expected }) {
- const bridgeUrl = resolveUrl(
- "resources/service-worker-bridge.html",
- sourceResolveOptions({ server: source.server }));
-
- const scriptUrl =
- resolveUrl("resources/service-worker.js", sourceResolveOptions(source));
-
- const realTargetUrl = preflightUrl(target);
-
- // Fetch a URL within the service worker's scope, but tell it which URL to
- // really fetch.
- const targetUrl = new URL("service-worker-proxy", scriptUrl);
- targetUrl.searchParams.append("proxied-url", realTargetUrl.href);
-
- const iframe = await appendIframe(t, document, bridgeUrl);
-
- const request = (message) => {
- const reply = futureMessage();
- iframe.contentWindow.postMessage(message, "*");
- return reply;
- };
-
- {
- const { error, loaded } = await request({
- action: "register",
- url: scriptUrl.href,
- });
-
- assert_equals(error, undefined, "register error");
- assert_true(loaded, "response loaded");
- }
-
- try {
- const { controlled, numControllerChanges } = await request({
- action: "wait",
- numControllerChanges: 1,
- });
-
- assert_equals(numControllerChanges, 1, "controller change");
- assert_true(controlled, "bridge script is controlled");
-
- const { error, ok, body } = await request({
- action: "fetch",
- url: targetUrl.href,
- });
-
- assert_equals(error, expected.error, "fetch error");
- assert_equals(ok, expected.ok, "response ok");
- assert_equals(body, expected.body, "response body");
- } finally {
- // Always unregister the service worker.
- const { error, unregistered } = await request({
- action: "unregister",
- scope: new URL("./", scriptUrl).href,
- });
-
- assert_equals(error, undefined, "unregister error");
- assert_true(unregistered, "unregistered");
- }
-}
-
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_LOCAL },
target: { server: Server.HTTPS_LOCAL },
expected: TestResult.SUCCESS,
}), "local to local: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: {
server: Server.HTTPS_LOCAL,
- behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
},
expected: TestResult.FAILURE,
}), "private to local: failed preflight.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: {
server: Server.HTTPS_LOCAL,
@@ -105,22 +46,25 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "private to local: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: { server: Server.HTTPS_PRIVATE },
expected: TestResult.SUCCESS,
}), "private to private: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: {
server: Server.HTTPS_LOCAL,
- behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
},
expected: TestResult.FAILURE,
}), "public to local: failed preflight.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: {
server: Server.HTTPS_LOCAL,
@@ -132,16 +76,19 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "public to local: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: {
server: Server.HTTPS_PRIVATE,
- behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
},
expected: TestResult.FAILURE,
}), "public to private: failed preflight.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: {
server: Server.HTTPS_PRIVATE,
@@ -153,25 +100,28 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "public to private: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: { server: Server.HTTPS_PUBLIC },
expected: TestResult.SUCCESS,
}), "public to public: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
},
target: {
server: Server.OTHER_HTTPS_LOCAL,
- behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
},
expected: TestResult.FAILURE,
}), "treat-as-public to local: failed preflight.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
@@ -186,7 +136,7 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "treat-as-public to local: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
@@ -195,19 +145,22 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "treat-as-public to local (same-origin): no preflight required.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
},
target: {
server: Server.HTTPS_PRIVATE,
- behavior: { response: ResponseBehavior.allowCrossOrigin() },
+ behavior: {
+ preflight: PreflightBehavior.failure(),
+ response: ResponseBehavior.allowCrossOrigin()
+ },
},
expected: TestResult.FAILURE,
}), "treat-as-public to private: failed preflight.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
@@ -222,7 +175,7 @@ subsetTest(promise_test, t => makeTest(t, {
expected: TestResult.SUCCESS,
}), "treat-as-public to private: success.");
-subsetTest(promise_test, t => makeTest(t, {
+subsetTest(promise_test, t => makeServiceWorkerTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
diff --git a/test/wpt/tests/fetch/private-network-access/service-worker-update.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker-update.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/service-worker-update.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/service-worker-update.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/service-worker.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/service-worker.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/service-worker.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/service-worker.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker-blob-fetch.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker-blob-fetch.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker-blob-fetch.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker-fetch.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker-fetch.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker-fetch.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker-fetch.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker-fetch.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/shared-worker.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/shared-worker.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/shared-worker.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/shared-worker.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/websocket.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/websocket.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/websocket.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/websocket.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/websocket.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/websocket.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/websocket.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/websocket.tentative.window.js
diff --git a/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.https.window.js
new file mode 100644
index 00000000000..6a2a624fc80
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.https.window.js
@@ -0,0 +1,209 @@
+// META: script=/common/subset-tests-by-key.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+// META: timeout=long
+// META: variant=?include=from-local
+// META: variant=?include=from-private
+// META: variant=?include=from-public
+// META: variant=?include=from-treat-as-public
+//
+// These tests verify that secure contexts can navigate to less-public address
+// spaces via window.open to an existing window iff the target server responds
+// affirmatively to preflight requests.
+
+setup(() => {
+ assert_true(window.isSecureContext);
+});
+
+// Source: secure local context.
+//
+// All fetches unaffected by Private Network Access.
+
+subsetTestByKey(
+ 'from-local', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_LOCAL},
+ target: {server: Server.HTTPS_LOCAL},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'local to local: no preflight required.');
+
+subsetTestByKey(
+ 'from-local', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_LOCAL},
+ target: {server: Server.HTTPS_PRIVATE},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'local to private: no preflight required.');
+
+subsetTestByKey(
+ 'from-local', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_LOCAL},
+ target: {server: Server.HTTPS_PUBLIC},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'local to public: no preflight required.');
+
+// Generates tests of preflight behavior for a single (source, target) pair.
+//
+// Scenarios:
+//
+// - preflight response has non-2xx HTTP code
+// - preflight response is missing CORS headers
+// - preflight response is missing the PNA-specific `Access-Control` header
+// - success
+//
+function makePreflightTests({
+ key,
+ sourceName,
+ sourceServer,
+ sourceTreatAsPublic,
+ targetName,
+ targetServer,
+}) {
+ const prefix =
+ `${sourceName} to ${targetName}: `;
+
+ const source = {
+ server: sourceServer,
+ treatAsPublic: sourceTreatAsPublic,
+ };
+
+ promise_test_parallel(t => windowOpenExistingTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.failure() },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "failed preflight.");
+
+ promise_test_parallel(t => windowOpenExistingTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.noCorsHeader(token()) },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "missing CORS headers.");
+
+ promise_test_parallel(t => windowOpenExistingTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.noPnaHeader(token()) },
+ },
+ expected: NavigationTestResult.FAILURE,
+ }), prefix + "missing PNA header.");
+
+ promise_test_parallel(t => windowOpenExistingTest(t, {
+ source,
+ target: {
+ server: targetServer,
+ behavior: { preflight: PreflightBehavior.navigation(token()) },
+ },
+ expected: NavigationTestResult.SUCCESS,
+ }), prefix + "success.");
+}
+
+// Source: private secure context.
+//
+// Navigating to the local address space require a successful preflight response
+// carrying a PNA-specific header.
+
+subsetTestByKey('from-private', makePreflightTests, {
+ sourceServer: Server.HTTPS_PRIVATE,
+ sourceName: 'private',
+ targetServer: Server.HTTPS_LOCAL,
+ targetName: 'local',
+});
+
+subsetTestByKey(
+ 'from-private', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_PRIVATE},
+ target: {server: Server.HTTPS_PRIVATE},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'private to private: no preflight required.');
+
+subsetTestByKey(
+ 'from-private', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_PRIVATE},
+ target: {server: Server.HTTPS_PUBLIC},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'private to public: no preflight required.');
+
+// Source: public secure context.
+//
+// Navigating to the local and private address spaces require a successful
+// preflight response carrying a PNA-specific header.
+
+subsetTestByKey('from-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_PUBLIC,
+ sourceName: "public",
+ targetServer: Server.HTTPS_LOCAL,
+ targetName: "local",
+});
+
+subsetTestByKey('from-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_PUBLIC,
+ sourceName: "public",
+ targetServer: Server.HTTPS_PRIVATE,
+ targetName: "private",
+});
+
+subsetTestByKey(
+ 'from-public', promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {server: Server.HTTPS_PUBLIC},
+ target: {server: Server.HTTPS_PUBLIC},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'public to public: no preflight required.');
+
+// The following tests verify that `CSP: treat-as-public-address` makes
+// documents behave as if they had been served from a public IP address.
+
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_LOCAL,
+ sourceTreatAsPublic: true,
+ sourceName: "treat-as-public-address",
+ targetServer: Server.OTHER_HTTPS_LOCAL,
+ targetName: "local",
+});
+
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {server: Server.HTTPS_LOCAL},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'treat-as-public-address to local (same-origin): no preflight required.');
+
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
+ sourceServer: Server.HTTPS_LOCAL,
+ sourceTreatAsPublic: true,
+ sourceName: 'treat-as-public-address',
+ targetServer: Server.HTTPS_PRIVATE,
+ targetName: 'private',
+});
+
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
+ t => windowOpenExistingTest(t, {
+ source: {
+ server: Server.HTTPS_LOCAL,
+ treatAsPublic: true,
+ },
+ target: {server: Server.HTTPS_PUBLIC},
+ expected: NavigationTestResult.SUCCESS,
+ }),
+ 'treat-as-public-address to public: no preflight required.');
diff --git a/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.window.js
new file mode 100644
index 00000000000..5a6cd4c5cfd
--- /dev/null
+++ b/test/fixtures/wpt/fetch/private-network-access/window-open-existing.tentative.window.js
@@ -0,0 +1,95 @@
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/utils.js
+// META: script=resources/support.sub.js
+// META: timeout=long
+//
+// Spec: https://wicg.github.io/private-network-access/
+//
+// These tests verify that non-secure contexts cannot navigate to less-public
+// address spaces via window.open to an existing window.
+
+setup(() => {
+ // Making sure we are in a non secure context, as expected.
+ assert_false(window.isSecureContext);
+});
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to local: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to private: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_LOCAL },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "local to public: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "private to local: failure.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to private: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PRIVATE },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "private to public: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "public to local: failure.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.FAILURE,
+}), "public to private: failure.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: { server: Server.HTTP_PUBLIC },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "public to public: no preflight required.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_LOCAL },
+ expected: NavigationTestResult.FAILURE,
+}), "treat-as-public-address to local: failure.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_PRIVATE },
+ expected: NavigationTestResult.FAILURE,
+}), "treat-as-public-address to private: failure.");
+
+promise_test_parallel(t => windowOpenExistingTest(t, {
+ source: {
+ server: Server.HTTP_LOCAL,
+ treatAsPublic: true,
+ },
+ target: { server: Server.HTTP_PUBLIC },
+ expected: NavigationTestResult.SUCCESS,
+}), "treat-as-public-address to public: no preflight required.");
diff --git a/test/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/window-open.tentative.https.window.js
similarity index 69%
rename from test/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/window-open.tentative.https.window.js
index 85b929f34d4..6793d1f3b4d 100644
--- a/test/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/window-open.tentative.https.window.js
@@ -1,10 +1,16 @@
+// META: script=/common/subset-tests-by-key.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/utils.js
// META: script=resources/support.sub.js
+// META: timeout=long
+// META: variant=?include=from-local
+// META: variant=?include=from-private
+// META: variant=?include=from-public
+// META: variant=?include=from-treat-as-public
//
-// These tests verify that secure contexts can navigate iframes to less-public
-// address spaces iff the target server responds affirmatively to preflight
-// requests.
+// These tests verify that secure contexts can navigate to less-public address
+// spaces via window.open iff the target server responds affirmatively to
+// preflight requests.
setup(() => {
assert_true(window.isSecureContext);
@@ -14,29 +20,28 @@ setup(() => {
//
// All fetches unaffected by Private Network Access.
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_LOCAL },
target: { server: Server.HTTPS_LOCAL },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to local: no preflight required.");
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_LOCAL },
target: { server: Server.HTTPS_PRIVATE },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to private: no preflight required.");
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_LOCAL },
target: { server: Server.HTTPS_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to public: no preflight required.");
// Generates tests of preflight behavior for a single (source, target) pair.
//
// Scenarios:
//
-// - parent navigates child:
// - preflight response has non-2xx HTTP code
// - preflight response is missing CORS headers
// - preflight response is missing the PNA-specific `Access-Control` header
@@ -64,7 +69,7 @@ function makePreflightTests({
server: targetServer,
behavior: { preflight: PreflightBehavior.failure() },
},
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), prefix + "failed preflight.");
promise_test_parallel(t => windowOpenTest(t, {
@@ -73,7 +78,7 @@ function makePreflightTests({
server: targetServer,
behavior: { preflight: PreflightBehavior.noCorsHeader(token()) },
},
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), prefix + "missing CORS headers.");
promise_test_parallel(t => windowOpenTest(t, {
@@ -82,16 +87,16 @@ function makePreflightTests({
server: targetServer,
behavior: { preflight: PreflightBehavior.noPnaHeader(token()) },
},
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), prefix + "missing PNA header.");
promise_test_parallel(t => windowOpenTest(t, {
source,
target: {
server: targetServer,
- behavior: { preflight: PreflightBehavior.success(token()) },
+ behavior: { preflight: PreflightBehavior.navigation(token()) },
},
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), prefix + "success.");
}
@@ -100,23 +105,23 @@ function makePreflightTests({
// Fetches to the local address space require a successful preflight response
// carrying a PNA-specific header.
-makePreflightTests({
+subsetTestByKey('from-private', makePreflightTests, {
sourceServer: Server.HTTPS_PRIVATE,
sourceName: 'private',
targetServer: Server.HTTPS_LOCAL,
targetName: 'local',
});
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-private", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: { server: Server.HTTPS_PRIVATE },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "private to private: no preflight required.");
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-private", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_PRIVATE },
target: { server: Server.HTTPS_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "private to public: no preflight required.");
// Source: public secure context.
@@ -124,30 +129,30 @@ promise_test_parallel(t => windowOpenTest(t, {
// Fetches to the local and private address spaces require a successful
// preflight response carrying a PNA-specific header.
-makePreflightTests({
+subsetTestByKey('from-public', makePreflightTests, {
sourceServer: Server.HTTPS_PUBLIC,
sourceName: "public",
targetServer: Server.HTTPS_LOCAL,
targetName: "local",
});
-makePreflightTests({
+subsetTestByKey('from-public', makePreflightTests, {
sourceServer: Server.HTTPS_PUBLIC,
sourceName: "public",
targetServer: Server.HTTPS_PRIVATE,
targetName: "private",
});
-promise_test_parallel(t => windowOpenTest(t, {
+subsetTestByKey("from-public", promise_test_parallel, t => windowOpenTest(t, {
source: { server: Server.HTTPS_PUBLIC },
target: { server: Server.HTTPS_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "public to public: no preflight required.");
// The following tests verify that `CSP: treat-as-public-address` makes
// documents behave as if they had been served from a public IP address.
-makePreflightTests({
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
sourceServer: Server.HTTPS_LOCAL,
sourceTreatAsPublic: true,
sourceName: "treat-as-public-address",
@@ -155,18 +160,18 @@ makePreflightTests({
targetName: "local",
});
-promise_test_parallel(
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
t => windowOpenTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
},
target: {server: Server.HTTPS_LOCAL},
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}),
'treat-as-public-address to local (same-origin): no preflight required.');
-makePreflightTests({
+subsetTestByKey('from-treat-as-public', makePreflightTests, {
sourceServer: Server.HTTPS_LOCAL,
sourceTreatAsPublic: true,
sourceName: 'treat-as-public-address',
@@ -174,14 +179,14 @@ makePreflightTests({
targetName: 'private',
});
-promise_test_parallel(
+subsetTestByKey("from-treat-as-public", promise_test_parallel,
t => windowOpenTest(t, {
source: {
server: Server.HTTPS_LOCAL,
treatAsPublic: true,
},
target: {server: Server.HTTPS_PUBLIC},
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}),
'treat-as-public-address to public: no preflight required.');
@@ -195,6 +200,6 @@ promise_test_parallel(
server: Server.HTTPS_PUBLIC,
behavior: {preflight: PreflightBehavior.optionalSuccess(token())}
},
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}),
'treat-as-public-address to local: optional preflight');
diff --git a/test/wpt/tests/fetch/private-network-access/window-open.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/window-open.tentative.window.js
similarity index 82%
rename from test/wpt/tests/fetch/private-network-access/window-open.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/window-open.tentative.window.js
index 8d023775226..5e2313d60a2 100644
--- a/test/wpt/tests/fetch/private-network-access/window-open.tentative.window.js
+++ b/test/fixtures/wpt/fetch/private-network-access/window-open.tentative.window.js
@@ -1,6 +1,7 @@
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/utils.js
// META: script=resources/support.sub.js
+// META: timeout=long
//
// Spec: https://wicg.github.io/private-network-access/
//
@@ -12,58 +13,58 @@ setup(() => {
assert_false(window.isSecureContext);
});
-promise_test(t => windowOpenTest(t, {
+promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_LOCAL },
target: { server: Server.HTTP_LOCAL },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to local: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_LOCAL },
target: { server: Server.HTTP_PRIVATE },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to private: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_LOCAL },
target: { server: Server.HTTP_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "local to public: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PRIVATE },
target: { server: Server.HTTP_LOCAL },
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), "private to local: failure.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PRIVATE },
target: { server: Server.HTTP_PRIVATE },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "private to private: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PRIVATE },
target: { server: Server.HTTP_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "private to public: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PUBLIC },
target: { server: Server.HTTP_LOCAL },
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), "public to local: failure.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PUBLIC },
target: { server: Server.HTTP_PRIVATE },
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), "public to private: failure.");
promise_test_parallel(t => windowOpenTest(t, {
source: { server: Server.HTTP_PUBLIC },
target: { server: Server.HTTP_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "public to public: no preflight required.");
promise_test_parallel(t => windowOpenTest(t, {
@@ -72,7 +73,7 @@ promise_test_parallel(t => windowOpenTest(t, {
treatAsPublic: true,
},
target: { server: Server.HTTP_LOCAL },
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), "treat-as-public-address to local: failure.");
promise_test_parallel(t => windowOpenTest(t, {
@@ -81,7 +82,7 @@ promise_test_parallel(t => windowOpenTest(t, {
treatAsPublic: true,
},
target: { server: Server.HTTP_PRIVATE },
- expected: WindowOpenTestResult.FAILURE,
+ expected: NavigationTestResult.FAILURE,
}), "treat-as-public-address to private: failure.");
promise_test_parallel(t => windowOpenTest(t, {
@@ -90,5 +91,5 @@ promise_test_parallel(t => windowOpenTest(t, {
treatAsPublic: true,
},
target: { server: Server.HTTP_PUBLIC },
- expected: WindowOpenTestResult.SUCCESS,
+ expected: NavigationTestResult.SUCCESS,
}), "treat-as-public-address to public: no preflight required.");
diff --git a/test/wpt/tests/fetch/private-network-access/worker-blob-fetch.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/worker-blob-fetch.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/worker-blob-fetch.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/worker-blob-fetch.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/worker-fetch.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/worker-fetch.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/worker-fetch.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/worker-fetch.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/worker-fetch.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/worker-fetch.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/worker-fetch.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/worker-fetch.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/worker.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/worker.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/worker.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/worker.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/worker.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/worker.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/worker.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/worker.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/xhr-from-treat-as-public.tentative.https.window.js b/test/fixtures/wpt/fetch/private-network-access/xhr-from-treat-as-public.tentative.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/xhr-from-treat-as-public.tentative.https.window.js
rename to test/fixtures/wpt/fetch/private-network-access/xhr-from-treat-as-public.tentative.https.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/xhr.https.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/xhr.https.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/xhr.https.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/xhr.https.tentative.window.js
diff --git a/test/wpt/tests/fetch/private-network-access/xhr.tentative.window.js b/test/fixtures/wpt/fetch/private-network-access/xhr.tentative.window.js
similarity index 100%
rename from test/wpt/tests/fetch/private-network-access/xhr.tentative.window.js
rename to test/fixtures/wpt/fetch/private-network-access/xhr.tentative.window.js
diff --git a/test/wpt/tests/fetch/range/blob.any.js b/test/fixtures/wpt/fetch/range/blob.any.js
similarity index 100%
rename from test/wpt/tests/fetch/range/blob.any.js
rename to test/fixtures/wpt/fetch/range/blob.any.js
diff --git a/test/wpt/tests/fetch/range/data.any.js b/test/fixtures/wpt/fetch/range/data.any.js
similarity index 100%
rename from test/wpt/tests/fetch/range/data.any.js
rename to test/fixtures/wpt/fetch/range/data.any.js
diff --git a/test/wpt/tests/fetch/range/general.any.js b/test/fixtures/wpt/fetch/range/general.any.js
similarity index 100%
rename from test/wpt/tests/fetch/range/general.any.js
rename to test/fixtures/wpt/fetch/range/general.any.js
diff --git a/test/wpt/tests/fetch/range/general.window.js b/test/fixtures/wpt/fetch/range/general.window.js
similarity index 100%
rename from test/wpt/tests/fetch/range/general.window.js
rename to test/fixtures/wpt/fetch/range/general.window.js
diff --git a/test/wpt/tests/fetch/range/non-matching-range-response.html b/test/fixtures/wpt/fetch/range/non-matching-range-response.html
similarity index 100%
rename from test/wpt/tests/fetch/range/non-matching-range-response.html
rename to test/fixtures/wpt/fetch/range/non-matching-range-response.html
diff --git a/test/fixtures/wpt/fetch/range/resources/basic.html b/test/fixtures/wpt/fetch/range/resources/basic.html
new file mode 100644
index 00000000000..0e76edd65b7
--- /dev/null
+++ b/test/fixtures/wpt/fetch/range/resources/basic.html
@@ -0,0 +1 @@
+
diff --git a/test/wpt/tests/fetch/range/resources/long-wav.py b/test/fixtures/wpt/fetch/range/resources/long-wav.py
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/long-wav.py
rename to test/fixtures/wpt/fetch/range/resources/long-wav.py
diff --git a/test/wpt/tests/fetch/range/resources/partial-script.py b/test/fixtures/wpt/fetch/range/resources/partial-script.py
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/partial-script.py
rename to test/fixtures/wpt/fetch/range/resources/partial-script.py
diff --git a/test/wpt/tests/fetch/range/resources/partial-text.py b/test/fixtures/wpt/fetch/range/resources/partial-text.py
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/partial-text.py
rename to test/fixtures/wpt/fetch/range/resources/partial-text.py
diff --git a/test/wpt/tests/fetch/range/resources/range-sw.js b/test/fixtures/wpt/fetch/range/resources/range-sw.js
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/range-sw.js
rename to test/fixtures/wpt/fetch/range/resources/range-sw.js
diff --git a/test/wpt/tests/fetch/range/resources/stash-take.py b/test/fixtures/wpt/fetch/range/resources/stash-take.py
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/stash-take.py
rename to test/fixtures/wpt/fetch/range/resources/stash-take.py
diff --git a/test/wpt/tests/fetch/range/resources/utils.js b/test/fixtures/wpt/fetch/range/resources/utils.js
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/utils.js
rename to test/fixtures/wpt/fetch/range/resources/utils.js
diff --git a/test/wpt/tests/fetch/range/resources/video-with-range.py b/test/fixtures/wpt/fetch/range/resources/video-with-range.py
similarity index 100%
rename from test/wpt/tests/fetch/range/resources/video-with-range.py
rename to test/fixtures/wpt/fetch/range/resources/video-with-range.py
diff --git a/test/wpt/tests/fetch/range/sw.https.window.js b/test/fixtures/wpt/fetch/range/sw.https.window.js
similarity index 100%
rename from test/wpt/tests/fetch/range/sw.https.window.js
rename to test/fixtures/wpt/fetch/range/sw.https.window.js
diff --git a/test/wpt/tests/fetch/redirect-navigate/302-found-post-handler.py b/test/fixtures/wpt/fetch/redirect-navigate/302-found-post-handler.py
similarity index 100%
rename from test/wpt/tests/fetch/redirect-navigate/302-found-post-handler.py
rename to test/fixtures/wpt/fetch/redirect-navigate/302-found-post-handler.py
diff --git a/test/wpt/tests/fetch/redirect-navigate/302-found-post.html b/test/fixtures/wpt/fetch/redirect-navigate/302-found-post.html
similarity index 100%
rename from test/wpt/tests/fetch/redirect-navigate/302-found-post.html
rename to test/fixtures/wpt/fetch/redirect-navigate/302-found-post.html
diff --git a/test/wpt/tests/fetch/redirect-navigate/preserve-fragment.html b/test/fixtures/wpt/fetch/redirect-navigate/preserve-fragment.html
similarity index 100%
rename from test/wpt/tests/fetch/redirect-navigate/preserve-fragment.html
rename to test/fixtures/wpt/fetch/redirect-navigate/preserve-fragment.html
diff --git a/test/wpt/tests/fetch/redirect-navigate/resources/destination.html b/test/fixtures/wpt/fetch/redirect-navigate/resources/destination.html
similarity index 100%
rename from test/wpt/tests/fetch/redirect-navigate/resources/destination.html
rename to test/fixtures/wpt/fetch/redirect-navigate/resources/destination.html
diff --git a/test/wpt/tests/fetch/redirects/data.window.js b/test/fixtures/wpt/fetch/redirects/data.window.js
similarity index 100%
rename from test/wpt/tests/fetch/redirects/data.window.js
rename to test/fixtures/wpt/fetch/redirects/data.window.js
diff --git a/test/wpt/tests/fetch/redirects/subresource-fragments.html b/test/fixtures/wpt/fetch/redirects/subresource-fragments.html
similarity index 100%
rename from test/wpt/tests/fetch/redirects/subresource-fragments.html
rename to test/fixtures/wpt/fetch/redirects/subresource-fragments.html
diff --git a/test/wpt/tests/fetch/security/1xx-response.any.js b/test/fixtures/wpt/fetch/security/1xx-response.any.js
similarity index 100%
rename from test/wpt/tests/fetch/security/1xx-response.any.js
rename to test/fixtures/wpt/fetch/security/1xx-response.any.js
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation-allowed-apis.tentative.https.html b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation-allowed-apis.tentative.https.html
new file mode 100644
index 00000000000..428decfc583
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation-allowed-apis.tentative.https.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
diff --git a/test/wpt/tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation-data-url.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
rename to test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation-data-url.tentative.sub.html
diff --git a/test/wpt/tests/fetch/security/dangling-markup-mitigation.tentative.html b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation.tentative.html
similarity index 100%
rename from test/wpt/tests/fetch/security/dangling-markup-mitigation.tentative.html
rename to test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation.tentative.html
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation.tentative.https.html b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation.tentative.https.html
new file mode 100644
index 00000000000..3f038cbb7be
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/dangling-markup-mitigation.tentative.https.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/media.html b/test/fixtures/wpt/fetch/security/dangling-markup/media.html
new file mode 100644
index 00000000000..2649edcf320
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/media.html
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/option.html b/test/fixtures/wpt/fetch/security/dangling-markup/option.html
new file mode 100644
index 00000000000..f528bed999b
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/option.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/resources/empty.html b/test/fixtures/wpt/fetch/security/dangling-markup/resources/empty.html
new file mode 100644
index 00000000000..0e76edd65b7
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/resources/empty.html
@@ -0,0 +1 @@
+
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/resources/helper.js b/test/fixtures/wpt/fetch/security/dangling-markup/resources/helper.js
new file mode 100644
index 00000000000..100bcba7b51
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/resources/helper.js
@@ -0,0 +1,63 @@
+function assert_no_message_from_frame(test, frame) {
+ window.addEventListener("message", test.step_func(e => {
+ assert_not_equals(e.source, frame.contentWindow);
+ }));
+}
+
+function appendFrameAndGetElement(test, frame) {
+ return new Promise((resolve, reject) => {
+ frame.onload = test.step_func(_ => {
+ frame.onload = null;
+ resolve(frame.contentDocument.querySelector('#dangling'));
+ });
+ document.body.appendChild(frame);
+ });
+}
+
+function appendAndSubmit(test, frame) {
+ return new Promise((resolve, reject) => {
+ frame.onload = test.step_func(_ => {
+ frame.onload = null;
+ frame.contentDocument.querySelector('form').addEventListener("error", _ => {
+ resolve("error");
+ });
+ frame.contentDocument.querySelector('form').addEventListener("submit", _ => {
+ resolve("submit");
+ });
+ frame.contentDocument.querySelector('[type=submit]').click();
+ });
+ document.body.appendChild(frame);
+ });
+}
+
+function assert_no_submission(test, frame) {
+ assert_no_message_from_frame(test, frame);
+
+ appendAndSubmit(test, frame)
+ .then(test.step_func_done(result => {
+ assert_equals(result, "error");
+ frame.remove();
+ }));
+}
+
+function assert_img_loaded(test, frame) {
+ appendFrameAndGetElement(test, frame)
+ .then(test.step_func_done(img => {
+ assert_equals(img.naturalHeight, 103, "Height");
+ assert_equals(img.naturalWidth, 76, "Width");
+ }));
+}
+
+function assert_img_not_loaded(test, frame) {
+ appendFrameAndGetElement(test, frame)
+ .then(test.step_func_done(img => {
+ assert_equals(img.naturalHeight, 0, "Height");
+ assert_equals(img.naturalWidth, 0, "Width");
+ }));
+}
+
+function createFrame(markup) {
+ var i = document.createElement('iframe');
+ i.srcdoc = `${markup}sekrit`;
+ return i;
+}
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/service-worker.js b/test/fixtures/wpt/fetch/security/dangling-markup/service-worker.js
new file mode 100644
index 00000000000..99d5456a874
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/service-worker.js
@@ -0,0 +1,41 @@
+const requests = new Set();
+
+addEventListener('install', evt => {
+ evt.waitUntil(self.skipWaiting());
+});
+
+addEventListener('activate', evt => {
+ evt.waitUntil(self.clients.claim());
+});
+
+addEventListener('message', evt => {
+ evt.source.postMessage(requests);
+});
+
+addEventListener('fetch', evt => {
+ const url = new URL(evt.request.url);
+ const path = url.pathname;
+ const search = url.search || "?";
+ const params = new URLSearchParams(search);
+ const type = params.get('type');
+ if (path.includes('404')) {
+ const dir = path.split('/');
+ const request = dir[dir.length-1] + search;
+ if (!requests.has(request)) {
+ requests.add(request);
+ }
+ evt.respondWith(new Response("", {
+ headers: {
+ "Content-Type": type || "text/plain"
+ }
+ }));
+ } else if (path.endsWith('resources.html')) {
+ const html = params.get('html') || "";
+ evt.respondWith(new Response(html, {
+ headers: {
+ "Content-Type": type || "text/html"
+ }
+ }));
+ }
+ return;
+});
diff --git a/test/fixtures/wpt/fetch/security/dangling-markup/textarea.html b/test/fixtures/wpt/fetch/security/dangling-markup/textarea.html
new file mode 100644
index 00000000000..c4b334edc99
--- /dev/null
+++ b/test/fixtures/wpt/fetch/security/dangling-markup/textarea.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
diff --git a/test/wpt/tests/fetch/security/embedded-credentials.tentative.sub.html b/test/fixtures/wpt/fetch/security/embedded-credentials.tentative.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/security/embedded-credentials.tentative.sub.html
rename to test/fixtures/wpt/fetch/security/embedded-credentials.tentative.sub.html
diff --git a/test/wpt/tests/fetch/security/redirect-to-url-with-credentials.https.html b/test/fixtures/wpt/fetch/security/redirect-to-url-with-credentials.https.html
similarity index 100%
rename from test/wpt/tests/fetch/security/redirect-to-url-with-credentials.https.html
rename to test/fixtures/wpt/fetch/security/redirect-to-url-with-credentials.https.html
diff --git a/test/wpt/tests/fetch/security/support/embedded-credential-window.sub.html b/test/fixtures/wpt/fetch/security/support/embedded-credential-window.sub.html
similarity index 100%
rename from test/wpt/tests/fetch/security/support/embedded-credential-window.sub.html
rename to test/fixtures/wpt/fetch/security/support/embedded-credential-window.sub.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/fetch-sw.https.html b/test/fixtures/wpt/fetch/stale-while-revalidate/fetch-sw.https.html
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/fetch-sw.https.html
rename to test/fixtures/wpt/fetch/stale-while-revalidate/fetch-sw.https.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/fetch.any.js b/test/fixtures/wpt/fetch/stale-while-revalidate/fetch.any.js
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/fetch.any.js
rename to test/fixtures/wpt/fetch/stale-while-revalidate/fetch.any.js
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/resources/stale-css.py b/test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-css.py
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/resources/stale-css.py
rename to test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-css.py
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/resources/stale-image.py b/test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-image.py
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/resources/stale-image.py
rename to test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-image.py
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/resources/stale-script.py b/test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-script.py
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/resources/stale-script.py
rename to test/fixtures/wpt/fetch/stale-while-revalidate/resources/stale-script.py
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/revalidate-not-blocked-by-csp.html b/test/fixtures/wpt/fetch/stale-while-revalidate/revalidate-not-blocked-by-csp.html
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/revalidate-not-blocked-by-csp.html
rename to test/fixtures/wpt/fetch/stale-while-revalidate/revalidate-not-blocked-by-csp.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/stale-css.html b/test/fixtures/wpt/fetch/stale-while-revalidate/stale-css.html
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/stale-css.html
rename to test/fixtures/wpt/fetch/stale-while-revalidate/stale-css.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/stale-image.html b/test/fixtures/wpt/fetch/stale-while-revalidate/stale-image.html
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/stale-image.html
rename to test/fixtures/wpt/fetch/stale-while-revalidate/stale-image.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/stale-script.html b/test/fixtures/wpt/fetch/stale-while-revalidate/stale-script.html
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/stale-script.html
rename to test/fixtures/wpt/fetch/stale-while-revalidate/stale-script.html
diff --git a/test/wpt/tests/fetch/stale-while-revalidate/sw-intercept.js b/test/fixtures/wpt/fetch/stale-while-revalidate/sw-intercept.js
similarity index 100%
rename from test/wpt/tests/fetch/stale-while-revalidate/sw-intercept.js
rename to test/fixtures/wpt/fetch/stale-while-revalidate/sw-intercept.js
diff --git a/test/wpt/tests/interfaces/ANGLE_instanced_arrays.idl b/test/fixtures/wpt/interfaces/ANGLE_instanced_arrays.idl
similarity index 100%
rename from test/wpt/tests/interfaces/ANGLE_instanced_arrays.idl
rename to test/fixtures/wpt/interfaces/ANGLE_instanced_arrays.idl
diff --git a/test/wpt/tests/interfaces/CSP.idl b/test/fixtures/wpt/interfaces/CSP.idl
similarity index 77%
rename from test/wpt/tests/interfaces/CSP.idl
rename to test/fixtures/wpt/interfaces/CSP.idl
index ac0a6ff5638..d4a6377ebb3 100644
--- a/test/wpt/tests/interfaces/CSP.idl
+++ b/test/fixtures/wpt/interfaces/CSP.idl
@@ -41,16 +41,16 @@ interface SecurityPolicyViolationEvent : Event {
};
dictionary SecurityPolicyViolationEventInit : EventInit {
- required USVString documentURI;
- USVString referrer = "";
- USVString blockedURI = "";
- required DOMString violatedDirective;
- required DOMString effectiveDirective;
- required DOMString originalPolicy;
- USVString sourceFile = "";
- DOMString sample = "";
- required SecurityPolicyViolationEventDisposition disposition;
- required unsigned short statusCode;
- unsigned long lineNumber = 0;
- unsigned long columnNumber = 0;
+ USVString documentURI = "";
+ USVString referrer = "";
+ USVString blockedURI = "";
+ DOMString violatedDirective = "";
+ DOMString effectiveDirective = "";
+ DOMString originalPolicy = "";
+ USVString sourceFile = "";
+ DOMString sample = "";
+ SecurityPolicyViolationEventDisposition disposition = "enforce";
+ unsigned short statusCode = 0;
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
};
diff --git a/test/fixtures/wpt/interfaces/DOM-Parsing.idl b/test/fixtures/wpt/interfaces/DOM-Parsing.idl
new file mode 100644
index 00000000000..af262607936
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/DOM-Parsing.idl
@@ -0,0 +1,10 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: DOM Parsing and Serialization (https://w3c.github.io/DOM-Parsing/)
+
+[Exposed=Window]
+interface XMLSerializer {
+ constructor();
+ DOMString serializeToString(Node root);
+};
diff --git a/test/wpt/tests/interfaces/EXT_blend_minmax.idl b/test/fixtures/wpt/interfaces/EXT_blend_minmax.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_blend_minmax.idl
rename to test/fixtures/wpt/interfaces/EXT_blend_minmax.idl
diff --git a/test/wpt/tests/interfaces/EXT_color_buffer_float.idl b/test/fixtures/wpt/interfaces/EXT_color_buffer_float.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_color_buffer_float.idl
rename to test/fixtures/wpt/interfaces/EXT_color_buffer_float.idl
diff --git a/test/wpt/tests/interfaces/EXT_color_buffer_half_float.idl b/test/fixtures/wpt/interfaces/EXT_color_buffer_half_float.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_color_buffer_half_float.idl
rename to test/fixtures/wpt/interfaces/EXT_color_buffer_half_float.idl
diff --git a/test/wpt/tests/interfaces/EXT_disjoint_timer_query.idl b/test/fixtures/wpt/interfaces/EXT_disjoint_timer_query.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_disjoint_timer_query.idl
rename to test/fixtures/wpt/interfaces/EXT_disjoint_timer_query.idl
diff --git a/test/wpt/tests/interfaces/EXT_disjoint_timer_query_webgl2.idl b/test/fixtures/wpt/interfaces/EXT_disjoint_timer_query_webgl2.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_disjoint_timer_query_webgl2.idl
rename to test/fixtures/wpt/interfaces/EXT_disjoint_timer_query_webgl2.idl
diff --git a/test/wpt/tests/interfaces/EXT_float_blend.idl b/test/fixtures/wpt/interfaces/EXT_float_blend.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_float_blend.idl
rename to test/fixtures/wpt/interfaces/EXT_float_blend.idl
diff --git a/test/wpt/tests/interfaces/EXT_frag_depth.idl b/test/fixtures/wpt/interfaces/EXT_frag_depth.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_frag_depth.idl
rename to test/fixtures/wpt/interfaces/EXT_frag_depth.idl
diff --git a/test/wpt/tests/interfaces/EXT_sRGB.idl b/test/fixtures/wpt/interfaces/EXT_sRGB.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_sRGB.idl
rename to test/fixtures/wpt/interfaces/EXT_sRGB.idl
diff --git a/test/wpt/tests/interfaces/EXT_shader_texture_lod.idl b/test/fixtures/wpt/interfaces/EXT_shader_texture_lod.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_shader_texture_lod.idl
rename to test/fixtures/wpt/interfaces/EXT_shader_texture_lod.idl
diff --git a/test/wpt/tests/interfaces/EXT_texture_compression_bptc.idl b/test/fixtures/wpt/interfaces/EXT_texture_compression_bptc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_texture_compression_bptc.idl
rename to test/fixtures/wpt/interfaces/EXT_texture_compression_bptc.idl
diff --git a/test/wpt/tests/interfaces/EXT_texture_compression_rgtc.idl b/test/fixtures/wpt/interfaces/EXT_texture_compression_rgtc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_texture_compression_rgtc.idl
rename to test/fixtures/wpt/interfaces/EXT_texture_compression_rgtc.idl
diff --git a/test/wpt/tests/interfaces/EXT_texture_filter_anisotropic.idl b/test/fixtures/wpt/interfaces/EXT_texture_filter_anisotropic.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_texture_filter_anisotropic.idl
rename to test/fixtures/wpt/interfaces/EXT_texture_filter_anisotropic.idl
diff --git a/test/wpt/tests/interfaces/EXT_texture_norm16.idl b/test/fixtures/wpt/interfaces/EXT_texture_norm16.idl
similarity index 100%
rename from test/wpt/tests/interfaces/EXT_texture_norm16.idl
rename to test/fixtures/wpt/interfaces/EXT_texture_norm16.idl
diff --git a/test/wpt/tests/interfaces/FedCM.idl b/test/fixtures/wpt/interfaces/FedCM.idl
similarity index 81%
rename from test/wpt/tests/interfaces/FedCM.idl
rename to test/fixtures/wpt/interfaces/FedCM.idl
index 9b18d951f83..4070d50fcd7 100644
--- a/test/wpt/tests/interfaces/FedCM.idl
+++ b/test/fixtures/wpt/interfaces/FedCM.idl
@@ -18,9 +18,19 @@ partial interface Navigator {
[SecureContext] readonly attribute NavigatorLogin login;
};
+dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig {
+ required USVString accountHint;
+};
+
[Exposed=Window, SecureContext]
interface IdentityCredential : Credential {
+ static Promise disconnect(optional IdentityCredentialDisconnectOptions options = {});
readonly attribute USVString? token;
+ readonly attribute boolean isAutoSelected;
+};
+
+dictionary DisconnectedAccount {
+ required USVString account_id;
};
partial dictionary CredentialRequestOptions {
@@ -35,15 +45,19 @@ enum IdentityCredentialRequestOptionsContext {
};
dictionary IdentityCredentialRequestOptions {
- required sequence providers;
+ required sequence providers;
IdentityCredentialRequestOptionsContext context = "signin";
};
dictionary IdentityProviderConfig {
required USVString configURL;
required USVString clientId;
+};
+
+dictionary IdentityProviderRequestOptions : IdentityProviderConfig {
USVString nonce;
DOMString loginHint;
+ DOMString domainHint;
};
dictionary IdentityProviderWellKnown {
@@ -67,6 +81,7 @@ dictionary IdentityProviderAPIConfig {
required USVString client_metadata_endpoint;
required USVString id_assertion_endpoint;
required USVString login_url;
+ USVString disconnect_endpoint;
IdentityProviderBranding branding;
};
@@ -78,6 +93,7 @@ dictionary IdentityProviderAccount {
USVString picture;
sequence approved_clients;
sequence login_hints;
+ sequence domain_hints;
};
dictionary IdentityProviderAccountList {
sequence accounts;
diff --git a/test/wpt/tests/interfaces/FileAPI.idl b/test/fixtures/wpt/interfaces/FileAPI.idl
similarity index 100%
rename from test/wpt/tests/interfaces/FileAPI.idl
rename to test/fixtures/wpt/interfaces/FileAPI.idl
diff --git a/test/wpt/tests/interfaces/IndexedDB.idl b/test/fixtures/wpt/interfaces/IndexedDB.idl
similarity index 100%
rename from test/wpt/tests/interfaces/IndexedDB.idl
rename to test/fixtures/wpt/interfaces/IndexedDB.idl
diff --git a/test/wpt/tests/interfaces/KHR_parallel_shader_compile.idl b/test/fixtures/wpt/interfaces/KHR_parallel_shader_compile.idl
similarity index 100%
rename from test/wpt/tests/interfaces/KHR_parallel_shader_compile.idl
rename to test/fixtures/wpt/interfaces/KHR_parallel_shader_compile.idl
diff --git a/test/wpt/tests/interfaces/META.yml b/test/fixtures/wpt/interfaces/META.yml
similarity index 100%
rename from test/wpt/tests/interfaces/META.yml
rename to test/fixtures/wpt/interfaces/META.yml
diff --git a/test/wpt/tests/interfaces/OES_draw_buffers_indexed.idl b/test/fixtures/wpt/interfaces/OES_draw_buffers_indexed.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_draw_buffers_indexed.idl
rename to test/fixtures/wpt/interfaces/OES_draw_buffers_indexed.idl
diff --git a/test/wpt/tests/interfaces/OES_element_index_uint.idl b/test/fixtures/wpt/interfaces/OES_element_index_uint.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_element_index_uint.idl
rename to test/fixtures/wpt/interfaces/OES_element_index_uint.idl
diff --git a/test/wpt/tests/interfaces/OES_fbo_render_mipmap.idl b/test/fixtures/wpt/interfaces/OES_fbo_render_mipmap.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_fbo_render_mipmap.idl
rename to test/fixtures/wpt/interfaces/OES_fbo_render_mipmap.idl
diff --git a/test/wpt/tests/interfaces/OES_standard_derivatives.idl b/test/fixtures/wpt/interfaces/OES_standard_derivatives.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_standard_derivatives.idl
rename to test/fixtures/wpt/interfaces/OES_standard_derivatives.idl
diff --git a/test/wpt/tests/interfaces/OES_texture_float.idl b/test/fixtures/wpt/interfaces/OES_texture_float.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_texture_float.idl
rename to test/fixtures/wpt/interfaces/OES_texture_float.idl
diff --git a/test/wpt/tests/interfaces/OES_texture_float_linear.idl b/test/fixtures/wpt/interfaces/OES_texture_float_linear.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_texture_float_linear.idl
rename to test/fixtures/wpt/interfaces/OES_texture_float_linear.idl
diff --git a/test/wpt/tests/interfaces/OES_texture_half_float.idl b/test/fixtures/wpt/interfaces/OES_texture_half_float.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_texture_half_float.idl
rename to test/fixtures/wpt/interfaces/OES_texture_half_float.idl
diff --git a/test/wpt/tests/interfaces/OES_texture_half_float_linear.idl b/test/fixtures/wpt/interfaces/OES_texture_half_float_linear.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_texture_half_float_linear.idl
rename to test/fixtures/wpt/interfaces/OES_texture_half_float_linear.idl
diff --git a/test/wpt/tests/interfaces/OES_vertex_array_object.idl b/test/fixtures/wpt/interfaces/OES_vertex_array_object.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OES_vertex_array_object.idl
rename to test/fixtures/wpt/interfaces/OES_vertex_array_object.idl
diff --git a/test/wpt/tests/interfaces/OVR_multiview2.idl b/test/fixtures/wpt/interfaces/OVR_multiview2.idl
similarity index 100%
rename from test/wpt/tests/interfaces/OVR_multiview2.idl
rename to test/fixtures/wpt/interfaces/OVR_multiview2.idl
diff --git a/test/wpt/tests/interfaces/README.md b/test/fixtures/wpt/interfaces/README.md
similarity index 100%
rename from test/wpt/tests/interfaces/README.md
rename to test/fixtures/wpt/interfaces/README.md
diff --git a/test/wpt/tests/interfaces/SVG.idl b/test/fixtures/wpt/interfaces/SVG.idl
similarity index 100%
rename from test/wpt/tests/interfaces/SVG.idl
rename to test/fixtures/wpt/interfaces/SVG.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_blend_equation_advanced_coherent.idl b/test/fixtures/wpt/interfaces/WEBGL_blend_equation_advanced_coherent.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_blend_equation_advanced_coherent.idl
rename to test/fixtures/wpt/interfaces/WEBGL_blend_equation_advanced_coherent.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_clip_cull_distance.idl b/test/fixtures/wpt/interfaces/WEBGL_clip_cull_distance.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_clip_cull_distance.idl
rename to test/fixtures/wpt/interfaces/WEBGL_clip_cull_distance.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_color_buffer_float.idl b/test/fixtures/wpt/interfaces/WEBGL_color_buffer_float.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_color_buffer_float.idl
rename to test/fixtures/wpt/interfaces/WEBGL_color_buffer_float.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_astc.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_astc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_astc.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_astc.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_etc.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_etc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_etc.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_etc.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_etc1.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_etc1.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_etc1.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_etc1.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_pvrtc.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_pvrtc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_pvrtc.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_pvrtc.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_s3tc.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_s3tc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_s3tc.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_s3tc.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_compressed_texture_s3tc_srgb.idl b/test/fixtures/wpt/interfaces/WEBGL_compressed_texture_s3tc_srgb.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_compressed_texture_s3tc_srgb.idl
rename to test/fixtures/wpt/interfaces/WEBGL_compressed_texture_s3tc_srgb.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_debug_renderer_info.idl b/test/fixtures/wpt/interfaces/WEBGL_debug_renderer_info.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_debug_renderer_info.idl
rename to test/fixtures/wpt/interfaces/WEBGL_debug_renderer_info.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_debug_shaders.idl b/test/fixtures/wpt/interfaces/WEBGL_debug_shaders.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_debug_shaders.idl
rename to test/fixtures/wpt/interfaces/WEBGL_debug_shaders.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_depth_texture.idl b/test/fixtures/wpt/interfaces/WEBGL_depth_texture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_depth_texture.idl
rename to test/fixtures/wpt/interfaces/WEBGL_depth_texture.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_draw_buffers.idl b/test/fixtures/wpt/interfaces/WEBGL_draw_buffers.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_draw_buffers.idl
rename to test/fixtures/wpt/interfaces/WEBGL_draw_buffers.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_draw_instanced_base_vertex_base_instance.idl b/test/fixtures/wpt/interfaces/WEBGL_draw_instanced_base_vertex_base_instance.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_draw_instanced_base_vertex_base_instance.idl
rename to test/fixtures/wpt/interfaces/WEBGL_draw_instanced_base_vertex_base_instance.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_lose_context.idl b/test/fixtures/wpt/interfaces/WEBGL_lose_context.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_lose_context.idl
rename to test/fixtures/wpt/interfaces/WEBGL_lose_context.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_multi_draw.idl b/test/fixtures/wpt/interfaces/WEBGL_multi_draw.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_multi_draw.idl
rename to test/fixtures/wpt/interfaces/WEBGL_multi_draw.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl b/test/fixtures/wpt/interfaces/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl
rename to test/fixtures/wpt/interfaces/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl
diff --git a/test/wpt/tests/interfaces/WEBGL_provoking_vertex.idl b/test/fixtures/wpt/interfaces/WEBGL_provoking_vertex.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WEBGL_provoking_vertex.idl
rename to test/fixtures/wpt/interfaces/WEBGL_provoking_vertex.idl
diff --git a/test/wpt/tests/interfaces/WebCryptoAPI.idl b/test/fixtures/wpt/interfaces/WebCryptoAPI.idl
similarity index 100%
rename from test/wpt/tests/interfaces/WebCryptoAPI.idl
rename to test/fixtures/wpt/interfaces/WebCryptoAPI.idl
diff --git a/test/wpt/tests/interfaces/accelerometer.idl b/test/fixtures/wpt/interfaces/accelerometer.idl
similarity index 100%
rename from test/wpt/tests/interfaces/accelerometer.idl
rename to test/fixtures/wpt/interfaces/accelerometer.idl
diff --git a/test/wpt/tests/interfaces/ambient-light.idl b/test/fixtures/wpt/interfaces/ambient-light.idl
similarity index 100%
rename from test/wpt/tests/interfaces/ambient-light.idl
rename to test/fixtures/wpt/interfaces/ambient-light.idl
diff --git a/test/wpt/tests/interfaces/anchors.idl b/test/fixtures/wpt/interfaces/anchors.idl
similarity index 100%
rename from test/wpt/tests/interfaces/anchors.idl
rename to test/fixtures/wpt/interfaces/anchors.idl
diff --git a/test/fixtures/wpt/interfaces/anonymous-iframe.idl b/test/fixtures/wpt/interfaces/anonymous-iframe.idl
new file mode 100644
index 00000000000..11d19e320a8
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/anonymous-iframe.idl
@@ -0,0 +1,12 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Iframe credentialless (https://wicg.github.io/anonymous-iframe/)
+
+partial interface HTMLIFrameElement {
+ attribute boolean credentialless;
+};
+
+partial interface Window {
+ readonly attribute boolean credentialless;
+};
diff --git a/test/wpt/tests/interfaces/attribution-reporting-api.idl b/test/fixtures/wpt/interfaces/attribution-reporting-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/attribution-reporting-api.idl
rename to test/fixtures/wpt/interfaces/attribution-reporting-api.idl
diff --git a/test/wpt/tests/interfaces/audio-output.idl b/test/fixtures/wpt/interfaces/audio-output.idl
similarity index 100%
rename from test/wpt/tests/interfaces/audio-output.idl
rename to test/fixtures/wpt/interfaces/audio-output.idl
diff --git a/test/wpt/tests/interfaces/audio-session.idl b/test/fixtures/wpt/interfaces/audio-session.idl
similarity index 100%
rename from test/wpt/tests/interfaces/audio-session.idl
rename to test/fixtures/wpt/interfaces/audio-session.idl
diff --git a/test/wpt/tests/interfaces/autoplay-detection.idl b/test/fixtures/wpt/interfaces/autoplay-detection.idl
similarity index 100%
rename from test/wpt/tests/interfaces/autoplay-detection.idl
rename to test/fixtures/wpt/interfaces/autoplay-detection.idl
diff --git a/test/wpt/tests/interfaces/background-fetch.idl b/test/fixtures/wpt/interfaces/background-fetch.idl
similarity index 100%
rename from test/wpt/tests/interfaces/background-fetch.idl
rename to test/fixtures/wpt/interfaces/background-fetch.idl
diff --git a/test/wpt/tests/interfaces/background-sync.idl b/test/fixtures/wpt/interfaces/background-sync.idl
similarity index 100%
rename from test/wpt/tests/interfaces/background-sync.idl
rename to test/fixtures/wpt/interfaces/background-sync.idl
diff --git a/test/wpt/tests/interfaces/badging.idl b/test/fixtures/wpt/interfaces/badging.idl
similarity index 100%
rename from test/wpt/tests/interfaces/badging.idl
rename to test/fixtures/wpt/interfaces/badging.idl
diff --git a/test/wpt/tests/interfaces/battery-status.idl b/test/fixtures/wpt/interfaces/battery-status.idl
similarity index 100%
rename from test/wpt/tests/interfaces/battery-status.idl
rename to test/fixtures/wpt/interfaces/battery-status.idl
diff --git a/test/wpt/tests/interfaces/beacon.idl b/test/fixtures/wpt/interfaces/beacon.idl
similarity index 100%
rename from test/wpt/tests/interfaces/beacon.idl
rename to test/fixtures/wpt/interfaces/beacon.idl
diff --git a/test/wpt/tests/interfaces/capture-handle-identity.idl b/test/fixtures/wpt/interfaces/capture-handle-identity.idl
similarity index 100%
rename from test/wpt/tests/interfaces/capture-handle-identity.idl
rename to test/fixtures/wpt/interfaces/capture-handle-identity.idl
diff --git a/test/wpt/tests/interfaces/captured-mouse-events.idl b/test/fixtures/wpt/interfaces/captured-mouse-events.idl
similarity index 100%
rename from test/wpt/tests/interfaces/captured-mouse-events.idl
rename to test/fixtures/wpt/interfaces/captured-mouse-events.idl
diff --git a/test/wpt/tests/interfaces/captured-mouse-events.tentative.idl b/test/fixtures/wpt/interfaces/captured-mouse-events.tentative.idl
similarity index 100%
rename from test/wpt/tests/interfaces/captured-mouse-events.tentative.idl
rename to test/fixtures/wpt/interfaces/captured-mouse-events.tentative.idl
diff --git a/test/wpt/tests/interfaces/clipboard-apis.idl b/test/fixtures/wpt/interfaces/clipboard-apis.idl
similarity index 100%
rename from test/wpt/tests/interfaces/clipboard-apis.idl
rename to test/fixtures/wpt/interfaces/clipboard-apis.idl
diff --git a/test/wpt/tests/interfaces/compat.idl b/test/fixtures/wpt/interfaces/compat.idl
similarity index 100%
rename from test/wpt/tests/interfaces/compat.idl
rename to test/fixtures/wpt/interfaces/compat.idl
diff --git a/test/wpt/tests/interfaces/compression.idl b/test/fixtures/wpt/interfaces/compression.idl
similarity index 100%
rename from test/wpt/tests/interfaces/compression.idl
rename to test/fixtures/wpt/interfaces/compression.idl
diff --git a/test/wpt/tests/interfaces/compute-pressure.idl b/test/fixtures/wpt/interfaces/compute-pressure.idl
similarity index 83%
rename from test/wpt/tests/interfaces/compute-pressure.idl
rename to test/fixtures/wpt/interfaces/compute-pressure.idl
index 3e35dc4ee2d..a90febffc3b 100644
--- a/test/wpt/tests/interfaces/compute-pressure.idl
+++ b/test/fixtures/wpt/interfaces/compute-pressure.idl
@@ -14,9 +14,9 @@ callback PressureUpdateCallback = undefined (
[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
interface PressureObserver {
- constructor(PressureUpdateCallback callback, optional PressureObserverOptions options = {});
+ constructor(PressureUpdateCallback callback);
- Promise observe(PressureSource source);
+ Promise observe(PressureSource source, optional PressureObserverOptions options = {});
undefined unobserve(PressureSource source);
undefined disconnect();
sequence takeRecords();
@@ -33,5 +33,5 @@ interface PressureRecord {
};
dictionary PressureObserverOptions {
- double sampleRate = 1.0;
+ [EnforceRange] unsigned long sampleInterval = 0;
};
diff --git a/test/wpt/tests/interfaces/console.idl b/test/fixtures/wpt/interfaces/console.idl
similarity index 100%
rename from test/wpt/tests/interfaces/console.idl
rename to test/fixtures/wpt/interfaces/console.idl
diff --git a/test/wpt/tests/interfaces/contact-picker.idl b/test/fixtures/wpt/interfaces/contact-picker.idl
similarity index 97%
rename from test/wpt/tests/interfaces/contact-picker.idl
rename to test/fixtures/wpt/interfaces/contact-picker.idl
index 0119d0e2ce6..fc589fa0669 100644
--- a/test/wpt/tests/interfaces/contact-picker.idl
+++ b/test/fixtures/wpt/interfaces/contact-picker.idl
@@ -37,7 +37,7 @@ dictionary ContactsSelectOptions {
boolean multiple = false;
};
-[Exposed=Window,SecureContext]
+[Exposed=Window, SecureContext]
interface ContactsManager {
Promise> getProperties();
Promise> select(sequence properties, optional ContactsSelectOptions options = {});
diff --git a/test/wpt/tests/interfaces/content-index.idl b/test/fixtures/wpt/interfaces/content-index.idl
similarity index 100%
rename from test/wpt/tests/interfaces/content-index.idl
rename to test/fixtures/wpt/interfaces/content-index.idl
diff --git a/test/wpt/tests/interfaces/cookie-store.idl b/test/fixtures/wpt/interfaces/cookie-store.idl
similarity index 100%
rename from test/wpt/tests/interfaces/cookie-store.idl
rename to test/fixtures/wpt/interfaces/cookie-store.idl
diff --git a/test/wpt/tests/interfaces/credential-management.idl b/test/fixtures/wpt/interfaces/credential-management.idl
similarity index 100%
rename from test/wpt/tests/interfaces/credential-management.idl
rename to test/fixtures/wpt/interfaces/credential-management.idl
diff --git a/test/wpt/tests/interfaces/csp-embedded-enforcement.idl b/test/fixtures/wpt/interfaces/csp-embedded-enforcement.idl
similarity index 100%
rename from test/wpt/tests/interfaces/csp-embedded-enforcement.idl
rename to test/fixtures/wpt/interfaces/csp-embedded-enforcement.idl
diff --git a/test/wpt/tests/interfaces/csp-next.idl b/test/fixtures/wpt/interfaces/csp-next.idl
similarity index 100%
rename from test/wpt/tests/interfaces/csp-next.idl
rename to test/fixtures/wpt/interfaces/csp-next.idl
diff --git a/test/fixtures/wpt/interfaces/css-anchor-position.idl b/test/fixtures/wpt/interfaces/css-anchor-position.idl
new file mode 100644
index 00000000000..5eeaa030b85
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/css-anchor-position.idl
@@ -0,0 +1,84 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: CSS Anchor Positioning (https://drafts.csswg.org/css-anchor-position-1/)
+
+[Exposed=Window]
+interface CSSPositionTryRule : CSSRule {
+ readonly attribute CSSOMString name;
+ [SameObject, PutForwards=cssText] readonly attribute CSSPositionTryDescriptors style;
+};
+
+[Exposed=Window]
+interface CSSPositionTryDescriptors : CSSStyleDeclaration {
+ attribute CSSOMString margin;
+ attribute CSSOMString marginTop;
+ attribute CSSOMString marginRight;
+ attribute CSSOMString marginBottom;
+ attribute CSSOMString marginLeft;
+ attribute CSSOMString marginBlock;
+ attribute CSSOMString marginBlockStart;
+ attribute CSSOMString marginBlockEnd;
+ attribute CSSOMString marginInline;
+ attribute CSSOMString marginInlineStart;
+ attribute CSSOMString marginInlineEnd;
+ attribute CSSOMString margin-top;
+ attribute CSSOMString margin-right;
+ attribute CSSOMString margin-bottom;
+ attribute CSSOMString margin-left;
+ attribute CSSOMString margin-block;
+ attribute CSSOMString margin-block-start;
+ attribute CSSOMString margin-block-end;
+ attribute CSSOMString margin-inline;
+ attribute CSSOMString margin-inline-start;
+ attribute CSSOMString margin-inline-end;
+ attribute CSSOMString inset;
+ attribute CSSOMString insetBlock;
+ attribute CSSOMString insetBlockStart;
+ attribute CSSOMString insetBlockEnd;
+ attribute CSSOMString insetInline;
+ attribute CSSOMString insetInlineStart;
+ attribute CSSOMString insetInlineEnd;
+ attribute CSSOMString top;
+ attribute CSSOMString left;
+ attribute CSSOMString right;
+ attribute CSSOMString bottom;
+ attribute CSSOMString inset-block;
+ attribute CSSOMString inset-block-start;
+ attribute CSSOMString inset-block-end;
+ attribute CSSOMString inset-inline;
+ attribute CSSOMString inset-inline-start;
+ attribute CSSOMString inset-inline-end;
+ attribute CSSOMString width;
+ attribute CSSOMString minWidth;
+ attribute CSSOMString maxWidth;
+ attribute CSSOMString height;
+ attribute CSSOMString minHeight;
+ attribute CSSOMString maxHeight;
+ attribute CSSOMString blockSize;
+ attribute CSSOMString minBlockSize;
+ attribute CSSOMString maxBlockSize;
+ attribute CSSOMString inlineSize;
+ attribute CSSOMString minInlineSize;
+ attribute CSSOMString maxInlineSize;
+ attribute CSSOMString min-width;
+ attribute CSSOMString max-width;
+ attribute CSSOMString min-height;
+ attribute CSSOMString max-height;
+ attribute CSSOMString block-size;
+ attribute CSSOMString min-block-size;
+ attribute CSSOMString max-block-size;
+ attribute CSSOMString inline-size;
+ attribute CSSOMString min-inline-size;
+ attribute CSSOMString max-inline-size;
+ attribute CSSOMString placeSelf;
+ attribute CSSOMString alignSelf;
+ attribute CSSOMString justifySelf;
+ attribute CSSOMString place-self;
+ attribute CSSOMString align-self;
+ attribute CSSOMString justify-self;
+ attribute CSSOMString positionAnchor;
+ attribute CSSOMString position-anchor;
+ attribute CSSOMString insetArea;
+ attribute CSSOMString inset-area;
+};
diff --git a/test/wpt/tests/interfaces/css-animation-worklet.idl b/test/fixtures/wpt/interfaces/css-animation-worklet.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-animation-worklet.idl
rename to test/fixtures/wpt/interfaces/css-animation-worklet.idl
diff --git a/test/wpt/tests/interfaces/css-animations-2.idl b/test/fixtures/wpt/interfaces/css-animations-2.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-animations-2.idl
rename to test/fixtures/wpt/interfaces/css-animations-2.idl
diff --git a/test/wpt/tests/interfaces/css-animations.idl b/test/fixtures/wpt/interfaces/css-animations.idl
similarity index 94%
rename from test/wpt/tests/interfaces/css-animations.idl
rename to test/fixtures/wpt/interfaces/css-animations.idl
index 6620e0156dc..14a99980690 100644
--- a/test/wpt/tests/interfaces/css-animations.idl
+++ b/test/fixtures/wpt/interfaces/css-animations.idl
@@ -24,7 +24,7 @@ partial interface CSSRule {
[Exposed=Window]
interface CSSKeyframeRule : CSSRule {
attribute CSSOMString keyText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
};
[Exposed=Window]
diff --git a/test/wpt/tests/interfaces/css-cascade-6.idl b/test/fixtures/wpt/interfaces/css-cascade-6.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-cascade-6.idl
rename to test/fixtures/wpt/interfaces/css-cascade-6.idl
diff --git a/test/wpt/tests/interfaces/css-cascade.idl b/test/fixtures/wpt/interfaces/css-cascade.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-cascade.idl
rename to test/fixtures/wpt/interfaces/css-cascade.idl
diff --git a/test/wpt/tests/interfaces/css-color-5.idl b/test/fixtures/wpt/interfaces/css-color-5.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-color-5.idl
rename to test/fixtures/wpt/interfaces/css-color-5.idl
diff --git a/test/wpt/tests/interfaces/css-conditional.idl b/test/fixtures/wpt/interfaces/css-conditional.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-conditional.idl
rename to test/fixtures/wpt/interfaces/css-conditional.idl
diff --git a/test/wpt/tests/interfaces/css-contain-3.idl b/test/fixtures/wpt/interfaces/css-contain-3.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-contain-3.idl
rename to test/fixtures/wpt/interfaces/css-contain-3.idl
diff --git a/test/wpt/tests/interfaces/css-contain.idl b/test/fixtures/wpt/interfaces/css-contain.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-contain.idl
rename to test/fixtures/wpt/interfaces/css-contain.idl
diff --git a/test/wpt/tests/interfaces/css-counter-styles.idl b/test/fixtures/wpt/interfaces/css-counter-styles.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-counter-styles.idl
rename to test/fixtures/wpt/interfaces/css-counter-styles.idl
diff --git a/test/wpt/tests/interfaces/css-font-loading.idl b/test/fixtures/wpt/interfaces/css-font-loading.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-font-loading.idl
rename to test/fixtures/wpt/interfaces/css-font-loading.idl
diff --git a/test/fixtures/wpt/interfaces/css-fonts.idl b/test/fixtures/wpt/interfaces/css-fonts.idl
new file mode 100644
index 00000000000..678f31323b8
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/css-fonts.idl
@@ -0,0 +1,70 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: CSS Fonts Module Level 4 (https://drafts.csswg.org/css-fonts-4/)
+
+[Exposed=Window]
+interface CSSFontFaceDescriptors : CSSStyleDeclaration {
+ attribute [LegacyNullToEmptyString] CSSOMString src;
+ attribute [LegacyNullToEmptyString] CSSOMString fontFamily;
+ attribute [LegacyNullToEmptyString] CSSOMString font-family;
+ attribute [LegacyNullToEmptyString] CSSOMString fontStyle;
+ attribute [LegacyNullToEmptyString] CSSOMString font-style;
+ attribute [LegacyNullToEmptyString] CSSOMString fontWeight;
+ attribute [LegacyNullToEmptyString] CSSOMString font-weight;
+ attribute [LegacyNullToEmptyString] CSSOMString fontStretch;
+ attribute [LegacyNullToEmptyString] CSSOMString font-stretch;
+ attribute [LegacyNullToEmptyString] CSSOMString fontWidth;
+ attribute [LegacyNullToEmptyString] CSSOMString font-width;
+ attribute [LegacyNullToEmptyString] CSSOMString unicodeRange;
+ attribute [LegacyNullToEmptyString] CSSOMString unicode-range;
+ attribute [LegacyNullToEmptyString] CSSOMString fontFeatureSettings;
+ attribute [LegacyNullToEmptyString] CSSOMString font-feature-settings;
+ attribute [LegacyNullToEmptyString] CSSOMString fontVariationSettings;
+ attribute [LegacyNullToEmptyString] CSSOMString font-variation-settings;
+ attribute [LegacyNullToEmptyString] CSSOMString fontNamedInstance;
+ attribute [LegacyNullToEmptyString] CSSOMString font-named-instance;
+ attribute [LegacyNullToEmptyString] CSSOMString fontDisplay;
+ attribute [LegacyNullToEmptyString] CSSOMString font-display;
+ attribute [LegacyNullToEmptyString] CSSOMString fontLanguageOverride;
+ attribute [LegacyNullToEmptyString] CSSOMString font-language-override;
+ attribute [LegacyNullToEmptyString] CSSOMString ascentOverride;
+ attribute [LegacyNullToEmptyString] CSSOMString ascent-override;
+ attribute [LegacyNullToEmptyString] CSSOMString descentOverride;
+ attribute [LegacyNullToEmptyString] CSSOMString descent-override;
+ attribute [LegacyNullToEmptyString] CSSOMString lineGapOverride;
+ attribute [LegacyNullToEmptyString] CSSOMString line-gap-override;
+};
+
+[Exposed=Window]
+interface CSSFontFaceRule : CSSRule {
+ readonly attribute CSSFontFaceDescriptors style;
+};
+
+partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14;
+};
+[Exposed=Window]
+interface CSSFontFeatureValuesRule : CSSRule {
+ attribute CSSOMString fontFamily;
+ readonly attribute CSSFontFeatureValuesMap annotation;
+ readonly attribute CSSFontFeatureValuesMap ornaments;
+ readonly attribute CSSFontFeatureValuesMap stylistic;
+ readonly attribute CSSFontFeatureValuesMap swash;
+ readonly attribute CSSFontFeatureValuesMap characterVariant;
+ readonly attribute CSSFontFeatureValuesMap styleset;
+ readonly attribute CSSFontFeatureValuesMap historicalForms;
+};
+
+[Exposed=Window]
+interface CSSFontFeatureValuesMap {
+ maplike>;
+ undefined set(CSSOMString featureValueName,
+ (unsigned long or sequence) values);
+};
+
+[Exposed=Window]interface CSSFontPaletteValuesRule : CSSRule {
+ readonly attribute CSSOMString name;
+ readonly attribute CSSOMString fontFamily;
+ readonly attribute CSSOMString basePalette;
+ readonly attribute CSSOMString overrideColors;
+};
diff --git a/test/wpt/tests/interfaces/css-highlight-api.idl b/test/fixtures/wpt/interfaces/css-highlight-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-highlight-api.idl
rename to test/fixtures/wpt/interfaces/css-highlight-api.idl
diff --git a/test/wpt/tests/interfaces/css-images-4.idl b/test/fixtures/wpt/interfaces/css-images-4.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-images-4.idl
rename to test/fixtures/wpt/interfaces/css-images-4.idl
diff --git a/test/wpt/tests/interfaces/css-layout-api.idl b/test/fixtures/wpt/interfaces/css-layout-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-layout-api.idl
rename to test/fixtures/wpt/interfaces/css-layout-api.idl
diff --git a/test/wpt/tests/interfaces/css-masking.idl b/test/fixtures/wpt/interfaces/css-masking.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-masking.idl
rename to test/fixtures/wpt/interfaces/css-masking.idl
diff --git a/test/wpt/tests/interfaces/css-nav.idl b/test/fixtures/wpt/interfaces/css-nav.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-nav.idl
rename to test/fixtures/wpt/interfaces/css-nav.idl
diff --git a/test/fixtures/wpt/interfaces/css-nesting.idl b/test/fixtures/wpt/interfaces/css-nesting.idl
new file mode 100644
index 00000000000..58d3247f904
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/css-nesting.idl
@@ -0,0 +1,9 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: CSS Nesting Module (https://drafts.csswg.org/css-nesting-1/)
+
+[Exposed=Window]
+interface CSSNestRule : CSSGroupingRule {
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
+};
diff --git a/test/wpt/tests/interfaces/css-paint-api.idl b/test/fixtures/wpt/interfaces/css-paint-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-paint-api.idl
rename to test/fixtures/wpt/interfaces/css-paint-api.idl
diff --git a/test/wpt/tests/interfaces/css-parser-api.idl b/test/fixtures/wpt/interfaces/css-parser-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-parser-api.idl
rename to test/fixtures/wpt/interfaces/css-parser-api.idl
diff --git a/test/wpt/tests/interfaces/css-properties-values-api.idl b/test/fixtures/wpt/interfaces/css-properties-values-api.idl
similarity index 76%
rename from test/wpt/tests/interfaces/css-properties-values-api.idl
rename to test/fixtures/wpt/interfaces/css-properties-values-api.idl
index eb7d7b027e7..418e78375be 100644
--- a/test/wpt/tests/interfaces/css-properties-values-api.idl
+++ b/test/fixtures/wpt/interfaces/css-properties-values-api.idl
@@ -16,8 +16,8 @@ partial namespace CSS {
[Exposed=Window]
interface CSSPropertyRule : CSSRule {
- readonly attribute CSSOMString name;
- readonly attribute CSSOMString syntax;
- readonly attribute boolean inherits;
- readonly attribute CSSOMString? initialValue;
+ readonly attribute CSSOMString name;
+ readonly attribute CSSOMString syntax;
+ readonly attribute boolean inherits;
+ readonly attribute CSSOMString? initialValue;
};
diff --git a/test/wpt/tests/interfaces/css-pseudo.idl b/test/fixtures/wpt/interfaces/css-pseudo.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-pseudo.idl
rename to test/fixtures/wpt/interfaces/css-pseudo.idl
diff --git a/test/wpt/tests/interfaces/css-regions.idl b/test/fixtures/wpt/interfaces/css-regions.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-regions.idl
rename to test/fixtures/wpt/interfaces/css-regions.idl
diff --git a/test/fixtures/wpt/interfaces/css-scroll-snap-2.idl b/test/fixtures/wpt/interfaces/css-scroll-snap-2.idl
new file mode 100644
index 00000000000..a346969c56a
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/css-scroll-snap-2.idl
@@ -0,0 +1,16 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: CSS Scroll Snap Module Level 2 (https://drafts.csswg.org/css-scroll-snap-2/)
+
+dictionary SnapEventInit : EventInit {
+ Node? snapTargetBlock;
+ Node? snapTargetInline;
+};
+
+[Exposed=Window]
+interface SnapEvent : Event {
+ constructor(DOMString type, optional SnapEventInit eventInitDict = {});
+ readonly attribute Node? snapTargetBlock;
+ readonly attribute Node? snapTargetInline;
+};
diff --git a/test/wpt/tests/interfaces/css-shadow-parts.idl b/test/fixtures/wpt/interfaces/css-shadow-parts.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-shadow-parts.idl
rename to test/fixtures/wpt/interfaces/css-shadow-parts.idl
diff --git a/test/wpt/tests/interfaces/css-transitions-2.idl b/test/fixtures/wpt/interfaces/css-transitions-2.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-transitions-2.idl
rename to test/fixtures/wpt/interfaces/css-transitions-2.idl
diff --git a/test/wpt/tests/interfaces/css-transitions.idl b/test/fixtures/wpt/interfaces/css-transitions.idl
similarity index 90%
rename from test/wpt/tests/interfaces/css-transitions.idl
rename to test/fixtures/wpt/interfaces/css-transitions.idl
index 0f00b2c014c..d4ff45e4862 100644
--- a/test/wpt/tests/interfaces/css-transitions.idl
+++ b/test/fixtures/wpt/interfaces/css-transitions.idl
@@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
-// Source: CSS Transitions (https://drafts.csswg.org/css-transitions-1/)
+// Source: CSS Transitions Level 1 (https://drafts.csswg.org/css-transitions-1/)
[Exposed=Window]
interface TransitionEvent : Event {
diff --git a/test/wpt/tests/interfaces/css-typed-om.idl b/test/fixtures/wpt/interfaces/css-typed-om.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-typed-om.idl
rename to test/fixtures/wpt/interfaces/css-typed-om.idl
diff --git a/test/wpt/tests/interfaces/css-view-transitions-2.idl b/test/fixtures/wpt/interfaces/css-view-transitions-2.idl
similarity index 68%
rename from test/wpt/tests/interfaces/css-view-transitions-2.idl
rename to test/fixtures/wpt/interfaces/css-view-transitions-2.idl
index fe1f0e30e7d..559870751a2 100644
--- a/test/wpt/tests/interfaces/css-view-transitions-2.idl
+++ b/test/fixtures/wpt/interfaces/css-view-transitions-2.idl
@@ -3,28 +3,34 @@
// (https://github.com/w3c/webref)
// Source: CSS View Transitions Module Level 2 (https://drafts.csswg.org/css-view-transitions-2/)
+partial interface CSSRule {
+ const unsigned short VIEW_TRANSITION_RULE = 15;
+};
+
+enum ViewTransitionNavigation { "auto", "none" };
+
+[Exposed=Window]
+interface CSSViewTransitionRule : CSSRule {
+ readonly attribute ViewTransitionNavigation navigation;
+ [SameObject] readonly attribute FrozenArray types;
+};
+
+[Exposed=Window]
+interface ViewTransitionTypeSet {
+ setlike;
+};
+
[Exposed=Window]
-interface PageRevealEvent : Event {
- readonly attribute ViewTransition? viewTransition;
+partial interface ViewTransition {
+ attribute ViewTransitionTypeSet types;
};
dictionary StartViewTransitionOptions {
UpdateCallback? update = null;
- sequence? type = null;
+ sequence? types = null;
};
partial interface Document {
ViewTransition startViewTransition(optional (UpdateCallback or StartViewTransitionOptions) callbackOptions = {});
};
-
-partial interface CSSRule {
- const unsigned short VIEW_TRANSITION_RULE = 15;
-};
-
-enum ViewTransitionNavigation { "auto", "none" };
-[Exposed=Window]
-interface CSSViewTransitionRule : CSSRule {
- attribute ViewTransitionNavigation navigation;
- attribute DOMTokenList type;
-};
diff --git a/test/wpt/tests/interfaces/css-view-transitions.idl b/test/fixtures/wpt/interfaces/css-view-transitions.idl
similarity index 100%
rename from test/wpt/tests/interfaces/css-view-transitions.idl
rename to test/fixtures/wpt/interfaces/css-view-transitions.idl
diff --git a/test/wpt/tests/interfaces/cssom-view.idl b/test/fixtures/wpt/interfaces/cssom-view.idl
similarity index 97%
rename from test/wpt/tests/interfaces/cssom-view.idl
rename to test/fixtures/wpt/interfaces/cssom-view.idl
index 4e531a26824..57e559e7f12 100644
--- a/test/wpt/tests/interfaces/cssom-view.idl
+++ b/test/fixtures/wpt/interfaces/cssom-view.idl
@@ -104,6 +104,9 @@ dictionary ScrollIntoViewOptions : ScrollOptions {
dictionary CheckVisibilityOptions {
boolean checkOpacity = false;
boolean checkVisibilityCSS = false;
+ boolean contentVisibilityAuto = false;
+ boolean opacityProperty = false;
+ boolean visibilityProperty = false;
};
partial interface Element {
@@ -127,6 +130,7 @@ partial interface Element {
readonly attribute long clientLeft;
readonly attribute long clientWidth;
readonly attribute long clientHeight;
+ readonly attribute double currentCSSZoom;
};
partial interface HTMLElement {
diff --git a/test/wpt/tests/interfaces/cssom.idl b/test/fixtures/wpt/interfaces/cssom.idl
similarity index 84%
rename from test/wpt/tests/interfaces/cssom.idl
rename to test/fixtures/wpt/interfaces/cssom.idl
index 94cd1912b91..005496e7ede 100644
--- a/test/wpt/tests/interfaces/cssom.idl
+++ b/test/fixtures/wpt/interfaces/cssom.idl
@@ -99,7 +99,7 @@ interface CSSRule {
[Exposed=Window]
interface CSSStyleRule : CSSGroupingRule {
attribute CSSOMString selectorText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
};
[Exposed=Window]
@@ -118,10 +118,26 @@ interface CSSGroupingRule : CSSRule {
undefined deleteRule(unsigned long index);
};
+[Exposed=Window]
+interface CSSPageDescriptors : CSSStyleDeclaration {
+ attribute [LegacyNullToEmptyString] CSSOMString margin;
+ attribute [LegacyNullToEmptyString] CSSOMString marginTop;
+ attribute [LegacyNullToEmptyString] CSSOMString marginRight;
+ attribute [LegacyNullToEmptyString] CSSOMString marginBottom;
+ attribute [LegacyNullToEmptyString] CSSOMString marginLeft;
+ attribute [LegacyNullToEmptyString] CSSOMString margin-top;
+ attribute [LegacyNullToEmptyString] CSSOMString margin-right;
+ attribute [LegacyNullToEmptyString] CSSOMString margin-bottom;
+ attribute [LegacyNullToEmptyString] CSSOMString margin-left;
+ attribute [LegacyNullToEmptyString] CSSOMString size;
+ attribute [LegacyNullToEmptyString] CSSOMString marks;
+ attribute [LegacyNullToEmptyString] CSSOMString bleed;
+};
+
[Exposed=Window]
interface CSSPageRule : CSSGroupingRule {
attribute CSSOMString selectorText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+ [SameObject, PutForwards=cssText] readonly attribute CSSPageDescriptors style;
};
[Exposed=Window]
@@ -146,6 +162,10 @@ interface CSSStyleDeclaration {
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
[CEReactions] CSSOMString removeProperty(CSSOMString property);
readonly attribute CSSRule? parentRule;
+};
+
+[Exposed=Window]
+interface CSSStyleProperties : CSSStyleDeclaration {
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
};
diff --git a/test/wpt/tests/interfaces/datacue.idl b/test/fixtures/wpt/interfaces/datacue.idl
similarity index 100%
rename from test/wpt/tests/interfaces/datacue.idl
rename to test/fixtures/wpt/interfaces/datacue.idl
diff --git a/test/wpt/tests/interfaces/deprecation-reporting.idl b/test/fixtures/wpt/interfaces/deprecation-reporting.idl
similarity index 100%
rename from test/wpt/tests/interfaces/deprecation-reporting.idl
rename to test/fixtures/wpt/interfaces/deprecation-reporting.idl
diff --git a/test/fixtures/wpt/interfaces/device-attributes.idl b/test/fixtures/wpt/interfaces/device-attributes.idl
new file mode 100644
index 00000000000..cf62523ad82
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/device-attributes.idl
@@ -0,0 +1,13 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Device Attributes API (https://wicg.github.io/WebApiDevice/device_attributes/)
+
+partial interface NavigatorManagedData {
+ // Device Attributes API.
+ Promise getAnnotatedAssetId();
+ Promise getAnnotatedLocation();
+ Promise getDirectoryId();
+ Promise getHostname();
+ Promise getSerialNumber();
+};
diff --git a/test/wpt/tests/interfaces/device-memory.idl b/test/fixtures/wpt/interfaces/device-memory.idl
similarity index 100%
rename from test/wpt/tests/interfaces/device-memory.idl
rename to test/fixtures/wpt/interfaces/device-memory.idl
diff --git a/test/wpt/tests/interfaces/device-posture.idl b/test/fixtures/wpt/interfaces/device-posture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/device-posture.idl
rename to test/fixtures/wpt/interfaces/device-posture.idl
diff --git a/test/wpt/tests/interfaces/digital-goods.idl b/test/fixtures/wpt/interfaces/digital-goods.idl
similarity index 100%
rename from test/wpt/tests/interfaces/digital-goods.idl
rename to test/fixtures/wpt/interfaces/digital-goods.idl
diff --git a/test/fixtures/wpt/interfaces/digital-identities.idl b/test/fixtures/wpt/interfaces/digital-identities.idl
new file mode 100644
index 00000000000..2d1b7208502
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/digital-identities.idl
@@ -0,0 +1,27 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Digital Credentials (https://wicg.github.io/digital-identities/)
+
+partial interface Navigator {
+ [SecureContext, SameObject] readonly attribute CredentialsContainer identity;
+};
+
+partial dictionary CredentialRequestOptions {
+ DigitalCredentialRequestOptions digital;
+};
+
+dictionary DigitalCredentialRequestOptions {
+ sequence providers;
+};
+
+dictionary IdentityRequestProvider {
+ required DOMString protocol;
+ required object request;
+};
+
+[Exposed=Window, SecureContext]
+interface DigitalCredential : Credential {
+ readonly attribute DOMString protocol;
+ [SameObject] readonly attribute Uint8Array data;
+};
diff --git a/test/wpt/tests/interfaces/document-picture-in-picture.idl b/test/fixtures/wpt/interfaces/document-picture-in-picture.idl
similarity index 96%
rename from test/wpt/tests/interfaces/document-picture-in-picture.idl
rename to test/fixtures/wpt/interfaces/document-picture-in-picture.idl
index f54f437a936..ed34b3c2160 100644
--- a/test/wpt/tests/interfaces/document-picture-in-picture.idl
+++ b/test/fixtures/wpt/interfaces/document-picture-in-picture.idl
@@ -20,6 +20,7 @@ interface DocumentPictureInPicture : EventTarget {
dictionary DocumentPictureInPictureOptions {
[EnforceRange] unsigned long long width = 0;
[EnforceRange] unsigned long long height = 0;
+ boolean disallowReturnToOpener = false;
};
[Exposed=Window, SecureContext]
diff --git a/test/wpt/tests/interfaces/dom.idl b/test/fixtures/wpt/interfaces/dom.idl
similarity index 96%
rename from test/wpt/tests/interfaces/dom.idl
rename to test/fixtures/wpt/interfaces/dom.idl
index 929fa8d03b3..72d61f5cfd8 100644
--- a/test/wpt/tests/interfaces/dom.idl
+++ b/test/fixtures/wpt/interfaces/dom.idl
@@ -120,9 +120,9 @@ interface mixin ParentNode {
readonly attribute Element? lastElementChild;
readonly attribute unsigned long childElementCount;
- [CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
- [CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
- [CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined prepend((Node or TrustedScript or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined append((Node or TrustedScript or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined replaceChildren((Node or TrustedScript or DOMString)... nodes);
Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
@@ -139,9 +139,9 @@ Element includes NonDocumentTypeChildNode;
CharacterData includes NonDocumentTypeChildNode;
interface mixin ChildNode {
- [CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
- [CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
- [CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined before((Node or TrustedScript or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined after((Node or TrustedScript or DOMString)... nodes);
+ [CEReactions, Unscopable] undefined replaceWith((Node or TrustedScript or DOMString)... nodes);
[CEReactions, Unscopable] undefined remove();
};
DocumentType includes ChildNode;
@@ -339,6 +339,8 @@ interface ShadowRoot : DocumentFragment {
readonly attribute ShadowRootMode mode;
readonly attribute boolean delegatesFocus;
readonly attribute SlotAssignmentMode slotAssignment;
+ readonly attribute boolean clonable;
+ readonly attribute boolean serializable;
readonly attribute Element host;
attribute EventHandler onslotchange;
};
@@ -397,6 +399,7 @@ dictionary ShadowRootInit {
boolean delegatesFocus = false;
SlotAssignmentMode slotAssignment = "named";
boolean clonable = false;
+ boolean serializable = false;
};
[Exposed=Window,
diff --git a/test/wpt/tests/interfaces/edit-context.idl b/test/fixtures/wpt/interfaces/edit-context.idl
similarity index 97%
rename from test/wpt/tests/interfaces/edit-context.idl
rename to test/fixtures/wpt/interfaces/edit-context.idl
index eb3174e25f5..60ddbafe758 100644
--- a/test/wpt/tests/interfaces/edit-context.idl
+++ b/test/fixtures/wpt/interfaces/edit-context.idl
@@ -59,7 +59,7 @@ interface TextUpdateEvent : Event {
readonly attribute unsigned long selectionEnd;
};
-enum UnderlineStyle { "none", "solid", "double", "dotted", "dashed", "wavy" };
+enum UnderlineStyle { "none", "solid", "dotted", "dashed", "wavy" };
enum UnderlineThickness { "none", "thin", "thick" };
dictionary TextFormatInit {
diff --git a/test/wpt/tests/interfaces/element-capture.idl b/test/fixtures/wpt/interfaces/element-capture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/element-capture.idl
rename to test/fixtures/wpt/interfaces/element-capture.idl
diff --git a/test/wpt/tests/interfaces/element-timing.idl b/test/fixtures/wpt/interfaces/element-timing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/element-timing.idl
rename to test/fixtures/wpt/interfaces/element-timing.idl
diff --git a/test/wpt/tests/interfaces/encoding.idl b/test/fixtures/wpt/interfaces/encoding.idl
similarity index 100%
rename from test/wpt/tests/interfaces/encoding.idl
rename to test/fixtures/wpt/interfaces/encoding.idl
diff --git a/test/wpt/tests/interfaces/encrypted-media.idl b/test/fixtures/wpt/interfaces/encrypted-media.idl
similarity index 100%
rename from test/wpt/tests/interfaces/encrypted-media.idl
rename to test/fixtures/wpt/interfaces/encrypted-media.idl
diff --git a/test/wpt/tests/interfaces/entries-api.idl b/test/fixtures/wpt/interfaces/entries-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/entries-api.idl
rename to test/fixtures/wpt/interfaces/entries-api.idl
diff --git a/test/wpt/tests/interfaces/event-timing.idl b/test/fixtures/wpt/interfaces/event-timing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/event-timing.idl
rename to test/fixtures/wpt/interfaces/event-timing.idl
diff --git a/test/wpt/tests/interfaces/eyedropper-api.idl b/test/fixtures/wpt/interfaces/eyedropper-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/eyedropper-api.idl
rename to test/fixtures/wpt/interfaces/eyedropper-api.idl
diff --git a/test/wpt/tests/interfaces/fenced-frame.idl b/test/fixtures/wpt/interfaces/fenced-frame.idl
similarity index 93%
rename from test/wpt/tests/interfaces/fenced-frame.idl
rename to test/fixtures/wpt/interfaces/fenced-frame.idl
index 0eed6a6b4ba..2107655aa92 100644
--- a/test/wpt/tests/interfaces/fenced-frame.idl
+++ b/test/fixtures/wpt/interfaces/fenced-frame.idl
@@ -52,7 +52,11 @@ dictionary FenceEvent {
DOMString eventType;
DOMString eventData;
sequence destination;
+
+ // When setting event data to be used later in an automatic beacon, the
+ // following properties are used:
boolean once = false;
+ boolean crossOriginExposed = false;
// When reporting to a custom destination URL (with substitution of macros defined by
// the Protected Audience buyer), the following property is used:
diff --git a/test/wpt/tests/interfaces/fetch.idl b/test/fixtures/wpt/interfaces/fetch.idl
similarity index 100%
rename from test/wpt/tests/interfaces/fetch.idl
rename to test/fixtures/wpt/interfaces/fetch.idl
diff --git a/test/wpt/tests/interfaces/fido.idl b/test/fixtures/wpt/interfaces/fido.idl
similarity index 100%
rename from test/wpt/tests/interfaces/fido.idl
rename to test/fixtures/wpt/interfaces/fido.idl
diff --git a/test/wpt/tests/interfaces/file-system-access.idl b/test/fixtures/wpt/interfaces/file-system-access.idl
similarity index 100%
rename from test/wpt/tests/interfaces/file-system-access.idl
rename to test/fixtures/wpt/interfaces/file-system-access.idl
diff --git a/test/wpt/tests/interfaces/filter-effects.idl b/test/fixtures/wpt/interfaces/filter-effects.idl
similarity index 100%
rename from test/wpt/tests/interfaces/filter-effects.idl
rename to test/fixtures/wpt/interfaces/filter-effects.idl
diff --git a/test/wpt/tests/interfaces/font-metrics-api.idl b/test/fixtures/wpt/interfaces/font-metrics-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/font-metrics-api.idl
rename to test/fixtures/wpt/interfaces/font-metrics-api.idl
diff --git a/test/wpt/tests/interfaces/fs.idl b/test/fixtures/wpt/interfaces/fs.idl
similarity index 100%
rename from test/wpt/tests/interfaces/fs.idl
rename to test/fixtures/wpt/interfaces/fs.idl
diff --git a/test/wpt/tests/interfaces/fullscreen.idl b/test/fixtures/wpt/interfaces/fullscreen.idl
similarity index 100%
rename from test/wpt/tests/interfaces/fullscreen.idl
rename to test/fixtures/wpt/interfaces/fullscreen.idl
diff --git a/test/wpt/tests/interfaces/gamepad-extensions.idl b/test/fixtures/wpt/interfaces/gamepad-extensions.idl
similarity index 63%
rename from test/wpt/tests/interfaces/gamepad-extensions.idl
rename to test/fixtures/wpt/interfaces/gamepad-extensions.idl
index d7d750654fd..81776a46ec9 100644
--- a/test/wpt/tests/interfaces/gamepad-extensions.idl
+++ b/test/fixtures/wpt/interfaces/gamepad-extensions.idl
@@ -9,38 +9,6 @@ enum GamepadHand {
"right"
};
-[Exposed=Window]
-interface GamepadHapticActuator {
- readonly attribute GamepadHapticActuatorType type;
- boolean canPlayEffectType(GamepadHapticEffectType type);
- Promise playEffect(
- GamepadHapticEffectType type,
- optional GamepadEffectParameters params = {});
- Promise pulse(double value, double duration);
- Promise reset();
-};
-
-enum GamepadHapticsResult {
- "complete",
- "preempted"
-};
-
-enum GamepadHapticActuatorType {
- "vibration",
- "dual-rumble"
-};
-
-enum GamepadHapticEffectType {
- "dual-rumble"
-};
-
-dictionary GamepadEffectParameters {
- double duration = 0.0;
- double startDelay = 0.0;
- double strongMagnitude = 0.0;
- double weakMagnitude = 0.0;
-};
-
[Exposed=Window]
interface GamepadPose {
readonly attribute boolean hasOrientation;
@@ -67,5 +35,9 @@ partial interface Gamepad {
readonly attribute FrozenArray hapticActuators;
readonly attribute GamepadPose? pose;
readonly attribute FrozenArray? touchEvents;
- [SameObject] readonly attribute GamepadHapticActuator? vibrationActuator;
+};
+
+[Exposed=Window]
+partial interface GamepadHapticActuator {
+ Promise pulse(double value, double duration);
};
diff --git a/test/wpt/tests/interfaces/gamepad.idl b/test/fixtures/wpt/interfaces/gamepad.idl
similarity index 59%
rename from test/wpt/tests/interfaces/gamepad.idl
rename to test/fixtures/wpt/interfaces/gamepad.idl
index bbc62da3c44..d922d7b80b0 100644
--- a/test/wpt/tests/interfaces/gamepad.idl
+++ b/test/fixtures/wpt/interfaces/gamepad.idl
@@ -3,7 +3,7 @@
// (https://github.com/w3c/webref)
// Source: Gamepad (https://w3c.github.io/gamepad/)
-[Exposed=Window, SecureContext]
+[Exposed=Window]
interface Gamepad {
readonly attribute DOMString id;
readonly attribute long index;
@@ -12,9 +12,10 @@ interface Gamepad {
readonly attribute GamepadMappingType mapping;
readonly attribute FrozenArray axes;
readonly attribute FrozenArray buttons;
+ [SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
};
-[Exposed=Window, SecureContext]
+[Exposed=Window]
interface GamepadButton {
readonly attribute boolean pressed;
readonly attribute boolean touched;
@@ -27,12 +28,41 @@ enum GamepadMappingType {
"xr-standard",
};
+[Exposed=Window]
+interface GamepadHapticActuator {
+ [SameObject] readonly attribute FrozenArray effects;
+ Promise playEffect(
+ GamepadHapticEffectType type,
+ optional GamepadEffectParameters params = {}
+ );
+ Promise reset();
+};
+
+enum GamepadHapticsResult {
+ "complete",
+ "preempted"
+};
+
+enum GamepadHapticEffectType {
+ "dual-rumble",
+ "trigger-rumble"
+};
+
+dictionary GamepadEffectParameters {
+ unsigned long long duration = 0;
+ unsigned long long startDelay = 0;
+ double strongMagnitude = 0.0;
+ double weakMagnitude = 0.0;
+ double leftTrigger = 0.0;
+ double rightTrigger = 0.0;
+};
+
[Exposed=Window]
partial interface Navigator {
sequence getGamepads();
};
-[Exposed=Window, SecureContext]
+[Exposed=Window]
interface GamepadEvent: Event {
constructor(DOMString type, GamepadEventInit eventInitDict);
diff --git a/test/wpt/tests/interfaces/generic-sensor.idl b/test/fixtures/wpt/interfaces/generic-sensor.idl
similarity index 100%
rename from test/wpt/tests/interfaces/generic-sensor.idl
rename to test/fixtures/wpt/interfaces/generic-sensor.idl
diff --git a/test/wpt/tests/interfaces/geolocation-sensor.idl b/test/fixtures/wpt/interfaces/geolocation-sensor.idl
similarity index 100%
rename from test/wpt/tests/interfaces/geolocation-sensor.idl
rename to test/fixtures/wpt/interfaces/geolocation-sensor.idl
diff --git a/test/wpt/tests/interfaces/geolocation.idl b/test/fixtures/wpt/interfaces/geolocation.idl
similarity index 96%
rename from test/wpt/tests/interfaces/geolocation.idl
rename to test/fixtures/wpt/interfaces/geolocation.idl
index 4b971f097ba..8c0acfc6cc1 100644
--- a/test/wpt/tests/interfaces/geolocation.idl
+++ b/test/fixtures/wpt/interfaces/geolocation.idl
@@ -42,6 +42,7 @@ dictionary PositionOptions {
interface GeolocationPosition {
readonly attribute GeolocationCoordinates coords;
readonly attribute EpochTimeStamp timestamp;
+ [Default] object toJSON();
};
[Exposed=Window, SecureContext]
@@ -53,6 +54,7 @@ interface GeolocationCoordinates {
readonly attribute double? altitudeAccuracy;
readonly attribute double? heading;
readonly attribute double? speed;
+ [Default] object toJSON();
};
[Exposed=Window]
diff --git a/test/wpt/tests/interfaces/geometry.idl b/test/fixtures/wpt/interfaces/geometry.idl
similarity index 100%
rename from test/wpt/tests/interfaces/geometry.idl
rename to test/fixtures/wpt/interfaces/geometry.idl
diff --git a/test/wpt/tests/interfaces/get-installed-related-apps.idl b/test/fixtures/wpt/interfaces/get-installed-related-apps.idl
similarity index 100%
rename from test/wpt/tests/interfaces/get-installed-related-apps.idl
rename to test/fixtures/wpt/interfaces/get-installed-related-apps.idl
diff --git a/test/wpt/tests/interfaces/gyroscope.idl b/test/fixtures/wpt/interfaces/gyroscope.idl
similarity index 100%
rename from test/wpt/tests/interfaces/gyroscope.idl
rename to test/fixtures/wpt/interfaces/gyroscope.idl
diff --git a/test/wpt/tests/interfaces/hr-time.idl b/test/fixtures/wpt/interfaces/hr-time.idl
similarity index 100%
rename from test/wpt/tests/interfaces/hr-time.idl
rename to test/fixtures/wpt/interfaces/hr-time.idl
diff --git a/test/wpt/tests/interfaces/html-media-capture.idl b/test/fixtures/wpt/interfaces/html-media-capture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/html-media-capture.idl
rename to test/fixtures/wpt/interfaces/html-media-capture.idl
diff --git a/test/wpt/tests/interfaces/html.idl b/test/fixtures/wpt/interfaces/html.idl
similarity index 96%
rename from test/wpt/tests/interfaces/html.idl
rename to test/fixtures/wpt/interfaces/html.idl
index b7501feea91..aad8994b87d 100644
--- a/test/wpt/tests/interfaces/html.idl
+++ b/test/fixtures/wpt/interfaces/html.idl
@@ -48,7 +48,7 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
[LegacyOverrideBuiltIns]
partial interface Document {
- static Document parseHTMLUnsafe(DOMString html);
+ static Document parseHTMLUnsafe(HTMLString html);
// resource metadata management
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
@@ -77,8 +77,8 @@ partial interface Document {
[CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
WindowProxy? open(USVString url, DOMString name, DOMString features);
[CEReactions] undefined close();
- [CEReactions] undefined write(DOMString... text);
- [CEReactions] undefined writeln(DOMString... text);
+ [CEReactions] undefined write(HTMLString... text);
+ [CEReactions] undefined writeln(HTMLString... text);
// user interaction
readonly attribute WindowProxy? defaultView;
@@ -123,6 +123,7 @@ interface HTMLElement : Element {
readonly attribute DOMString accessKeyLabel;
[CEReactions] attribute boolean draggable;
[CEReactions] attribute boolean spellcheck;
+ [CEReactions] attribute DOMString writingSuggestions;
[CEReactions] attribute DOMString autocapitalize;
[CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
@@ -451,7 +452,7 @@ interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src;
- [CEReactions] attribute DOMString srcdoc;
+ [CEReactions] attribute HTMLString srcdoc;
[CEReactions] attribute DOMString name;
[SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
[CEReactions] attribute DOMString allow;
@@ -1243,6 +1244,8 @@ interface HTMLTemplateElement : HTMLElement {
readonly attribute DocumentFragment content;
[CEReactions] attribute DOMString shadowRootMode;
[CEReactions] attribute boolean shadowRootDelegatesFocus;
+ [CEReactions] attribute boolean shadowRootClonable;
+ [CEReactions] attribute boolean shadowRootSerializable;
};
[Exposed=Window]
@@ -1577,7 +1580,6 @@ interface OffscreenCanvas : EventTarget {
[Exposed=(Window,Worker)]
interface OffscreenCanvasRenderingContext2D {
- undefined commit();
readonly attribute OffscreenCanvas canvas;
};
@@ -1633,6 +1635,9 @@ interface ElementInternals {
boolean reportValidity();
readonly attribute NodeList labels;
+
+ // Custom state pseudo-class
+ [SameObject] readonly attribute CustomStateSet states;
};
// Accessibility semantics
@@ -1651,6 +1656,11 @@ dictionary ValidityStateFlags {
boolean customError = false;
};
+[Exposed=Window]
+interface CustomStateSet {
+ setlike;
+};
+
[Exposed=(Window)]
interface VisibilityStateEntry : PerformanceEntry {
readonly attribute DOMString name; // shadows inherited name
@@ -1872,6 +1882,7 @@ interface Navigation : EventTarget {
readonly attribute NavigationHistoryEntry? currentEntry;
undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options);
readonly attribute NavigationTransition? transition;
+ readonly attribute NavigationActivation? activation;
readonly attribute boolean canGoBack;
readonly attribute boolean canGoForward;
@@ -1944,6 +1955,13 @@ interface NavigationTransition {
readonly attribute Promise finished;
};
+[Exposed=Window]
+interface NavigationActivation {
+ readonly attribute NavigationHistoryEntry? from;
+ readonly attribute NavigationHistoryEntry entry;
+ readonly attribute NavigationType navigationType;
+};
+
[Exposed=Window]
interface NavigateEvent : Event {
constructor(DOMString type, NavigateEventInit eventInitDict);
@@ -2044,6 +2062,28 @@ dictionary HashChangeEventInit : EventInit {
USVString newURL = "";
};
+[Exposed=Window]
+interface PageSwapEvent : Event {
+ constructor(DOMString type, optional PageSwapEventInit eventInitDict = {});
+ readonly attribute NavigationActivation? activation;
+ readonly attribute ViewTransition? viewTransition;
+};
+
+dictionary PageSwapEventInit : EventInit {
+ NavigationActivation? activation = null;
+ ViewTransition? viewTransition = null;
+};
+
+[Exposed=Window]
+interface PageRevealEvent : Event {
+ constructor(DOMString type, optional PageRevealEventInit eventInitDict = {});
+ readonly attribute ViewTransition? viewTransition;
+};
+
+dictionary PageRevealEventInit : EventInit {
+ ViewTransition? viewTransition = null;
+};
+
[Exposed=Window]
interface PageTransitionEvent : Event {
constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {});
@@ -2060,6 +2100,23 @@ interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};
+[Exposed=Window]
+interface NotRestoredReasonDetails {
+ readonly attribute DOMString reason;
+ [Default] object toJSON();
+};
+
+[Exposed=Window]
+interface NotRestoredReasons {
+ readonly attribute DOMString? src;
+ readonly attribute DOMString? id;
+ readonly attribute DOMString? name;
+ readonly attribute DOMString? url;
+ readonly attribute FrozenArray? reasons;
+ readonly attribute FrozenArray? children;
+ [Default] object toJSON();
+};
+
[Exposed=*]
interface ErrorEvent : Event {
constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
@@ -2083,12 +2140,12 @@ dictionary ErrorEventInit : EventInit {
interface PromiseRejectionEvent : Event {
constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
- readonly attribute Promise promise;
+ readonly attribute object promise;
readonly attribute any reason;
};
dictionary PromiseRejectionEventInit : EventInit {
- required Promise promise;
+ required object promise;
any reason;
};
@@ -2193,7 +2250,9 @@ interface mixin WindowEventHandlers {
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onpagehide;
+ attribute EventHandler onpagereveal;
attribute EventHandler onpageshow;
+ attribute EventHandler onpageswap;
attribute EventHandler onpopstate;
attribute EventHandler onrejectionhandled;
attribute EventHandler onstorage;
@@ -2233,11 +2292,32 @@ interface mixin WindowOrWorkerGlobalScope {
Window includes WindowOrWorkerGlobalScope;
WorkerGlobalScope includes WindowOrWorkerGlobalScope;
+partial interface Element {
+ [CEReactions] undefined setHTMLUnsafe(HTMLString html);
+ DOMString getHTML(optional GetHTMLOptions options = {});
+
+ [CEReactions] attribute [LegacyNullToEmptyString] HTMLString innerHTML;
+ [CEReactions] attribute [LegacyNullToEmptyString] HTMLString outerHTML;
+ [CEReactions] undefined insertAdjacentHTML(DOMString position, HTMLString string);
+};
+
+partial interface ShadowRoot {
+ [CEReactions] undefined setHTMLUnsafe(HTMLString html);
+ DOMString getHTML(optional GetHTMLOptions options = {});
+
+ [CEReactions] attribute [LegacyNullToEmptyString] HTMLString innerHTML;
+};
+
+dictionary GetHTMLOptions {
+ boolean serializableShadowRoots = false;
+ sequence shadowRoots = [];
+};
+
[Exposed=Window]
interface DOMParser {
constructor();
- [NewObject] Document parseFromString(DOMString string, DOMParserSupportedType type);
+ [NewObject] Document parseFromString(HTMLString string, DOMParserSupportedType type);
};
enum DOMParserSupportedType {
@@ -2248,12 +2328,8 @@ enum DOMParserSupportedType {
"image/svg+xml"
};
-partial interface Element {
- undefined setHTMLUnsafe(DOMString html);
-};
-
-partial interface ShadowRoot {
- undefined setHTMLUnsafe(DOMString html);
+partial interface Range {
+ [CEReactions, NewObject] DocumentFragment createContextualFragment(HTMLString string);
};
[Exposed=Window]
@@ -2445,6 +2521,7 @@ interface MessagePort : EventTarget {
// event handlers
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
+ attribute EventHandler onclose;
};
dictionary StructuredSerializeOptions {
@@ -2467,7 +2544,7 @@ interface WorkerGlobalScope : EventTarget {
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
readonly attribute WorkerNavigator navigator;
- undefined importScripts(USVString... urls);
+ undefined importScripts(ScriptURLString... urls);
attribute OnErrorEventHandler onerror;
attribute EventHandler onlanguagechange;
@@ -2505,7 +2582,7 @@ interface mixin AbstractWorker {
[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
- constructor(USVString scriptURL, optional WorkerOptions options = {});
+ constructor(ScriptURLString scriptURL, optional WorkerOptions options = {});
undefined terminate();
@@ -2527,7 +2604,7 @@ Worker includes AbstractWorker;
[Exposed=Window]
interface SharedWorker : EventTarget {
- constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
+ constructor(ScriptURLString scriptURL, optional (DOMString or WorkerOptions) options = {});
readonly attribute MessagePort port;
};
diff --git a/test/wpt/tests/interfaces/idle-detection.idl b/test/fixtures/wpt/interfaces/idle-detection.idl
similarity index 100%
rename from test/wpt/tests/interfaces/idle-detection.idl
rename to test/fixtures/wpt/interfaces/idle-detection.idl
diff --git a/test/wpt/tests/interfaces/image-capture.idl b/test/fixtures/wpt/interfaces/image-capture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/image-capture.idl
rename to test/fixtures/wpt/interfaces/image-capture.idl
diff --git a/test/wpt/tests/interfaces/image-resource.idl b/test/fixtures/wpt/interfaces/image-resource.idl
similarity index 100%
rename from test/wpt/tests/interfaces/image-resource.idl
rename to test/fixtures/wpt/interfaces/image-resource.idl
diff --git a/test/wpt/tests/interfaces/ink-enhancement.idl b/test/fixtures/wpt/interfaces/ink-enhancement.idl
similarity index 100%
rename from test/wpt/tests/interfaces/ink-enhancement.idl
rename to test/fixtures/wpt/interfaces/ink-enhancement.idl
diff --git a/test/wpt/tests/interfaces/input-device-capabilities.idl b/test/fixtures/wpt/interfaces/input-device-capabilities.idl
similarity index 100%
rename from test/wpt/tests/interfaces/input-device-capabilities.idl
rename to test/fixtures/wpt/interfaces/input-device-capabilities.idl
diff --git a/test/wpt/tests/interfaces/input-events.idl b/test/fixtures/wpt/interfaces/input-events.idl
similarity index 100%
rename from test/wpt/tests/interfaces/input-events.idl
rename to test/fixtures/wpt/interfaces/input-events.idl
diff --git a/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl b/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl
new file mode 100644
index 00000000000..f89af4d7341
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl
@@ -0,0 +1,7 @@
+interface mixin InterestInvokerElement {
+ [CEReactions,Reflect=interesttarget] attribute Element? interestTargetElement;
+};
+
+HTMLInputElement includes InterestInvokerElement;
+HTMLButtonElement includes InterestInvokerElement;
+HTMLAnchorElement includes InterestInvokerElement;
\ No newline at end of file
diff --git a/test/wpt/tests/interfaces/intersection-observer.idl b/test/fixtures/wpt/interfaces/intersection-observer.idl
similarity index 100%
rename from test/wpt/tests/interfaces/intersection-observer.idl
rename to test/fixtures/wpt/interfaces/intersection-observer.idl
diff --git a/test/wpt/tests/interfaces/intervention-reporting.idl b/test/fixtures/wpt/interfaces/intervention-reporting.idl
similarity index 100%
rename from test/wpt/tests/interfaces/intervention-reporting.idl
rename to test/fixtures/wpt/interfaces/intervention-reporting.idl
diff --git a/test/wpt/tests/interfaces/invokers.tentative.idl b/test/fixtures/wpt/interfaces/invokers.tentative.idl
similarity index 74%
rename from test/wpt/tests/interfaces/invokers.tentative.idl
rename to test/fixtures/wpt/interfaces/invokers.tentative.idl
index 62f7398b827..eb1b8247f06 100644
--- a/test/wpt/tests/interfaces/invokers.tentative.idl
+++ b/test/fixtures/wpt/interfaces/invokers.tentative.idl
@@ -1,6 +1,6 @@
interface mixin InvokerElement {
[CEReactions,Reflect=invoketarget] attribute Element? invokeTargetElement;
- [CEReactions,Reflect,ReflectMissing="auto",ReflectEmpty="auto"] attribute DOMString invokeAction;
+ [CEReactions,Reflect=invokeaction] attribute DOMString invokeAction;
};
interface InvokeEvent : Event {
@@ -11,5 +11,5 @@ interface InvokeEvent : Event {
dictionary InvokeEventInit : EventInit {
Element? invoker = null;
- DOMString action = "auto";
+ DOMString action = "";
};
diff --git a/test/wpt/tests/interfaces/is-input-pending.idl b/test/fixtures/wpt/interfaces/is-input-pending.idl
similarity index 100%
rename from test/wpt/tests/interfaces/is-input-pending.idl
rename to test/fixtures/wpt/interfaces/is-input-pending.idl
diff --git a/test/wpt/tests/interfaces/js-self-profiling.idl b/test/fixtures/wpt/interfaces/js-self-profiling.idl
similarity index 100%
rename from test/wpt/tests/interfaces/js-self-profiling.idl
rename to test/fixtures/wpt/interfaces/js-self-profiling.idl
diff --git a/test/wpt/tests/interfaces/keyboard-lock.idl b/test/fixtures/wpt/interfaces/keyboard-lock.idl
similarity index 100%
rename from test/wpt/tests/interfaces/keyboard-lock.idl
rename to test/fixtures/wpt/interfaces/keyboard-lock.idl
diff --git a/test/wpt/tests/interfaces/keyboard-map.idl b/test/fixtures/wpt/interfaces/keyboard-map.idl
similarity index 100%
rename from test/wpt/tests/interfaces/keyboard-map.idl
rename to test/fixtures/wpt/interfaces/keyboard-map.idl
diff --git a/test/wpt/tests/interfaces/largest-contentful-paint.idl b/test/fixtures/wpt/interfaces/largest-contentful-paint.idl
similarity index 100%
rename from test/wpt/tests/interfaces/largest-contentful-paint.idl
rename to test/fixtures/wpt/interfaces/largest-contentful-paint.idl
diff --git a/test/wpt/tests/interfaces/layout-instability.idl b/test/fixtures/wpt/interfaces/layout-instability.idl
similarity index 100%
rename from test/wpt/tests/interfaces/layout-instability.idl
rename to test/fixtures/wpt/interfaces/layout-instability.idl
diff --git a/test/wpt/tests/interfaces/local-font-access.idl b/test/fixtures/wpt/interfaces/local-font-access.idl
similarity index 100%
rename from test/wpt/tests/interfaces/local-font-access.idl
rename to test/fixtures/wpt/interfaces/local-font-access.idl
diff --git a/test/fixtures/wpt/interfaces/long-animation-frames.idl b/test/fixtures/wpt/interfaces/long-animation-frames.idl
new file mode 100644
index 00000000000..79a42ca8f0a
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/long-animation-frames.idl
@@ -0,0 +1,54 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Long Animation Frames API (https://w3c.github.io/long-animation-frames/)
+
+[Exposed=Window]
+interface PerformanceLongAnimationFrameTiming : PerformanceEntry {
+ /* Overloading PerformanceEntry */
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+
+ readonly attribute DOMHighResTimeStamp renderStart;
+ readonly attribute DOMHighResTimeStamp styleAndLayoutStart;
+ readonly attribute DOMHighResTimeStamp blockingDuration;
+ readonly attribute DOMHighResTimeStamp firstUIEventTimestamp;
+ [SameObject] readonly attribute FrozenArray scripts;
+ [Default] object toJSON();
+};
+
+enum ScriptInvokerType {
+ "classic-script",
+ "module-script",
+ "event-listener",
+ "user-callback",
+ "resolve-promise",
+ "reject-promise"
+};
+
+enum ScriptWindowAttribution {
+ "self", "descendant", "ancestor", "same-page", "other"
+};
+
+[Exposed=Window]
+interface PerformanceScriptTiming : PerformanceEntry {
+ /* Overloading PerformanceEntry */
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+
+ readonly attribute ScriptInvokerType invokerType;
+ readonly attribute DOMString invoker;
+ readonly attribute DOMHighResTimeStamp executionStart;
+ readonly attribute DOMString sourceURL;
+ readonly attribute DOMString sourceFunctionName;
+ readonly attribute long long sourceCharPosition;
+ readonly attribute DOMHighResTimeStamp pauseDuration;
+ readonly attribute DOMHighResTimeStamp forcedStyleAndLayoutDuration;
+ readonly attribute Window? window;
+ readonly attribute ScriptWindowAttribution windowAttribution;
+ [Default] object toJSON();
+};
diff --git a/test/wpt/tests/interfaces/longtasks.idl b/test/fixtures/wpt/interfaces/longtasks.idl
similarity index 59%
rename from test/wpt/tests/interfaces/longtasks.idl
rename to test/fixtures/wpt/interfaces/longtasks.idl
index 064d1072d2d..3717469fd09 100644
--- a/test/wpt/tests/interfaces/longtasks.idl
+++ b/test/fixtures/wpt/interfaces/longtasks.idl
@@ -5,24 +5,27 @@
[Exposed=Window]
interface PerformanceLongTaskTiming : PerformanceEntry {
+ /* Overloading PerformanceEntry */
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+
readonly attribute FrozenArray attribution;
[Default] object toJSON();
};
[Exposed=Window]
interface TaskAttributionTiming : PerformanceEntry {
+ /* Overloading PerformanceEntry */
+ readonly attribute DOMHighResTimeStamp startTime;
+ readonly attribute DOMHighResTimeStamp duration;
+ readonly attribute DOMString name;
+ readonly attribute DOMString entryType;
+
readonly attribute DOMString containerType;
readonly attribute DOMString containerSrc;
readonly attribute DOMString containerId;
readonly attribute DOMString containerName;
[Default] object toJSON();
};
-
-[Exposed=Window]
-interface PerformanceLongAnimationFrameTiming : PerformanceEntry {
- readonly attribute DOMHighResTimeStamp renderStart;
- readonly attribute DOMHighResTimeStamp styleAndLayoutStart;
- readonly attribute DOMHighResTimeStamp blockingDuration;
-
- [Default] object toJSON();
-};
diff --git a/test/wpt/tests/interfaces/magnetometer.idl b/test/fixtures/wpt/interfaces/magnetometer.idl
similarity index 100%
rename from test/wpt/tests/interfaces/magnetometer.idl
rename to test/fixtures/wpt/interfaces/magnetometer.idl
diff --git a/test/wpt/tests/interfaces/managed-configuration.idl b/test/fixtures/wpt/interfaces/managed-configuration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/managed-configuration.idl
rename to test/fixtures/wpt/interfaces/managed-configuration.idl
diff --git a/test/wpt/tests/interfaces/manifest-incubations.idl b/test/fixtures/wpt/interfaces/manifest-incubations.idl
similarity index 100%
rename from test/wpt/tests/interfaces/manifest-incubations.idl
rename to test/fixtures/wpt/interfaces/manifest-incubations.idl
diff --git a/test/wpt/tests/interfaces/mathml-core.idl b/test/fixtures/wpt/interfaces/mathml-core.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mathml-core.idl
rename to test/fixtures/wpt/interfaces/mathml-core.idl
diff --git a/test/wpt/tests/interfaces/media-capabilities.idl b/test/fixtures/wpt/interfaces/media-capabilities.idl
similarity index 100%
rename from test/wpt/tests/interfaces/media-capabilities.idl
rename to test/fixtures/wpt/interfaces/media-capabilities.idl
diff --git a/test/wpt/tests/interfaces/media-playback-quality.idl b/test/fixtures/wpt/interfaces/media-playback-quality.idl
similarity index 100%
rename from test/wpt/tests/interfaces/media-playback-quality.idl
rename to test/fixtures/wpt/interfaces/media-playback-quality.idl
diff --git a/test/fixtures/wpt/interfaces/media-source.idl b/test/fixtures/wpt/interfaces/media-source.idl
new file mode 100644
index 00000000000..de153e615a4
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/media-source.idl
@@ -0,0 +1,123 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Media Source Extensions™ (https://w3c.github.io/media-source/)
+
+enum ReadyState {
+ "closed",
+ "open",
+ "ended",
+};
+
+enum EndOfStreamError {
+ "network",
+ "decode",
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface MediaSource : EventTarget {
+ constructor();
+
+ [SameObject, Exposed=DedicatedWorker]
+ readonly attribute MediaSourceHandle handle;
+ readonly attribute SourceBufferList sourceBuffers;
+ readonly attribute SourceBufferList activeSourceBuffers;
+ readonly attribute ReadyState readyState;
+
+ attribute unrestricted double duration;
+ attribute EventHandler onsourceopen;
+ attribute EventHandler onsourceended;
+ attribute EventHandler onsourceclose;
+
+ static readonly attribute boolean canConstructInDedicatedWorker;
+
+ SourceBuffer addSourceBuffer(DOMString type);
+ undefined removeSourceBuffer(SourceBuffer sourceBuffer);
+ undefined endOfStream(optional EndOfStreamError error);
+ undefined setLiveSeekableRange(double start, double end);
+ undefined clearLiveSeekableRange();
+ static boolean isTypeSupported(DOMString type);
+};
+
+[Transferable, Exposed=(Window,DedicatedWorker)]
+interface MediaSourceHandle {};
+
+enum AppendMode {
+ "segments",
+ "sequence",
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface SourceBuffer : EventTarget {
+ attribute AppendMode mode;
+ readonly attribute boolean updating;
+ readonly attribute TimeRanges buffered;
+ attribute double timestampOffset;
+ readonly attribute AudioTrackList audioTracks;
+ readonly attribute VideoTrackList videoTracks;
+ readonly attribute TextTrackList textTracks;
+ attribute double appendWindowStart;
+ attribute unrestricted double appendWindowEnd;
+
+ attribute EventHandler onupdatestart;
+ attribute EventHandler onupdate;
+ attribute EventHandler onupdateend;
+ attribute EventHandler onerror;
+ attribute EventHandler onabort;
+
+ undefined appendBuffer(BufferSource data);
+ undefined abort();
+ undefined changeType(DOMString type);
+ undefined remove(double start, unrestricted double end);
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface SourceBufferList : EventTarget {
+ readonly attribute unsigned long length;
+
+ attribute EventHandler onaddsourcebuffer;
+ attribute EventHandler onremovesourcebuffer;
+
+ getter SourceBuffer (unsigned long index);
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface ManagedMediaSource : MediaSource {
+ constructor();
+ readonly attribute boolean streaming;
+ attribute EventHandler onstartstreaming;
+ attribute EventHandler onendstreaming;
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface BufferedChangeEvent : Event {
+ constructor(DOMString type, optional BufferedChangeEventInit eventInitDict = {});
+
+ [SameObject] readonly attribute TimeRanges addedRanges;
+ [SameObject] readonly attribute TimeRanges removedRanges;
+};
+
+dictionary BufferedChangeEventInit : EventInit {
+ TimeRanges addedRanges;
+ TimeRanges removedRanges;
+};
+
+[Exposed=(Window,DedicatedWorker)]
+interface ManagedSourceBuffer : SourceBuffer {
+ attribute EventHandler onbufferedchange;
+};
+
+[Exposed=(Window,DedicatedWorker)]
+partial interface AudioTrack {
+ readonly attribute SourceBuffer? sourceBuffer;
+};
+
+[Exposed=(Window,DedicatedWorker)]
+partial interface VideoTrack {
+ readonly attribute SourceBuffer? sourceBuffer;
+};
+
+[Exposed=(Window,DedicatedWorker)]
+partial interface TextTrack {
+ readonly attribute SourceBuffer? sourceBuffer;
+};
diff --git a/test/wpt/tests/interfaces/mediacapture-automation.idl b/test/fixtures/wpt/interfaces/mediacapture-automation.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-automation.idl
rename to test/fixtures/wpt/interfaces/mediacapture-automation.idl
diff --git a/test/wpt/tests/interfaces/mediacapture-fromelement.idl b/test/fixtures/wpt/interfaces/mediacapture-fromelement.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-fromelement.idl
rename to test/fixtures/wpt/interfaces/mediacapture-fromelement.idl
diff --git a/test/wpt/tests/interfaces/mediacapture-handle-actions.idl b/test/fixtures/wpt/interfaces/mediacapture-handle-actions.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-handle-actions.idl
rename to test/fixtures/wpt/interfaces/mediacapture-handle-actions.idl
diff --git a/test/wpt/tests/interfaces/mediacapture-region.idl b/test/fixtures/wpt/interfaces/mediacapture-region.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-region.idl
rename to test/fixtures/wpt/interfaces/mediacapture-region.idl
diff --git a/test/wpt/tests/interfaces/mediacapture-streams.idl b/test/fixtures/wpt/interfaces/mediacapture-streams.idl
similarity index 93%
rename from test/wpt/tests/interfaces/mediacapture-streams.idl
rename to test/fixtures/wpt/interfaces/mediacapture-streams.idl
index 373f0c328d9..f2ca21389e9 100644
--- a/test/wpt/tests/interfaces/mediacapture-streams.idl
+++ b/test/fixtures/wpt/interfaces/mediacapture-streams.idl
@@ -189,16 +189,6 @@ dictionary MediaStreamConstraints {
(boolean or MediaTrackConstraints) audio = false;
};
-partial interface Navigator {
- [SecureContext] undefined getUserMedia(MediaStreamConstraints constraints,
- NavigatorUserMediaSuccessCallback successCallback,
- NavigatorUserMediaErrorCallback errorCallback);
-};
-
-callback NavigatorUserMediaSuccessCallback = undefined (MediaStream stream);
-
-callback NavigatorUserMediaErrorCallback = undefined (DOMException error);
-
dictionary DoubleRange {
double max;
double min;
diff --git a/test/wpt/tests/interfaces/mediacapture-transform.idl b/test/fixtures/wpt/interfaces/mediacapture-transform.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-transform.idl
rename to test/fixtures/wpt/interfaces/mediacapture-transform.idl
diff --git a/test/wpt/tests/interfaces/mediacapture-viewport.idl b/test/fixtures/wpt/interfaces/mediacapture-viewport.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediacapture-viewport.idl
rename to test/fixtures/wpt/interfaces/mediacapture-viewport.idl
diff --git a/test/wpt/tests/interfaces/mediasession.idl b/test/fixtures/wpt/interfaces/mediasession.idl
similarity index 66%
rename from test/wpt/tests/interfaces/mediasession.idl
rename to test/fixtures/wpt/interfaces/mediasession.idl
index 2cca3674a5e..e6c8e464627 100644
--- a/test/wpt/tests/interfaces/mediasession.idl
+++ b/test/fixtures/wpt/interfaces/mediasession.idl
@@ -44,9 +44,9 @@ interface MediaSession {
undefined setPositionState(optional MediaPositionState state = {});
- undefined setMicrophoneActive(boolean active);
+ Promise setMicrophoneActive(boolean active);
- undefined setCameraActive(boolean active);
+ Promise setCameraActive(boolean active);
};
[Exposed=Window]
@@ -56,6 +56,7 @@ interface MediaMetadata {
attribute DOMString artist;
attribute DOMString album;
attribute FrozenArray artwork;
+ [SameObject] readonly attribute FrozenArray chapterInfo;
};
dictionary MediaMetadataInit {
@@ -63,6 +64,20 @@ dictionary MediaMetadataInit {
DOMString artist = "";
DOMString album = "";
sequence artwork = [];
+ sequence chapterInfo = [];
+};
+
+[Exposed=Window]
+interface ChapterInformation {
+ readonly attribute DOMString title;
+ readonly attribute double startTime;
+ [SameObject] readonly attribute FrozenArray artwork;
+};
+
+dictionary ChapterInformationInit {
+ DOMString title = "";
+ double startTime = 0;
+ sequence artwork = [];
};
dictionary MediaImage {
@@ -72,14 +87,24 @@ dictionary MediaImage {
};
dictionary MediaPositionState {
- double duration;
+ unrestricted double duration;
double playbackRate;
double position;
};
dictionary MediaSessionActionDetails {
required MediaSessionAction action;
+};
+
+dictionary MediaSessionSeekActionDetails : MediaSessionActionDetails {
double seekOffset;
- double seekTime;
+};
+
+dictionary MediaSessionSeekToActionDetails : MediaSessionActionDetails {
+ required double seekTime;
boolean fastSeek;
};
+
+dictionary MediaSessionCaptureActionDetails : MediaSessionActionDetails {
+ boolean isActivating;
+};
diff --git a/test/wpt/tests/interfaces/mediastream-recording.idl b/test/fixtures/wpt/interfaces/mediastream-recording.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mediastream-recording.idl
rename to test/fixtures/wpt/interfaces/mediastream-recording.idl
diff --git a/test/wpt/tests/interfaces/model-element.idl b/test/fixtures/wpt/interfaces/model-element.idl
similarity index 100%
rename from test/wpt/tests/interfaces/model-element.idl
rename to test/fixtures/wpt/interfaces/model-element.idl
diff --git a/test/wpt/tests/interfaces/mst-content-hint.idl b/test/fixtures/wpt/interfaces/mst-content-hint.idl
similarity index 100%
rename from test/wpt/tests/interfaces/mst-content-hint.idl
rename to test/fixtures/wpt/interfaces/mst-content-hint.idl
diff --git a/test/wpt/tests/interfaces/navigation-timing.idl b/test/fixtures/wpt/interfaces/navigation-timing.idl
similarity index 97%
rename from test/wpt/tests/interfaces/navigation-timing.idl
rename to test/fixtures/wpt/interfaces/navigation-timing.idl
index 355950160e3..b381b486e19 100644
--- a/test/wpt/tests/interfaces/navigation-timing.idl
+++ b/test/fixtures/wpt/interfaces/navigation-timing.idl
@@ -16,6 +16,7 @@ interface PerformanceNavigationTiming : PerformanceResourceTiming {
readonly attribute NavigationTimingType type;
readonly attribute unsigned short redirectCount;
readonly attribute DOMHighResTimeStamp criticalCHRestart;
+ readonly attribute NotRestoredReasons? notRestoredReasons;
[Default] object toJSON();
};
diff --git a/test/wpt/tests/interfaces/netinfo.idl b/test/fixtures/wpt/interfaces/netinfo.idl
similarity index 100%
rename from test/wpt/tests/interfaces/netinfo.idl
rename to test/fixtures/wpt/interfaces/netinfo.idl
diff --git a/test/wpt/tests/interfaces/notifications.idl b/test/fixtures/wpt/interfaces/notifications.idl
similarity index 100%
rename from test/wpt/tests/interfaces/notifications.idl
rename to test/fixtures/wpt/interfaces/notifications.idl
diff --git a/test/fixtures/wpt/interfaces/observable.tentative.idl b/test/fixtures/wpt/interfaces/observable.tentative.idl
new file mode 100644
index 00000000000..3ccd486a202
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/observable.tentative.idl
@@ -0,0 +1,31 @@
+[Exposed=*]
+interface Subscriber {
+ undefined next(any value);
+ undefined error(any error);
+ undefined complete();
+ undefined addTeardown(VoidFunction teardown);
+ readonly attribute boolean active;
+ readonly attribute AbortSignal signal;
+};
+
+
+callback SubscribeCallback = undefined (Subscriber subscriber);
+callback SubscriptionObserverCallback = undefined (any value);
+
+dictionary SubscriptionObserver {
+ SubscriptionObserverCallback next;
+ SubscriptionObserverCallback error;
+ VoidFunction complete;
+};
+
+typedef (SubscriptionObserverCallback or Observer) ObserverUnion;
+
+dictionary SubscribeOptions {
+ AbortSignal signal;
+};
+
+[Exposed=*]
+interface Observable {
+ constructor(SubscribeCallback callback);
+ undefined subscribe(optional ObserverUnion observer = {}, optional SubscribeOptions options = {});
+};
diff --git a/test/wpt/tests/interfaces/orientation-event.idl b/test/fixtures/wpt/interfaces/orientation-event.idl
similarity index 96%
rename from test/wpt/tests/interfaces/orientation-event.idl
rename to test/fixtures/wpt/interfaces/orientation-event.idl
index 965e833fd21..ffacfe576f2 100644
--- a/test/wpt/tests/interfaces/orientation-event.idl
+++ b/test/fixtures/wpt/interfaces/orientation-event.idl
@@ -15,7 +15,7 @@ interface DeviceOrientationEvent : Event {
readonly attribute double? gamma;
readonly attribute boolean absolute;
- static Promise requestPermission();
+ static Promise requestPermission(optional boolean absolute = false);
};
dictionary DeviceOrientationEventInit : EventInit {
diff --git a/test/wpt/tests/interfaces/orientation-sensor.idl b/test/fixtures/wpt/interfaces/orientation-sensor.idl
similarity index 100%
rename from test/wpt/tests/interfaces/orientation-sensor.idl
rename to test/fixtures/wpt/interfaces/orientation-sensor.idl
diff --git a/test/wpt/tests/interfaces/page-lifecycle.idl b/test/fixtures/wpt/interfaces/page-lifecycle.idl
similarity index 100%
rename from test/wpt/tests/interfaces/page-lifecycle.idl
rename to test/fixtures/wpt/interfaces/page-lifecycle.idl
diff --git a/test/wpt/tests/interfaces/paint-timing.idl b/test/fixtures/wpt/interfaces/paint-timing.idl
similarity index 76%
rename from test/wpt/tests/interfaces/paint-timing.idl
rename to test/fixtures/wpt/interfaces/paint-timing.idl
index 052b74ef6c2..396f461e94c 100644
--- a/test/wpt/tests/interfaces/paint-timing.idl
+++ b/test/fixtures/wpt/interfaces/paint-timing.idl
@@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
-// Source: Paint Timing 1 (https://w3c.github.io/paint-timing/)
+// Source: Paint Timing (https://w3c.github.io/paint-timing/)
[Exposed=Window]
interface PerformancePaintTiming : PerformanceEntry {};
diff --git a/test/wpt/tests/interfaces/parakeet.tentative.idl b/test/fixtures/wpt/interfaces/parakeet.tentative.idl
similarity index 100%
rename from test/wpt/tests/interfaces/parakeet.tentative.idl
rename to test/fixtures/wpt/interfaces/parakeet.tentative.idl
diff --git a/test/wpt/tests/interfaces/payment-handler.idl b/test/fixtures/wpt/interfaces/payment-handler.idl
similarity index 100%
rename from test/wpt/tests/interfaces/payment-handler.idl
rename to test/fixtures/wpt/interfaces/payment-handler.idl
diff --git a/test/wpt/tests/interfaces/payment-request.idl b/test/fixtures/wpt/interfaces/payment-request.idl
similarity index 100%
rename from test/wpt/tests/interfaces/payment-request.idl
rename to test/fixtures/wpt/interfaces/payment-request.idl
diff --git a/test/wpt/tests/interfaces/performance-measure-memory.idl b/test/fixtures/wpt/interfaces/performance-measure-memory.idl
similarity index 100%
rename from test/wpt/tests/interfaces/performance-measure-memory.idl
rename to test/fixtures/wpt/interfaces/performance-measure-memory.idl
diff --git a/test/wpt/tests/interfaces/performance-timeline.idl b/test/fixtures/wpt/interfaces/performance-timeline.idl
similarity index 100%
rename from test/wpt/tests/interfaces/performance-timeline.idl
rename to test/fixtures/wpt/interfaces/performance-timeline.idl
diff --git a/test/wpt/tests/interfaces/periodic-background-sync.idl b/test/fixtures/wpt/interfaces/periodic-background-sync.idl
similarity index 100%
rename from test/wpt/tests/interfaces/periodic-background-sync.idl
rename to test/fixtures/wpt/interfaces/periodic-background-sync.idl
diff --git a/test/wpt/tests/interfaces/permissions-policy.idl b/test/fixtures/wpt/interfaces/permissions-policy.idl
similarity index 100%
rename from test/wpt/tests/interfaces/permissions-policy.idl
rename to test/fixtures/wpt/interfaces/permissions-policy.idl
diff --git a/test/wpt/tests/interfaces/permissions-request.idl b/test/fixtures/wpt/interfaces/permissions-request.idl
similarity index 100%
rename from test/wpt/tests/interfaces/permissions-request.idl
rename to test/fixtures/wpt/interfaces/permissions-request.idl
diff --git a/test/wpt/tests/interfaces/permissions-revoke.idl b/test/fixtures/wpt/interfaces/permissions-revoke.idl
similarity index 100%
rename from test/wpt/tests/interfaces/permissions-revoke.idl
rename to test/fixtures/wpt/interfaces/permissions-revoke.idl
diff --git a/test/wpt/tests/interfaces/permissions.idl b/test/fixtures/wpt/interfaces/permissions.idl
similarity index 95%
rename from test/wpt/tests/interfaces/permissions.idl
rename to test/fixtures/wpt/interfaces/permissions.idl
index fbcb674e561..62c2e3ad76f 100644
--- a/test/wpt/tests/interfaces/permissions.idl
+++ b/test/fixtures/wpt/interfaces/permissions.idl
@@ -36,6 +36,6 @@ enum PermissionState {
};
dictionary PermissionSetParameters {
- required PermissionDescriptor descriptor;
+ required object descriptor;
required PermissionState state;
};
diff --git a/test/wpt/tests/interfaces/picture-in-picture.idl b/test/fixtures/wpt/interfaces/picture-in-picture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/picture-in-picture.idl
rename to test/fixtures/wpt/interfaces/picture-in-picture.idl
diff --git a/test/wpt/tests/interfaces/pointerevents.idl b/test/fixtures/wpt/interfaces/pointerevents.idl
similarity index 100%
rename from test/wpt/tests/interfaces/pointerevents.idl
rename to test/fixtures/wpt/interfaces/pointerevents.idl
diff --git a/test/wpt/tests/interfaces/pointerlock.idl b/test/fixtures/wpt/interfaces/pointerlock.idl
similarity index 100%
rename from test/wpt/tests/interfaces/pointerlock.idl
rename to test/fixtures/wpt/interfaces/pointerlock.idl
diff --git a/test/wpt/tests/interfaces/portals.idl b/test/fixtures/wpt/interfaces/portals.idl
similarity index 100%
rename from test/wpt/tests/interfaces/portals.idl
rename to test/fixtures/wpt/interfaces/portals.idl
diff --git a/test/wpt/tests/interfaces/prefer-current-tab.idl b/test/fixtures/wpt/interfaces/prefer-current-tab.idl
similarity index 100%
rename from test/wpt/tests/interfaces/prefer-current-tab.idl
rename to test/fixtures/wpt/interfaces/prefer-current-tab.idl
diff --git a/test/wpt/tests/interfaces/prerendering-revamped.idl b/test/fixtures/wpt/interfaces/prerendering-revamped.idl
similarity index 100%
rename from test/wpt/tests/interfaces/prerendering-revamped.idl
rename to test/fixtures/wpt/interfaces/prerendering-revamped.idl
diff --git a/test/wpt/tests/interfaces/presentation-api.idl b/test/fixtures/wpt/interfaces/presentation-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/presentation-api.idl
rename to test/fixtures/wpt/interfaces/presentation-api.idl
diff --git a/test/wpt/tests/interfaces/private-click-measurement.idl b/test/fixtures/wpt/interfaces/private-click-measurement.idl
similarity index 100%
rename from test/wpt/tests/interfaces/private-click-measurement.idl
rename to test/fixtures/wpt/interfaces/private-click-measurement.idl
diff --git a/test/wpt/tests/interfaces/private-network-access.idl b/test/fixtures/wpt/interfaces/private-network-access.idl
similarity index 100%
rename from test/wpt/tests/interfaces/private-network-access.idl
rename to test/fixtures/wpt/interfaces/private-network-access.idl
diff --git a/test/wpt/tests/interfaces/proximity.idl b/test/fixtures/wpt/interfaces/proximity.idl
similarity index 100%
rename from test/wpt/tests/interfaces/proximity.idl
rename to test/fixtures/wpt/interfaces/proximity.idl
diff --git a/test/wpt/tests/interfaces/push-api.idl b/test/fixtures/wpt/interfaces/push-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/push-api.idl
rename to test/fixtures/wpt/interfaces/push-api.idl
diff --git a/test/wpt/tests/interfaces/raw-camera-access.idl b/test/fixtures/wpt/interfaces/raw-camera-access.idl
similarity index 100%
rename from test/wpt/tests/interfaces/raw-camera-access.idl
rename to test/fixtures/wpt/interfaces/raw-camera-access.idl
diff --git a/test/wpt/tests/interfaces/real-world-meshing.idl b/test/fixtures/wpt/interfaces/real-world-meshing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/real-world-meshing.idl
rename to test/fixtures/wpt/interfaces/real-world-meshing.idl
diff --git a/test/wpt/tests/interfaces/referrer-policy.idl b/test/fixtures/wpt/interfaces/referrer-policy.idl
similarity index 100%
rename from test/wpt/tests/interfaces/referrer-policy.idl
rename to test/fixtures/wpt/interfaces/referrer-policy.idl
diff --git a/test/wpt/tests/interfaces/remote-playback.idl b/test/fixtures/wpt/interfaces/remote-playback.idl
similarity index 100%
rename from test/wpt/tests/interfaces/remote-playback.idl
rename to test/fixtures/wpt/interfaces/remote-playback.idl
diff --git a/test/wpt/tests/interfaces/reporting.idl b/test/fixtures/wpt/interfaces/reporting.idl
similarity index 100%
rename from test/wpt/tests/interfaces/reporting.idl
rename to test/fixtures/wpt/interfaces/reporting.idl
diff --git a/test/wpt/tests/interfaces/requestStorageAccessFor.idl b/test/fixtures/wpt/interfaces/requestStorageAccessFor.idl
similarity index 100%
rename from test/wpt/tests/interfaces/requestStorageAccessFor.idl
rename to test/fixtures/wpt/interfaces/requestStorageAccessFor.idl
diff --git a/test/wpt/tests/interfaces/requestidlecallback.idl b/test/fixtures/wpt/interfaces/requestidlecallback.idl
similarity index 100%
rename from test/wpt/tests/interfaces/requestidlecallback.idl
rename to test/fixtures/wpt/interfaces/requestidlecallback.idl
diff --git a/test/wpt/tests/interfaces/resize-observer.idl b/test/fixtures/wpt/interfaces/resize-observer.idl
similarity index 100%
rename from test/wpt/tests/interfaces/resize-observer.idl
rename to test/fixtures/wpt/interfaces/resize-observer.idl
diff --git a/test/wpt/tests/interfaces/resource-timing.idl b/test/fixtures/wpt/interfaces/resource-timing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/resource-timing.idl
rename to test/fixtures/wpt/interfaces/resource-timing.idl
diff --git a/test/fixtures/wpt/interfaces/sanitizer-api.idl b/test/fixtures/wpt/interfaces/sanitizer-api.idl
new file mode 100644
index 00000000000..8f5c667973a
--- /dev/null
+++ b/test/fixtures/wpt/interfaces/sanitizer-api.idl
@@ -0,0 +1,47 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: HTML Sanitizer API (https://wicg.github.io/sanitizer-api/)
+
+dictionary SetHTMLOptions {
+ (Sanitizer or SanitizerConfig) sanitizer = {};
+};
+
+[Exposed=(Window,Worker)]
+interface Sanitizer {
+ constructor(optional SanitizerConfig config = {});
+ SanitizerConfig get();
+ SanitizerConfig getUnsafe();
+};
+
+dictionary SanitizerElementNamespace {
+ required DOMString name;
+ DOMString? _namespace = "http://www.w3.org/1999/xhtml";
+};
+
+// Used by "elements"
+dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace {
+ sequence attributes;
+ sequence removeAttributes;
+};
+
+typedef (DOMString or SanitizerElementNamespace) SanitizerElement;
+typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes;
+
+dictionary SanitizerAttributeNamespace {
+ required DOMString name;
+ DOMString? _namespace = null;
+};
+typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute;
+
+dictionary SanitizerConfig {
+ sequence elements;
+ sequence removeElements;
+ sequence replaceWithChildrenElements;
+
+ sequence attributes;
+ sequence removeAttributes;
+
+ boolean comments;
+ boolean dataAttributes;
+};
diff --git a/test/wpt/tests/interfaces/sanitizer-api.tentative.idl b/test/fixtures/wpt/interfaces/sanitizer-api.tentative.idl
similarity index 100%
rename from test/wpt/tests/interfaces/sanitizer-api.tentative.idl
rename to test/fixtures/wpt/interfaces/sanitizer-api.tentative.idl
diff --git a/test/wpt/tests/interfaces/savedata.idl b/test/fixtures/wpt/interfaces/savedata.idl
similarity index 100%
rename from test/wpt/tests/interfaces/savedata.idl
rename to test/fixtures/wpt/interfaces/savedata.idl
diff --git a/test/wpt/tests/interfaces/scheduling-apis.idl b/test/fixtures/wpt/interfaces/scheduling-apis.idl
similarity index 100%
rename from test/wpt/tests/interfaces/scheduling-apis.idl
rename to test/fixtures/wpt/interfaces/scheduling-apis.idl
diff --git a/test/wpt/tests/interfaces/screen-capture.idl b/test/fixtures/wpt/interfaces/screen-capture.idl
similarity index 100%
rename from test/wpt/tests/interfaces/screen-capture.idl
rename to test/fixtures/wpt/interfaces/screen-capture.idl
diff --git a/test/wpt/tests/interfaces/screen-orientation.idl b/test/fixtures/wpt/interfaces/screen-orientation.idl
similarity index 100%
rename from test/wpt/tests/interfaces/screen-orientation.idl
rename to test/fixtures/wpt/interfaces/screen-orientation.idl
diff --git a/test/wpt/tests/interfaces/screen-wake-lock.idl b/test/fixtures/wpt/interfaces/screen-wake-lock.idl
similarity index 100%
rename from test/wpt/tests/interfaces/screen-wake-lock.idl
rename to test/fixtures/wpt/interfaces/screen-wake-lock.idl
diff --git a/test/wpt/tests/interfaces/scroll-animations.idl b/test/fixtures/wpt/interfaces/scroll-animations.idl
similarity index 100%
rename from test/wpt/tests/interfaces/scroll-animations.idl
rename to test/fixtures/wpt/interfaces/scroll-animations.idl
diff --git a/test/wpt/tests/interfaces/scroll-to-text-fragment.idl b/test/fixtures/wpt/interfaces/scroll-to-text-fragment.idl
similarity index 100%
rename from test/wpt/tests/interfaces/scroll-to-text-fragment.idl
rename to test/fixtures/wpt/interfaces/scroll-to-text-fragment.idl
diff --git a/test/wpt/tests/interfaces/secure-payment-confirmation.idl b/test/fixtures/wpt/interfaces/secure-payment-confirmation.idl
similarity index 100%
rename from test/wpt/tests/interfaces/secure-payment-confirmation.idl
rename to test/fixtures/wpt/interfaces/secure-payment-confirmation.idl
diff --git a/test/wpt/tests/interfaces/selection-api.idl b/test/fixtures/wpt/interfaces/selection-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/selection-api.idl
rename to test/fixtures/wpt/interfaces/selection-api.idl
diff --git a/test/wpt/tests/interfaces/serial.idl b/test/fixtures/wpt/interfaces/serial.idl
similarity index 98%
rename from test/wpt/tests/interfaces/serial.idl
rename to test/fixtures/wpt/interfaces/serial.idl
index e624c3c1a60..37986b7ac2f 100644
--- a/test/wpt/tests/interfaces/serial.idl
+++ b/test/fixtures/wpt/interfaces/serial.idl
@@ -36,6 +36,7 @@ dictionary SerialPortFilter {
interface SerialPort : EventTarget {
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
+ readonly attribute boolean connected;
readonly attribute ReadableStream readable;
readonly attribute WritableStream writable;
diff --git a/test/wpt/tests/interfaces/server-timing.idl b/test/fixtures/wpt/interfaces/server-timing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/server-timing.idl
rename to test/fixtures/wpt/interfaces/server-timing.idl
diff --git a/test/wpt/tests/interfaces/service-workers.idl b/test/fixtures/wpt/interfaces/service-workers.idl
similarity index 90%
rename from test/wpt/tests/interfaces/service-workers.idl
rename to test/fixtures/wpt/interfaces/service-workers.idl
index 6d44d61debb..1ddc6d71d83 100644
--- a/test/wpt/tests/interfaces/service-workers.idl
+++ b/test/fixtures/wpt/interfaces/service-workers.idl
@@ -92,7 +92,7 @@ dictionary NavigationPreloadState {
ByteString headerValue;
};
-[Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
+[Global=(Worker,ServiceWorker), Exposed=ServiceWorker, SecureContext]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
[SameObject] readonly attribute Clients clients;
[SameObject] readonly attribute ServiceWorkerRegistration registration;
@@ -165,6 +165,41 @@ dictionary ExtendableEventInit : EventInit {
// Defined for the forward compatibility across the derived events
};
+[Exposed=ServiceWorker]
+interface InstallEvent : ExtendableEvent {
+ Promise addRoutes((RouterRule or sequence) rules);
+};
+
+dictionary RouterRule {
+ required RouterCondition condition;
+ required RouterSource source;
+};
+
+dictionary RouterCondition {
+ URLPatternCompatible urlPattern;
+ ByteString requestMethod;
+ RequestMode requestMode;
+ RequestDestination requestDestination;
+ RunningStatus runningStatus;
+
+ sequence _or;
+ RouterCondition not;
+};
+
+typedef (RouterSourceDict or RouterSourceEnum) RouterSource;
+
+dictionary RouterSourceDict {
+ DOMString cacheName;
+};
+
+enum RunningStatus { "running", "not-running" };
+enum RouterSourceEnum {
+ "cache",
+ "fetch-event",
+ "network",
+ "race-network-and-fetch-handler"
+};
+
[Exposed=ServiceWorker]
interface FetchEvent : ExtendableEvent {
constructor(DOMString type, FetchEventInit eventInitDict);
diff --git a/test/wpt/tests/interfaces/shape-detection-api.idl b/test/fixtures/wpt/interfaces/shape-detection-api.idl
similarity index 91%
rename from test/wpt/tests/interfaces/shape-detection-api.idl
rename to test/fixtures/wpt/interfaces/shape-detection-api.idl
index 4fc1f085ea2..24d3b980854 100644
--- a/test/wpt/tests/interfaces/shape-detection-api.idl
+++ b/test/fixtures/wpt/interfaces/shape-detection-api.idl
@@ -17,11 +17,11 @@ dictionary FaceDetectorOptions {
dictionary DetectedFace {
required DOMRectReadOnly boundingBox;
- required FrozenArray? landmarks;
+ required sequence? landmarks;
};
dictionary Landmark {
- required FrozenArray locations;
+ required sequence locations;
LandmarkType type;
};
@@ -48,7 +48,7 @@ dictionary DetectedBarcode {
required DOMRectReadOnly boundingBox;
required DOMString rawValue;
required BarcodeFormat format;
- required FrozenArray cornerPoints;
+ required sequence cornerPoints;
};
enum BarcodeFormat {
diff --git a/test/wpt/tests/interfaces/shared-storage.idl b/test/fixtures/wpt/interfaces/shared-storage.idl
similarity index 79%
rename from test/wpt/tests/interfaces/shared-storage.idl
rename to test/fixtures/wpt/interfaces/shared-storage.idl
index edbe2c2bcc3..c40344e74d2 100644
--- a/test/wpt/tests/interfaces/shared-storage.idl
+++ b/test/fixtures/wpt/interfaces/shared-storage.idl
@@ -3,40 +3,30 @@
// (https://github.com/w3c/webref)
// Source: Shared Storage API (https://wicg.github.io/shared-storage/)
+typedef (USVString or FencedFrameConfig) SharedStorageResponse;
+
[Exposed=(Window)]
interface SharedStorageWorklet : Worklet {
+ Promise selectURL(DOMString name,
+ FrozenArray urls,
+ optional SharedStorageRunOperationMethodOptions options = {});
+ Promise run(DOMString name,
+ optional SharedStorageRunOperationMethodOptions options = {});
};
+callback RunFunctionForSharedStorageSelectURLOperation = Promise(sequence urls, optional any data);
+
[Exposed=SharedStorageWorklet, Global=SharedStorageWorklet]
interface SharedStorageWorkletGlobalScope : WorkletGlobalScope {
undefined register(DOMString name,
- SharedStorageOperationConstructor operationCtor);
+ Function operationCtor);
readonly attribute WorkletSharedStorage sharedStorage;
};
-callback SharedStorageOperationConstructor =
- SharedStorageOperation(optional SharedStorageRunOperationMethodOptions options);
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageOperation {
-};
-
-dictionary SharedStorageRunOperationMethodOptions {
- object data;
- boolean resolveToConfig = false;
- boolean keepAlive = false;
-};
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageRunOperation : SharedStorageOperation {
- Promise run(object data);
-};
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageSelectURLOperation : SharedStorageOperation {
- Promise run(object data,
- FrozenArray urls);
+dictionary SharedStorageUrlWithMetadata {
+ required USVString url;
+ object reportingMetadata;
};
[Exposed=(Window,SharedStorageWorklet)]
@@ -54,22 +44,23 @@ dictionary SharedStorageSetMethodOptions {
boolean ignoreIfPresent = false;
};
-typedef (USVString or FencedFrameConfig) SharedStorageResponse;
-
[Exposed=(Window)]
interface WindowSharedStorage : SharedStorage {
- Promise run(DOMString name,
- optional SharedStorageRunOperationMethodOptions options = {});
Promise selectURL(DOMString name,
FrozenArray urls,
optional SharedStorageRunOperationMethodOptions options = {});
+ Promise run(DOMString name,
+ optional SharedStorageRunOperationMethodOptions options = {});
+
+ Promise createWorklet(USVString moduleURL, optional WorkletOptions options = {});
readonly attribute SharedStorageWorklet worklet;
};
-dictionary SharedStorageUrlWithMetadata {
- required USVString url;
- object reportingMetadata;
+dictionary SharedStorageRunOperationMethodOptions {
+ object data;
+ boolean resolveToConfig = false;
+ boolean keepAlive = false;
};
partial interface Window {
diff --git a/test/wpt/tests/interfaces/speech-api.idl b/test/fixtures/wpt/interfaces/speech-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/speech-api.idl
rename to test/fixtures/wpt/interfaces/speech-api.idl
diff --git a/test/wpt/tests/interfaces/storage-access.idl b/test/fixtures/wpt/interfaces/storage-access.idl
similarity index 100%
rename from test/wpt/tests/interfaces/storage-access.idl
rename to test/fixtures/wpt/interfaces/storage-access.idl
diff --git a/test/wpt/tests/interfaces/storage-buckets.idl b/test/fixtures/wpt/interfaces/storage-buckets.idl
similarity index 95%
rename from test/wpt/tests/interfaces/storage-buckets.idl
rename to test/fixtures/wpt/interfaces/storage-buckets.idl
index 79f6c947d16..581ba8e0bb3 100644
--- a/test/wpt/tests/interfaces/storage-buckets.idl
+++ b/test/fixtures/wpt/interfaces/storage-buckets.idl
@@ -20,8 +20,8 @@ interface StorageBucketManager {
dictionary StorageBucketOptions {
boolean persisted = false;
- unsigned long long? quota;
- DOMHighResTimeStamp? expires;
+ unsigned long long quota;
+ DOMHighResTimeStamp expires;
};
[Exposed=(Window,Worker),
diff --git a/test/wpt/tests/interfaces/storage.idl b/test/fixtures/wpt/interfaces/storage.idl
similarity index 100%
rename from test/wpt/tests/interfaces/storage.idl
rename to test/fixtures/wpt/interfaces/storage.idl
diff --git a/test/wpt/tests/interfaces/streams.idl b/test/fixtures/wpt/interfaces/streams.idl
similarity index 100%
rename from test/wpt/tests/interfaces/streams.idl
rename to test/fixtures/wpt/interfaces/streams.idl
diff --git a/test/wpt/tests/interfaces/svg-animations.idl b/test/fixtures/wpt/interfaces/svg-animations.idl
similarity index 100%
rename from test/wpt/tests/interfaces/svg-animations.idl
rename to test/fixtures/wpt/interfaces/svg-animations.idl
diff --git a/test/wpt/tests/interfaces/testutils.idl b/test/fixtures/wpt/interfaces/testutils.idl
similarity index 100%
rename from test/wpt/tests/interfaces/testutils.idl
rename to test/fixtures/wpt/interfaces/testutils.idl
diff --git a/test/wpt/tests/interfaces/text-detection-api.idl b/test/fixtures/wpt/interfaces/text-detection-api.idl
similarity index 91%
rename from test/wpt/tests/interfaces/text-detection-api.idl
rename to test/fixtures/wpt/interfaces/text-detection-api.idl
index 95b642749f7..b6745b18754 100644
--- a/test/wpt/tests/interfaces/text-detection-api.idl
+++ b/test/fixtures/wpt/interfaces/text-detection-api.idl
@@ -14,5 +14,5 @@
dictionary DetectedText {
required DOMRectReadOnly boundingBox;
required DOMString rawValue;
- required FrozenArray cornerPoints;
+ required sequence cornerPoints;
};
diff --git a/test/wpt/tests/interfaces/touch-events.idl b/test/fixtures/wpt/interfaces/touch-events.idl
similarity index 100%
rename from test/wpt/tests/interfaces/touch-events.idl
rename to test/fixtures/wpt/interfaces/touch-events.idl
diff --git a/test/wpt/tests/interfaces/trust-token-api.idl b/test/fixtures/wpt/interfaces/trust-token-api.idl
similarity index 94%
rename from test/wpt/tests/interfaces/trust-token-api.idl
rename to test/fixtures/wpt/interfaces/trust-token-api.idl
index fb7f15b4b74..9b74290da72 100644
--- a/test/wpt/tests/interfaces/trust-token-api.idl
+++ b/test/fixtures/wpt/interfaces/trust-token-api.idl
@@ -29,6 +29,6 @@ partial interface XMLHttpRequest {
};
partial interface Document {
- Promise hasPrivateTokens(USVString issuer);
+ Promise hasPrivateToken(USVString issuer);
Promise hasRedemptionRecord(USVString issuer);
};
diff --git a/test/wpt/tests/interfaces/trusted-types.idl b/test/fixtures/wpt/interfaces/trusted-types.idl
similarity index 72%
rename from test/wpt/tests/interfaces/trusted-types.idl
rename to test/fixtures/wpt/interfaces/trusted-types.idl
index 23562381294..a0f88e4e6c3 100644
--- a/test/wpt/tests/interfaces/trusted-types.idl
+++ b/test/fixtures/wpt/interfaces/trusted-types.idl
@@ -7,21 +7,18 @@
interface TrustedHTML {
stringifier;
DOMString toJSON();
- static TrustedHTML fromLiteral(object templateStringsArray);
};
[Exposed=(Window,Worker)]
interface TrustedScript {
stringifier;
DOMString toJSON();
- static TrustedScript fromLiteral(object templateStringsArray);
};
[Exposed=(Window,Worker)]
interface TrustedScriptURL {
stringifier;
USVString toJSON();
- static TrustedScriptURL fromLiteral(object templateStringsArray);
};
[Exposed=(Window,Worker)] interface TrustedTypePolicyFactory {
@@ -35,12 +32,12 @@ interface TrustedScriptURL {
DOMString? getAttributeType(
DOMString tagName,
DOMString attribute,
- optional DOMString elementNs = "",
- optional DOMString attrNs = "");
+ optional DOMString? elementNs = "",
+ optional DOMString? attrNs = "");
DOMString? getPropertyType(
DOMString tagName,
DOMString property,
- optional DOMString elementNs = "");
+ optional DOMString? elementNs = "");
readonly attribute TrustedTypePolicy? defaultPolicy;
};
@@ -53,13 +50,13 @@ interface TrustedTypePolicy {
};
dictionary TrustedTypePolicyOptions {
- CreateHTMLCallback? createHTML;
- CreateScriptCallback? createScript;
- CreateScriptURLCallback? createScriptURL;
+ CreateHTMLCallback createHTML;
+ CreateScriptCallback createScript;
+ CreateScriptURLCallback createScriptURL;
};
-callback CreateHTMLCallback = DOMString (DOMString input, any... arguments);
-callback CreateScriptCallback = DOMString (DOMString input, any... arguments);
-callback CreateScriptURLCallback = USVString (DOMString input, any... arguments);
+callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments);
+callback CreateScriptCallback = DOMString? (DOMString input, any... arguments);
+callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments);
typedef [StringContext=TrustedHTML] DOMString HTMLString;
typedef [StringContext=TrustedScript] DOMString ScriptString;
diff --git a/test/wpt/tests/interfaces/turtledove.idl b/test/fixtures/wpt/interfaces/turtledove.idl
similarity index 80%
rename from test/wpt/tests/interfaces/turtledove.idl
rename to test/fixtures/wpt/interfaces/turtledove.idl
index 4700a98038c..39e90ddae19 100644
--- a/test/wpt/tests/interfaces/turtledove.idl
+++ b/test/fixtures/wpt/interfaces/turtledove.idl
@@ -25,12 +25,15 @@ dictionary GenerateBidInterestGroup {
boolean enableBiddingSignalsPrioritization = false;
record priorityVector;
+ record> sellerCapabilities;
DOMString executionMode = "compatibility";
USVString biddingLogicURL;
USVString biddingWasmHelperURL;
USVString updateURL;
USVString trustedBiddingSignalsURL;
sequence trustedBiddingSignalsKeys;
+ DOMString trustedBiddingSignalsSlotSizeMode = "none";
+ long maxTrustedBiddingSignalsURLLength;
any userBiddingSignals;
sequence ads;
sequence adComponents;
@@ -66,24 +69,31 @@ partial interface Navigator {
dictionary AuctionAdConfig {
required USVString seller;
required USVString decisionLogicURL;
+
USVString trustedScoringSignalsURL;
+ long maxTrustedScoringSignalsURLLength;
sequence interestGroupBuyers;
Promise auctionSignals;
Promise sellerSignals;
Promise directFromSellerSignalsHeaderAdSlot;
+ Promise> deprecatedRenderURLReplacements;
unsigned long long sellerTimeout;
unsigned short sellerExperimentGroupId;
- USVString sellerCurrency;
Promise> perBuyerSignals;
Promise> perBuyerTimeouts;
Promise> perBuyerCumulativeTimeouts;
+ unsigned long long reportingTimeout;
+ USVString sellerCurrency;
+ Promise> perBuyerCurrencies;
record perBuyerGroupLimits;
record perBuyerExperimentGroupIds;
record> perBuyerPrioritySignals;
- Promise> perBuyerCurrencies;
- sequence componentAuctions = [];
+ sequence requiredSellerCapabilities;
+ record requestedSize;
+ sequence> allSlotsRequestedSizes;
Promise additionalBids;
DOMString auctionNonce;
+ sequence componentAuctions = [];
AbortSignal? signal;
Promise resolveToConfig;
};
@@ -97,11 +107,24 @@ partial interface Navigator {
interface InterestGroupScriptRunnerGlobalScope {
};
+[Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope]
+interface ForDebuggingOnly {
+ undefined reportAdAuctionWin(USVString url);
+ undefined reportAdAuctionLoss(USVString url);
+};
+
+[Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope,
+ Global=InterestGroupBiddingAndScoringScriptRunnerGlobalScope]
+interface InterestGroupBiddingAndScoringScriptRunnerGlobalScope : InterestGroupScriptRunnerGlobalScope {
+
+ readonly attribute ForDebuggingOnly forDebuggingOnly;
+};
+
[Exposed=InterestGroupBiddingScriptRunnerGlobalScope,
Global=(InterestGroupScriptRunnerGlobalScope,
InterestGroupBiddingScriptRunnerGlobalScope)]
interface InterestGroupBiddingScriptRunnerGlobalScope
- : InterestGroupScriptRunnerGlobalScope {
+ : InterestGroupBiddingAndScoringScriptRunnerGlobalScope {
boolean setBid(optional GenerateBidOutput generateBidOutput = {});
undefined setPriority(double priority);
undefined setPrioritySignalsOverride(DOMString key, optional double? priority);
@@ -128,7 +151,7 @@ dictionary GenerateBidOutput {
Global=(InterestGroupScriptRunnerGlobalScope,
InterestGroupScoringScriptRunnerGlobalScope)]
interface InterestGroupScoringScriptRunnerGlobalScope
- : InterestGroupScriptRunnerGlobalScope {
+ : InterestGroupBiddingAndScoringScriptRunnerGlobalScope {
};
[Exposed=InterestGroupReportingScriptRunnerGlobalScope,
@@ -146,10 +169,24 @@ partial interface Navigator {
undefined updateAdInterestGroups();
};
+[SecureContext]
+partial interface Navigator {
+ [SameObject] readonly attribute ProtectedAudience protectedAudience;
+};
+
+[SecureContext, Exposed=Window]
+interface ProtectedAudience {
+ any queryFeatureSupport(DOMString feature);
+};
+
partial dictionary RequestInit {
boolean adAuctionHeaders;
};
+partial interface HTMLIFrameElement {
+ [CEReactions] attribute boolean adAuctionHeaders;
+};
+
dictionary PreviousWin {
required long long timeDelta;
required DOMString adJSON;
@@ -161,11 +198,13 @@ dictionary BiddingBrowserSignals {
required long joinCount;
required long bidCount;
required long recency;
+ required long adComponentsLimit;
USVString topLevelSeller;
sequence prevWinsMs;
object wasmHelper;
unsigned long dataVersion;
+ boolean forDebuggingOnlyInCooldownOrLockout = false;
};
dictionary ScoringBrowserSignals {
@@ -177,6 +216,7 @@ dictionary ScoringBrowserSignals {
unsigned long dataVersion;
sequence adComponents;
+ boolean forDebuggingOnlyInCooldownOrLockout = false;
};
dictionary ReportingBrowserSignals {
diff --git a/test/wpt/tests/interfaces/ua-client-hints.idl b/test/fixtures/wpt/interfaces/ua-client-hints.idl
similarity index 97%
rename from test/wpt/tests/interfaces/ua-client-hints.idl
rename to test/fixtures/wpt/interfaces/ua-client-hints.idl
index 6a40e1bdc4b..5d44b0dd80a 100644
--- a/test/wpt/tests/interfaces/ua-client-hints.idl
+++ b/test/fixtures/wpt/interfaces/ua-client-hints.idl
@@ -12,7 +12,7 @@ dictionary UADataValues {
DOMString architecture;
DOMString bitness;
sequence brands;
- sequence formFactor;
+ sequence formFactors;
sequence fullVersionList;
DOMString model;
boolean mobile;
diff --git a/test/wpt/tests/interfaces/uievents.idl b/test/fixtures/wpt/interfaces/uievents.idl
similarity index 94%
rename from test/wpt/tests/interfaces/uievents.idl
rename to test/fixtures/wpt/interfaces/uievents.idl
index fef90d48410..0f9d3d3c188 100644
--- a/test/wpt/tests/interfaces/uievents.idl
+++ b/test/fixtures/wpt/interfaces/uievents.idl
@@ -101,7 +101,7 @@ dictionary WheelEventInit : MouseEventInit {
[Exposed=Window]
interface InputEvent : UIEvent {
constructor(DOMString type, optional InputEventInit eventInitDict = {});
- readonly attribute DOMString? data;
+ readonly attribute USVString? data;
readonly attribute boolean isComposing;
readonly attribute DOMString inputType;
};
@@ -147,7 +147,7 @@ dictionary KeyboardEventInit : EventModifierInit {
[Exposed=Window]
interface CompositionEvent : UIEvent {
constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
- readonly attribute DOMString data;
+ readonly attribute USVString data;
};
dictionary CompositionEventInit : UIEventInit {
@@ -226,6 +226,16 @@ partial dictionary KeyboardEventInit {
unsigned long keyCode = 0;
};
+[Exposed=Window]
+interface TextEvent : UIEvent {
+ readonly attribute DOMString data;
+ undefined initTextEvent(DOMString type,
+ optional boolean bubbles = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional DOMString data = "undefined");
+};
+
[Exposed=Window]
interface MutationEvent : Event {
// attrChangeType
diff --git a/test/wpt/tests/interfaces/url.idl b/test/fixtures/wpt/interfaces/url.idl
similarity index 96%
rename from test/wpt/tests/interfaces/url.idl
rename to test/fixtures/wpt/interfaces/url.idl
index a5e4d1eb492..cd18a66e31b 100644
--- a/test/wpt/tests/interfaces/url.idl
+++ b/test/fixtures/wpt/interfaces/url.idl
@@ -8,6 +8,7 @@
interface URL {
constructor(USVString url, optional USVString base);
+ static URL? parse(USVString url, optional USVString base);
static boolean canParse(USVString url, optional USVString base);
stringifier attribute USVString href;
diff --git a/test/wpt/tests/interfaces/urlpattern.idl b/test/fixtures/wpt/interfaces/urlpattern.idl
similarity index 93%
rename from test/wpt/tests/interfaces/urlpattern.idl
rename to test/fixtures/wpt/interfaces/urlpattern.idl
index 788486bb627..ca9fb979d22 100644
--- a/test/wpt/tests/interfaces/urlpattern.idl
+++ b/test/fixtures/wpt/interfaces/urlpattern.idl
@@ -22,6 +22,8 @@ interface URLPattern {
readonly attribute USVString pathname;
readonly attribute USVString search;
readonly attribute USVString hash;
+
+ readonly attribute boolean hasRegExpGroups;
};
dictionary URLPatternInit {
@@ -57,3 +59,5 @@ dictionary URLPatternComponentResult {
USVString input;
record groups;
};
+
+typedef (USVString or URLPatternInit or URLPattern) URLPatternCompatible;
diff --git a/test/wpt/tests/interfaces/user-timing.idl b/test/fixtures/wpt/interfaces/user-timing.idl
similarity index 100%
rename from test/wpt/tests/interfaces/user-timing.idl
rename to test/fixtures/wpt/interfaces/user-timing.idl
diff --git a/test/wpt/tests/interfaces/vibration.idl b/test/fixtures/wpt/interfaces/vibration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/vibration.idl
rename to test/fixtures/wpt/interfaces/vibration.idl
diff --git a/test/wpt/tests/interfaces/video-rvfc.idl b/test/fixtures/wpt/interfaces/video-rvfc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/video-rvfc.idl
rename to test/fixtures/wpt/interfaces/video-rvfc.idl
diff --git a/test/wpt/tests/interfaces/virtual-keyboard.idl b/test/fixtures/wpt/interfaces/virtual-keyboard.idl
similarity index 100%
rename from test/wpt/tests/interfaces/virtual-keyboard.idl
rename to test/fixtures/wpt/interfaces/virtual-keyboard.idl
diff --git a/test/wpt/tests/interfaces/virtual-keyboard.tentative.idl b/test/fixtures/wpt/interfaces/virtual-keyboard.tentative.idl
similarity index 100%
rename from test/wpt/tests/interfaces/virtual-keyboard.tentative.idl
rename to test/fixtures/wpt/interfaces/virtual-keyboard.tentative.idl
diff --git a/test/wpt/tests/interfaces/wai-aria.idl b/test/fixtures/wpt/interfaces/wai-aria.idl
similarity index 96%
rename from test/wpt/tests/interfaces/wai-aria.idl
rename to test/fixtures/wpt/interfaces/wai-aria.idl
index 3434bf7c2d3..78083f03f91 100644
--- a/test/wpt/tests/interfaces/wai-aria.idl
+++ b/test/fixtures/wpt/interfaces/wai-aria.idl
@@ -8,6 +8,8 @@ interface mixin ARIAMixin {
[CEReactions] attribute Element? ariaActiveDescendantElement;
[CEReactions] attribute DOMString? ariaAtomic;
[CEReactions] attribute DOMString? ariaAutoComplete;
+ [CEReactions] attribute DOMString? ariaBrailleLabel;
+ [CEReactions] attribute DOMString? ariaBrailleRoleDescription;
[CEReactions] attribute DOMString? ariaBusy;
[CEReactions] attribute DOMString? ariaChecked;
[CEReactions] attribute DOMString? ariaColCount;
@@ -55,5 +57,4 @@ interface mixin ARIAMixin {
[CEReactions] attribute DOMString? ariaValueNow;
[CEReactions] attribute DOMString? ariaValueText;
};
-
Element includes ARIAMixin;
diff --git a/test/wpt/tests/interfaces/wasm-js-api.idl b/test/fixtures/wpt/interfaces/wasm-js-api.idl
similarity index 97%
rename from test/wpt/tests/interfaces/wasm-js-api.idl
rename to test/fixtures/wpt/interfaces/wasm-js-api.idl
index 0d4384251df..b4f723d050a 100644
--- a/test/wpt/tests/interfaces/wasm-js-api.idl
+++ b/test/fixtures/wpt/interfaces/wasm-js-api.idl
@@ -62,6 +62,8 @@ dictionary MemoryDescriptor {
interface Memory {
constructor(MemoryDescriptor descriptor);
unsigned long grow([EnforceRange] unsigned long delta);
+ ArrayBuffer toFixedLengthBuffer();
+ ArrayBuffer toResizableBuffer();
readonly attribute ArrayBuffer buffer;
};
diff --git a/test/wpt/tests/interfaces/wasm-web-api.idl b/test/fixtures/wpt/interfaces/wasm-web-api.idl
similarity index 100%
rename from test/wpt/tests/interfaces/wasm-web-api.idl
rename to test/fixtures/wpt/interfaces/wasm-web-api.idl
diff --git a/test/wpt/tests/interfaces/web-animations-2.idl b/test/fixtures/wpt/interfaces/web-animations-2.idl
similarity index 98%
rename from test/wpt/tests/interfaces/web-animations-2.idl
rename to test/fixtures/wpt/interfaces/web-animations-2.idl
index f9f68a0d49a..4c3af535149 100644
--- a/test/wpt/tests/interfaces/web-animations-2.idl
+++ b/test/fixtures/wpt/interfaces/web-animations-2.idl
@@ -14,6 +14,7 @@ partial interface AnimationTimeline {
partial interface Animation {
attribute CSSNumberish? startTime;
attribute CSSNumberish? currentTime;
+ readonly attribute double? progress;
};
[Exposed=Window]
diff --git a/test/wpt/tests/interfaces/web-animations.idl b/test/fixtures/wpt/interfaces/web-animations.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-animations.idl
rename to test/fixtures/wpt/interfaces/web-animations.idl
diff --git a/test/wpt/tests/interfaces/web-app-launch.idl b/test/fixtures/wpt/interfaces/web-app-launch.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-app-launch.idl
rename to test/fixtures/wpt/interfaces/web-app-launch.idl
diff --git a/test/wpt/tests/interfaces/web-bluetooth-scanning.idl b/test/fixtures/wpt/interfaces/web-bluetooth-scanning.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-bluetooth-scanning.idl
rename to test/fixtures/wpt/interfaces/web-bluetooth-scanning.idl
diff --git a/test/wpt/tests/interfaces/web-bluetooth.idl b/test/fixtures/wpt/interfaces/web-bluetooth.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-bluetooth.idl
rename to test/fixtures/wpt/interfaces/web-bluetooth.idl
diff --git a/test/wpt/tests/interfaces/web-locks.idl b/test/fixtures/wpt/interfaces/web-locks.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-locks.idl
rename to test/fixtures/wpt/interfaces/web-locks.idl
diff --git a/test/wpt/tests/interfaces/web-nfc.idl b/test/fixtures/wpt/interfaces/web-nfc.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-nfc.idl
rename to test/fixtures/wpt/interfaces/web-nfc.idl
diff --git a/test/wpt/tests/interfaces/web-otp.idl b/test/fixtures/wpt/interfaces/web-otp.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-otp.idl
rename to test/fixtures/wpt/interfaces/web-otp.idl
diff --git a/test/wpt/tests/interfaces/web-share.idl b/test/fixtures/wpt/interfaces/web-share.idl
similarity index 100%
rename from test/wpt/tests/interfaces/web-share.idl
rename to test/fixtures/wpt/interfaces/web-share.idl
diff --git a/test/wpt/tests/interfaces/webaudio.idl b/test/fixtures/wpt/interfaces/webaudio.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webaudio.idl
rename to test/fixtures/wpt/interfaces/webaudio.idl
diff --git a/test/wpt/tests/interfaces/webauthn.idl b/test/fixtures/wpt/interfaces/webauthn.idl
similarity index 95%
rename from test/wpt/tests/interfaces/webauthn.idl
rename to test/fixtures/wpt/interfaces/webauthn.idl
index e28355eb78d..cf1a2fbdc48 100644
--- a/test/wpt/tests/interfaces/webauthn.idl
+++ b/test/fixtures/wpt/interfaces/webauthn.idl
@@ -32,7 +32,7 @@ dictionary AuthenticatorAttestationResponseJSON {
required Base64URLString authenticatorData;
required sequence transports;
// The publicKey field will be missing if pubKeyCredParams was used to
- // negotiate a public-key algorithm that the user agent doesn’t
+ // negotiate a public-key algorithm that the user agent doesn't
// understand. (See section “Easily accessing credential data” for a
// list of which algorithms user agents must support.) If using such an
// algorithm then the public key must be parsed directly from
@@ -58,7 +58,6 @@ dictionary AuthenticatorAssertionResponseJSON {
required Base64URLString authenticatorData;
required Base64URLString signature;
Base64URLString userHandle;
- Base64URLString attestationObject;
};
dictionary AuthenticationExtensionsClientOutputsJSON {
@@ -77,9 +76,11 @@ partial interface PublicKeyCredential {
};
partial interface PublicKeyCredential {
- static Promise isPasskeyPlatformAuthenticatorAvailable();
+ static Promise getClientCapabilities();
};
+typedef record PublicKeyCredentialClientCapabilities;
+
partial interface PublicKeyCredential {
static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options);
};
@@ -124,8 +125,6 @@ dictionary PublicKeyCredentialRequestOptionsJSON {
sequence allowCredentials = [];
DOMString userVerification = "preferred";
sequence hints = [];
- DOMString attestation = "none";
- sequence attestationFormats = [];
AuthenticationExtensionsClientInputsJSON extensions;
};
@@ -148,7 +147,6 @@ interface AuthenticatorAssertionResponse : AuthenticatorResponse {
[SameObject] readonly attribute ArrayBuffer authenticatorData;
[SameObject] readonly attribute ArrayBuffer signature;
[SameObject] readonly attribute ArrayBuffer? userHandle;
- [SameObject] readonly attribute ArrayBuffer? attestationObject;
};
dictionary PublicKeyCredentialParameters {
@@ -217,8 +215,6 @@ dictionary PublicKeyCredentialRequestOptions {
sequence allowCredentials = [];
DOMString userVerification = "preferred";
sequence hints = [];
- DOMString attestation = "none";
- sequence attestationFormats = [];
AuthenticationExtensionsClientInputs extensions;
};
@@ -270,6 +266,14 @@ enum UserVerificationRequirement {
"discouraged"
};
+enum ClientCapability {
+ "conditionalCreate",
+ "conditionalMediation",
+ "hybridTransport",
+ "passkeyPlatformAuthenticator",
+ "userVerifyingPlatformAuthenticator",
+};
+
enum PublicKeyCredentialHints {
"security-key",
"client-device",
@@ -375,7 +379,7 @@ partial dictionary AuthenticationExtensionsClientInputs {
};
dictionary AuthenticationExtensionsSupplementalPubKeysOutputs {
- sequence signatures;
+ required sequence signatures;
};
partial dictionary AuthenticationExtensionsClientOutputs {
diff --git a/test/wpt/tests/interfaces/webcodecs-aac-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-aac-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-aac-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-aac-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs-av1-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-av1-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-av1-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-av1-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs-avc-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-avc-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-avc-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-avc-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs-flac-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-flac-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-flac-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-flac-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs-hevc-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-hevc-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-hevc-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-hevc-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs-opus-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-opus-codec-registration.idl
similarity index 77%
rename from test/wpt/tests/interfaces/webcodecs-opus-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-opus-codec-registration.idl
index 0d198a6bcde..782a87b37d6 100644
--- a/test/wpt/tests/interfaces/webcodecs-opus-codec-registration.idl
+++ b/test/fixtures/wpt/interfaces/webcodecs-opus-codec-registration.idl
@@ -9,6 +9,8 @@ partial dictionary AudioEncoderConfig {
dictionary OpusEncoderConfig {
OpusBitstreamFormat format = "opus";
+ OpusSignal signal = "auto";
+ OpusApplication application = "audio";
[EnforceRange] unsigned long long frameDuration = 20000;
[EnforceRange] unsigned long complexity;
[EnforceRange] unsigned long packetlossperc = 0;
@@ -20,3 +22,15 @@ enum OpusBitstreamFormat {
"opus",
"ogg",
};
+
+enum OpusSignal {
+ "auto",
+ "music",
+ "voice",
+};
+
+enum OpusApplication {
+ "voip",
+ "audio",
+ "lowdelay",
+};
diff --git a/test/wpt/tests/interfaces/webcodecs-vp9-codec-registration.idl b/test/fixtures/wpt/interfaces/webcodecs-vp9-codec-registration.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcodecs-vp9-codec-registration.idl
rename to test/fixtures/wpt/interfaces/webcodecs-vp9-codec-registration.idl
diff --git a/test/wpt/tests/interfaces/webcodecs.idl b/test/fixtures/wpt/interfaces/webcodecs.idl
similarity index 96%
rename from test/wpt/tests/interfaces/webcodecs.idl
rename to test/fixtures/wpt/interfaces/webcodecs.idl
index 48d89d0b477..c754b2b036c 100644
--- a/test/wpt/tests/interfaces/webcodecs.idl
+++ b/test/fixtures/wpt/interfaces/webcodecs.idl
@@ -158,8 +158,8 @@ dictionary VideoDecoderConfig {
dictionary AudioEncoderConfig {
required DOMString codec;
- [EnforceRange] unsigned long sampleRate;
- [EnforceRange] unsigned long numberOfChannels;
+ [EnforceRange] required unsigned long sampleRate;
+ [EnforceRange] required unsigned long numberOfChannels;
[EnforceRange] unsigned long long bitrate;
BitrateMode bitrateMode = "variable";
};
@@ -371,6 +371,8 @@ dictionary VideoFrameBufferInit {
VideoColorSpaceInit colorSpace;
sequence transfer = [];
+
+ VideoFrameMetadata metadata;
};
dictionary VideoFrameMetadata {
@@ -380,6 +382,8 @@ dictionary VideoFrameMetadata {
dictionary VideoFrameCopyToOptions {
DOMRectInit rect;
sequence layout;
+ VideoPixelFormat format;
+ PredefinedColorSpace colorSpace;
};
dictionary PlaneLayout {
@@ -390,21 +394,37 @@ dictionary PlaneLayout {
enum VideoPixelFormat {
// 4:2:0 Y, U, V
"I420",
+ "I420P10",
+ "I420P12",
// 4:2:0 Y, U, V, A
"I420A",
+ "I420AP10",
+ "I420AP12",
// 4:2:2 Y, U, V
"I422",
+ "I422P10",
+ "I422P12",
+ // 4:2:2 Y, U, V, A
+ "I422A",
+ "I422AP10",
+ "I422AP12",
// 4:4:4 Y, U, V
"I444",
+ "I444P10",
+ "I444P12",
+ // 4:4:4 Y, U, V, A
+ "I444A",
+ "I444AP10",
+ "I444AP12",
// 4:2:0 Y, UV
"NV12",
- // 32bpp RGBA
+ // 4:4:4 RGBA
"RGBA",
- // 32bpp RGBX (opaque)
+ // 4:4:4 RGBX (opaque)
"RGBX",
- // 32bpp BGRA
+ // 4:4:4 BGRA
"BGRA",
- // 32bpp BGRX (opaque)
+ // 4:4:4 BGRX (opaque)
"BGRX",
};
diff --git a/test/wpt/tests/interfaces/webcrypto-secure-curves.idl b/test/fixtures/wpt/interfaces/webcrypto-secure-curves.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webcrypto-secure-curves.idl
rename to test/fixtures/wpt/interfaces/webcrypto-secure-curves.idl
diff --git a/test/wpt/tests/interfaces/webdriver.idl b/test/fixtures/wpt/interfaces/webdriver.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webdriver.idl
rename to test/fixtures/wpt/interfaces/webdriver.idl
diff --git a/test/wpt/tests/interfaces/webgl1.idl b/test/fixtures/wpt/interfaces/webgl1.idl
similarity index 98%
rename from test/wpt/tests/interfaces/webgl1.idl
rename to test/fixtures/wpt/interfaces/webgl1.idl
index b61f031ab28..655c294fc1e 100644
--- a/test/wpt/tests/interfaces/webgl1.idl
+++ b/test/fixtures/wpt/interfaces/webgl1.idl
@@ -37,6 +37,7 @@ dictionary WebGLContextAttributes {
[Exposed=(Window,Worker)]
interface WebGLObject {
+ attribute USVString label;
};
[Exposed=(Window,Worker)]
@@ -467,6 +468,7 @@ interface mixin WebGLRenderingContextBase
const GLenum RGBA4 = 0x8056;
const GLenum RGB5_A1 = 0x8057;
+ const GLenum RGBA8 = 0x8058;
const GLenum RGB565 = 0x8D62;
const GLenum DEPTH_COMPONENT16 = 0x81A5;
const GLenum STENCIL_INDEX8 = 0x8D48;
@@ -516,6 +518,10 @@ interface mixin WebGLRenderingContextBase
readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
readonly attribute GLsizei drawingBufferWidth;
readonly attribute GLsizei drawingBufferHeight;
+ readonly attribute GLenum drawingBufferFormat;
+
+ /* Upon context creation, drawingBufferColorSpace and unpackColorSpace both
+ default to the value "srgb". */
attribute PredefinedColorSpace drawingBufferColorSpace;
attribute PredefinedColorSpace unpackColorSpace;
@@ -525,6 +531,8 @@ interface mixin WebGLRenderingContextBase
sequence? getSupportedExtensions();
object? getExtension(DOMString name);
+ undefined drawingBufferStorage(GLenum sizedFormat, unsigned long width, unsigned long height);
+
undefined activeTexture(GLenum texture);
undefined attachShader(WebGLProgram program, WebGLShader shader);
undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name);
diff --git a/test/wpt/tests/interfaces/webgl2.idl b/test/fixtures/wpt/interfaces/webgl2.idl
similarity index 99%
rename from test/wpt/tests/interfaces/webgl2.idl
rename to test/fixtures/wpt/interfaces/webgl2.idl
index 9cb639932e8..25c2b4dad28 100644
--- a/test/wpt/tests/interfaces/webgl2.idl
+++ b/test/fixtures/wpt/interfaces/webgl2.idl
@@ -42,7 +42,6 @@ interface mixin WebGL2RenderingContextBase
const GLenum STENCIL = 0x1802;
const GLenum RED = 0x1903;
const GLenum RGB8 = 0x8051;
- const GLenum RGBA8 = 0x8058;
const GLenum RGB10_A2 = 0x8059;
const GLenum TEXTURE_BINDING_3D = 0x806A;
const GLenum UNPACK_SKIP_IMAGES = 0x806D;
diff --git a/test/wpt/tests/interfaces/webgpu.idl b/test/fixtures/wpt/interfaces/webgpu.idl
similarity index 93%
rename from test/wpt/tests/interfaces/webgpu.idl
rename to test/fixtures/wpt/interfaces/webgpu.idl
index 373d51dff13..ef5b9c730ab 100644
--- a/test/wpt/tests/interfaces/webgpu.idl
+++ b/test/fixtures/wpt/interfaces/webgpu.idl
@@ -11,7 +11,7 @@ dictionary GPUObjectDescriptorBase {
USVString label = "";
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUSupportedLimits {
readonly attribute unsigned long maxTextureDimension1D;
readonly attribute unsigned long maxTextureDimension2D;
@@ -47,17 +47,17 @@ interface GPUSupportedLimits {
readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUSupportedFeatures {
readonly setlike;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface WGSLLanguageFeatures {
readonly setlike;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUAdapterInfo {
readonly attribute DOMString vendor;
readonly attribute DOMString architecture;
@@ -71,7 +71,7 @@ interface mixin NavigatorGPU {
Navigator includes NavigatorGPU;
WorkerNavigator includes NavigatorGPU;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPU {
Promise requestAdapter(optional GPURequestAdapterOptions options = {});
GPUTextureFormat getPreferredCanvasFormat();
@@ -88,7 +88,7 @@ enum GPUPowerPreference {
"high-performance",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUAdapter {
[SameObject] readonly attribute GPUSupportedFeatures features;
[SameObject] readonly attribute GPUSupportedLimits limits;
@@ -119,7 +119,7 @@ enum GPUFeatureName {
"float32-filterable",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUDevice : EventTarget {
[SameObject] readonly attribute GPUSupportedFeatures features;
[SameObject] readonly attribute GPUSupportedLimits limits;
@@ -150,7 +150,7 @@ interface GPUDevice : EventTarget {
};
GPUDevice includes GPUObjectBase;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUBuffer {
readonly attribute GPUSize64Out size;
readonly attribute GPUFlagsConstant usage;
@@ -179,7 +179,7 @@ dictionary GPUBufferDescriptor
};
typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
namespace GPUBufferUsage {
const GPUFlagsConstant MAP_READ = 0x0001;
const GPUFlagsConstant MAP_WRITE = 0x0002;
@@ -194,13 +194,13 @@ namespace GPUBufferUsage {
};
typedef [EnforceRange] unsigned long GPUMapModeFlags;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
namespace GPUMapMode {
const GPUFlagsConstant READ = 0x0001;
const GPUFlagsConstant WRITE = 0x0002;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUTexture {
GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
@@ -235,7 +235,7 @@ enum GPUTextureDimension {
};
typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
namespace GPUTextureUsage {
const GPUFlagsConstant COPY_SRC = 0x01;
const GPUFlagsConstant COPY_DST = 0x02;
@@ -244,7 +244,7 @@ namespace GPUTextureUsage {
const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUTextureView {
};
GPUTextureView includes GPUObjectBase;
@@ -396,7 +396,7 @@ enum GPUTextureFormat {
"astc-12x12-unorm-srgb",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUExternalTexture {
};
GPUExternalTexture includes GPUObjectBase;
@@ -407,7 +407,7 @@ dictionary GPUExternalTextureDescriptor
PredefinedColorSpace colorSpace = "srgb";
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUSampler {
};
GPUSampler includes GPUObjectBase;
@@ -453,7 +453,7 @@ enum GPUCompareFunction {
"always",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUBindGroupLayout {
};
GPUBindGroupLayout includes GPUObjectBase;
@@ -475,7 +475,7 @@ dictionary GPUBindGroupLayoutEntry {
};
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
namespace GPUShaderStage {
const GPUFlagsConstant VERTEX = 0x1;
const GPUFlagsConstant FRAGMENT = 0x2;
@@ -533,7 +533,7 @@ dictionary GPUStorageTextureBindingLayout {
dictionary GPUExternalTextureBindingLayout {
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUBindGroup {
};
GPUBindGroup includes GPUObjectBase;
@@ -557,7 +557,7 @@ dictionary GPUBufferBinding {
GPUSize64 size;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUPipelineLayout {
};
GPUPipelineLayout includes GPUObjectBase;
@@ -567,7 +567,7 @@ dictionary GPUPipelineLayoutDescriptor
required sequence bindGroupLayouts;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUShaderModule {
Promise getCompilationInfo();
};
@@ -591,7 +591,7 @@ enum GPUCompilationMessageType {
"info",
};
-[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
+[Exposed=(Window, Worker), Serializable, SecureContext]
interface GPUCompilationMessage {
readonly attribute DOMString message;
readonly attribute GPUCompilationMessageType type;
@@ -601,12 +601,12 @@ interface GPUCompilationMessage {
readonly attribute unsigned long long length;
};
-[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
+[Exposed=(Window, Worker), Serializable, SecureContext]
interface GPUCompilationInfo {
readonly attribute FrozenArray messages;
};
-[Exposed=(Window, DedicatedWorker), SecureContext, Serializable]
+[Exposed=(Window, Worker), SecureContext, Serializable]
interface GPUPipelineError : DOMException {
constructor(optional DOMString message = "", GPUPipelineErrorInit options);
readonly attribute GPUPipelineErrorReason reason;
@@ -640,9 +640,9 @@ dictionary GPUProgrammableStage {
record constants;
};
-typedef double GPUPipelineConstantValue; // May represent WGSL’s bool, f32, i32, u32, and f16 if enabled.
+typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled.
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUComputePipeline {
};
GPUComputePipeline includes GPUObjectBase;
@@ -653,7 +653,7 @@ dictionary GPUComputePipelineDescriptor
required GPUProgrammableStage compute;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPURenderPipeline {
};
GPURenderPipeline includes GPUObjectBase;
@@ -721,7 +721,7 @@ dictionary GPUBlendState {
};
typedef [EnforceRange] unsigned long GPUColorWriteFlags;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
namespace GPUColorWrite {
const GPUFlagsConstant RED = 0x1;
const GPUFlagsConstant GREEN = 0x2;
@@ -895,7 +895,7 @@ dictionary GPUImageCopyExternalImage {
boolean flipY = false;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUCommandBuffer {
};
GPUCommandBuffer includes GPUObjectBase;
@@ -907,7 +907,7 @@ dictionary GPUCommandBufferDescriptor
interface mixin GPUCommandsMixin {
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUCommandEncoder {
GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
@@ -972,7 +972,7 @@ interface mixin GPUDebugCommandsMixin {
undefined insertDebugMarker(USVString markerLabel);
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUComputePassEncoder {
undefined setPipeline(GPUComputePipeline pipeline);
undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1);
@@ -996,7 +996,7 @@ dictionary GPUComputePassDescriptor
GPUComputePassTimestampWrites timestampWrites;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPURenderPassEncoder {
undefined setViewport(float x, float y,
float width, float height,
@@ -1093,7 +1093,7 @@ interface mixin GPURenderCommandsMixin {
undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPURenderBundle {
};
GPURenderBundle includes GPUObjectBase;
@@ -1102,7 +1102,7 @@ dictionary GPURenderBundleDescriptor
: GPUObjectDescriptorBase {
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPURenderBundleEncoder {
GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
};
@@ -1122,7 +1122,7 @@ dictionary GPUQueueDescriptor
: GPUObjectDescriptorBase {
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUQueue {
undefined submit(sequence commandBuffers);
@@ -1148,7 +1148,7 @@ interface GPUQueue {
};
GPUQueue includes GPUObjectBase;
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUQuerySet {
undefined destroy();
@@ -1168,7 +1168,7 @@ enum GPUQueryType {
"timestamp",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUCanvasContext {
readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
@@ -1197,7 +1197,7 @@ enum GPUDeviceLostReason {
"destroyed",
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUDeviceLostInfo {
readonly attribute GPUDeviceLostReason reason;
readonly attribute DOMString message;
@@ -1207,24 +1207,24 @@ partial interface GPUDevice {
readonly attribute Promise lost;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUError {
readonly attribute DOMString message;
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUValidationError
: GPUError {
constructor(DOMString message);
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUOutOfMemoryError
: GPUError {
constructor(DOMString message);
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUInternalError
: GPUError {
constructor(DOMString message);
@@ -1241,7 +1241,7 @@ partial interface GPUDevice {
Promise popErrorScope();
};
-[Exposed=(Window, DedicatedWorker), SecureContext]
+[Exposed=(Window, Worker), SecureContext]
interface GPUUncapturedErrorEvent : Event {
constructor(
DOMString type,
@@ -1255,7 +1255,7 @@ dictionary GPUUncapturedErrorEventInit : EventInit {
};
partial interface GPUDevice {
- [Exposed=(Window, DedicatedWorker)]
+ [Exposed=(Window, Worker)]
attribute EventHandler onuncapturederror;
};
diff --git a/test/wpt/tests/interfaces/webhid.idl b/test/fixtures/wpt/interfaces/webhid.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webhid.idl
rename to test/fixtures/wpt/interfaces/webhid.idl
diff --git a/test/wpt/tests/interfaces/webidl.idl b/test/fixtures/wpt/interfaces/webidl.idl
similarity index 93%
rename from test/wpt/tests/interfaces/webidl.idl
rename to test/fixtures/wpt/interfaces/webidl.idl
index 4d0dfaa1062..f3db91096ac 100644
--- a/test/wpt/tests/interfaces/webidl.idl
+++ b/test/fixtures/wpt/interfaces/webidl.idl
@@ -6,13 +6,13 @@
typedef (Int8Array or Int16Array or Int32Array or
Uint8Array or Uint16Array or Uint32Array or Uint8ClampedArray or
BigInt64Array or BigUint64Array or
- Float32Array or Float64Array or DataView) ArrayBufferView;
+ Float16Array or Float32Array or Float64Array or DataView) ArrayBufferView;
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
typedef (ArrayBuffer or SharedArrayBuffer or [AllowShared] ArrayBufferView) AllowSharedBufferSource;
[Exposed=*,
Serializable]
-interface DOMException { // but see below note about ECMAScript binding
+interface DOMException { // but see below note about JavaScript binding
constructor(optional DOMString message = "", optional DOMString name = "Error");
readonly attribute DOMString name;
readonly attribute DOMString message;
diff --git a/test/wpt/tests/interfaces/webmidi.idl b/test/fixtures/wpt/interfaces/webmidi.idl
similarity index 100%
rename from test/wpt/tests/interfaces/webmidi.idl
rename to test/fixtures/wpt/interfaces/webmidi.idl
diff --git a/test/wpt/tests/interfaces/webnn.idl b/test/fixtures/wpt/interfaces/webnn.idl
similarity index 64%
rename from test/wpt/tests/interfaces/webnn.idl
rename to test/fixtures/wpt/interfaces/webnn.idl
index 2a9d0e639fb..9af2879214e 100644
--- a/test/wpt/tests/interfaces/webnn.idl
+++ b/test/fixtures/wpt/interfaces/webnn.idl
@@ -29,11 +29,19 @@ dictionary MLContextOptions {
interface ML {
Promise createContext(optional MLContextOptions options = {});
Promise createContext(GPUDevice gpuDevice);
+};
+
+typedef record MLNamedArrayBufferViews;
+
+dictionary MLComputeResult {
+ MLNamedArrayBufferViews inputs;
+ MLNamedArrayBufferViews outputs;
+};
- [Exposed=(DedicatedWorker)]
- MLContext createContextSync(optional MLContextOptions options = {});
- [Exposed=(DedicatedWorker)]
- MLContext createContextSync(GPUDevice gpuDevice);
+[SecureContext, Exposed=(Window, DedicatedWorker)]
+interface MLContext {
+ Promise compute(
+ MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs);
};
[SecureContext, Exposed=(Window, DedicatedWorker)]
@@ -49,79 +57,28 @@ enum MLOperandDataType {
"float16",
"int32",
"uint32",
+ "int64",
+ "uint64",
"int8",
"uint8"
};
dictionary MLOperandDescriptor {
- // The operand data type.
required MLOperandDataType dataType;
-
- // The dimensions field is only required for tensor operands.
- sequence dimensions;
+ sequence<[EnforceRange] unsigned long> dimensions = [];
};
[SecureContext, Exposed=(Window, DedicatedWorker)]
-interface MLOperand {};
-
-[SecureContext, Exposed=(Window, DedicatedWorker)]
-interface MLActivation {
+interface MLOperand {
+ MLOperandDataType dataType();
+ sequence shape();
};
-typedef record MLNamedArrayBufferViews;
-
[SecureContext, Exposed=(Window, DedicatedWorker)]
-interface MLContext {};
-
-partial interface MLContext {
- [Exposed=(DedicatedWorker)]
- undefined computeSync(
- MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs);
-};
-
-dictionary MLComputeResult {
- MLNamedArrayBufferViews inputs;
- MLNamedArrayBufferViews outputs;
-};
-
-partial interface MLContext {
- Promise compute(
- MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs);
-};
-
-partial interface MLContext {
- MLCommandEncoder createCommandEncoder();
-};
-
-typedef (GPUBuffer or GPUTexture) MLGPUResource;
-
-typedef record MLNamedGPUResources;
-
-[SecureContext, Exposed=(Window, DedicatedWorker)]
-interface MLCommandEncoder {};
-
-partial interface MLCommandEncoder {
- undefined initializeGraph(MLGraph graph);
-};
-
-partial interface MLCommandEncoder {
- undefined dispatch(MLGraph graph, MLNamedGPUResources inputs, MLNamedGPUResources outputs);
-};
-
-partial interface MLCommandEncoder {
- GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
-};
+interface MLActivation {};
typedef record MLNamedOperands;
-dictionary MLBufferResourceView {
- required GPUBuffer resource;
- unsigned long long offset = 0;
- unsigned long long size;
-};
-
-typedef (ArrayBufferView or MLBufferResourceView) MLBufferView;
-
[SecureContext, Exposed=(Window, DedicatedWorker)]
interface MLGraphBuilder {
// Construct the graph builder from the context.
@@ -131,30 +88,41 @@ interface MLGraphBuilder {
MLOperand input(DOMString name, MLOperandDescriptor descriptor);
// Create an operand for a graph constant.
- MLOperand constant(MLOperandDescriptor descriptor, MLBufferView bufferView);
+ MLOperand constant(MLOperandDescriptor descriptor, ArrayBufferView bufferView);
// Create a single-value operand from the specified number of the specified type.
- MLOperand constant(double value, optional MLOperandDataType dataType = "float32");
+ MLOperand constant(double value, optional MLOperandDataType type = "float32");
// Compile the graph up to the specified output operands asynchronously.
Promise build(MLNamedOperands outputs);
+};
+
+dictionary MLArgMinMaxOptions {
+ sequence<[EnforceRange] unsigned long> axes;
+ boolean keepDimensions = false;
+ boolean selectLastIndex = false;
+};
- // Compile the graph up to the specified output operands synchronously.
- [Exposed=(DedicatedWorker)]
- MLGraph buildSync(MLNamedOperands outputs);
+partial interface MLGraphBuilder {
+ MLOperand argMin(MLOperand input, optional MLArgMinMaxOptions options = {});
+ MLOperand argMax(MLOperand input, optional MLArgMinMaxOptions options = {});
};
dictionary MLBatchNormalizationOptions {
MLOperand scale;
MLOperand bias;
- unsigned long axis = 1;
+ [EnforceRange] unsigned long axis = 1;
float epsilon = 1e-5;
MLActivation activation;
};
partial interface MLGraphBuilder {
MLOperand batchNormalization(MLOperand input, MLOperand mean, MLOperand variance,
- optional MLBatchNormalizationOptions options = {});
+ optional MLBatchNormalizationOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand cast(MLOperand input, MLOperandDataType type);
};
dictionary MLClampOptions {
@@ -163,12 +131,12 @@ dictionary MLClampOptions {
};
partial interface MLGraphBuilder {
- MLOperand clamp(MLOperand operand, optional MLClampOptions options = {});
+ MLOperand clamp(MLOperand input, optional MLClampOptions options = {});
MLActivation clamp(optional MLClampOptions options = {});
};
partial interface MLGraphBuilder {
- MLOperand concat(sequence inputs, unsigned long axis);
+ MLOperand concat(sequence inputs, [EnforceRange] unsigned long axis);
};
enum MLConv2dFilterOperandLayout {
@@ -178,18 +146,11 @@ enum MLConv2dFilterOperandLayout {
"ihwo"
};
-enum MLAutoPad {
- "explicit",
- "same-upper",
- "same-lower"
-};
-
dictionary MLConv2dOptions {
- sequence padding;
- sequence strides;
- sequence dilations;
- MLAutoPad autoPad = "explicit";
- unsigned long groups = 1;
+ sequence<[EnforceRange] unsigned long> padding;
+ sequence<[EnforceRange] unsigned long> strides;
+ sequence<[EnforceRange] unsigned long> dilations;
+ [EnforceRange] unsigned long groups = 1;
MLInputOperandLayout inputLayout = "nchw";
MLConv2dFilterOperandLayout filterLayout = "oihw";
MLOperand bias;
@@ -197,7 +158,9 @@ dictionary MLConv2dOptions {
};
partial interface MLGraphBuilder {
- MLOperand conv2d(MLOperand input, MLOperand filter, optional MLConv2dOptions options = {});
+ MLOperand conv2d(MLOperand input,
+ MLOperand filter,
+ optional MLConv2dOptions options = {});
};
enum MLConvTranspose2dFilterOperandLayout {
@@ -207,13 +170,12 @@ enum MLConvTranspose2dFilterOperandLayout {
};
dictionary MLConvTranspose2dOptions {
- sequence padding;
- sequence strides;
- sequence dilations;
- sequence outputPadding;
- sequence outputSizes;
- MLAutoPad autoPad = "explicit";
- unsigned long groups = 1;
+ sequence<[EnforceRange] unsigned long> padding;
+ sequence<[EnforceRange] unsigned long> strides;
+ sequence<[EnforceRange] unsigned long> dilations;
+ sequence<[EnforceRange] unsigned long> outputPadding;
+ sequence<[EnforceRange] unsigned long> outputSizes;
+ [EnforceRange] unsigned long groups = 1;
MLInputOperandLayout inputLayout = "nchw";
MLConvTranspose2dFilterOperandLayout filterLayout = "iohw";
MLOperand bias;
@@ -235,15 +197,28 @@ partial interface MLGraphBuilder {
MLOperand pow(MLOperand a, MLOperand b);
};
+partial interface MLGraphBuilder {
+ MLOperand equal(MLOperand a, MLOperand b);
+ MLOperand greater(MLOperand a, MLOperand b);
+ MLOperand greaterOrEqual(MLOperand a, MLOperand b);
+ MLOperand lesser(MLOperand a, MLOperand b);
+ MLOperand lesserOrEqual(MLOperand a, MLOperand b);
+ MLOperand not(MLOperand a);
+};
+
partial interface MLGraphBuilder {
MLOperand abs(MLOperand input);
MLOperand ceil(MLOperand input);
MLOperand cos(MLOperand input);
+ MLOperand erf(MLOperand input);
MLOperand exp(MLOperand input);
MLOperand floor(MLOperand input);
+ MLOperand identity(MLOperand input);
MLOperand log(MLOperand input);
MLOperand neg(MLOperand input);
+ MLOperand reciprocal(MLOperand input);
MLOperand sin(MLOperand input);
+ MLOperand sqrt(MLOperand input);
MLOperand tan(MLOperand input);
};
@@ -256,6 +231,25 @@ partial interface MLGraphBuilder {
MLActivation elu(optional MLEluOptions options = {});
};
+partial interface MLGraphBuilder {
+ MLOperand expand(MLOperand input, sequence<[EnforceRange] unsigned long> newShape);
+};
+
+dictionary MLGatherOptions {
+ [EnforceRange] unsigned long axis = 0;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand gather(MLOperand input,
+ MLOperand indices,
+ optional MLGatherOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand gelu(MLOperand input);
+ MLActivation gelu();
+};
+
dictionary MLGemmOptions {
MLOperand c;
float alpha = 1.0;
@@ -291,8 +285,11 @@ dictionary MLGruOptions {
};
partial interface MLGraphBuilder {
- sequence gru(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- unsigned long steps, unsigned long hiddenSize,
+ sequence gru(MLOperand input,
+ MLOperand weight,
+ MLOperand recurrentWeight,
+ [EnforceRange] unsigned long steps,
+ [EnforceRange] unsigned long hiddenSize,
optional MLGruOptions options = {});
};
@@ -305,8 +302,11 @@ dictionary MLGruCellOptions {
};
partial interface MLGraphBuilder {
- MLOperand gruCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- MLOperand hiddenState, unsigned long hiddenSize,
+ MLOperand gruCell(MLOperand input,
+ MLOperand weight,
+ MLOperand recurrentWeight,
+ MLOperand hiddenState,
+ [EnforceRange] unsigned long hiddenSize,
optional MLGruCellOptions options = {});
};
@@ -334,7 +334,19 @@ dictionary MLInstanceNormalizationOptions {
partial interface MLGraphBuilder {
MLOperand instanceNormalization(MLOperand input,
- optional MLInstanceNormalizationOptions options = {});
+ optional MLInstanceNormalizationOptions options = {});
+};
+
+dictionary MLLayerNormalizationOptions {
+ MLOperand scale;
+ MLOperand bias;
+ sequence<[EnforceRange] unsigned long> axes;
+ float epsilon = 1e-5;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand layerNormalization(MLOperand input,
+ optional MLLayerNormalizationOptions options = {});
};
dictionary MLLeakyReluOptions {
@@ -374,8 +386,11 @@ dictionary MLLstmOptions {
};
partial interface MLGraphBuilder {
- sequence lstm(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- unsigned long steps, unsigned long hiddenSize,
+ sequence lstm(MLOperand input,
+ MLOperand weight,
+ MLOperand recurrentWeight,
+ [EnforceRange] unsigned long steps,
+ [EnforceRange] unsigned long hiddenSize,
optional MLLstmOptions options = {});
};
@@ -388,8 +403,12 @@ dictionary MLLstmCellOptions {
};
partial interface MLGraphBuilder {
- sequence lstmCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight,
- MLOperand hiddenState, MLOperand cellState, unsigned long hiddenSize,
+ sequence lstmCell(MLOperand input,
+ MLOperand weight,
+ MLOperand recurrentWeight,
+ MLOperand hiddenState,
+ MLOperand cellState,
+ [EnforceRange] unsigned long hiddenSize,
optional MLLstmCellOptions options = {});
};
@@ -411,8 +430,8 @@ dictionary MLPadOptions {
partial interface MLGraphBuilder {
MLOperand pad(MLOperand input,
- sequence beginningPadding,
- sequence endingPadding,
+ sequence<[EnforceRange] unsigned long> beginningPadding,
+ sequence<[EnforceRange] unsigned long> endingPadding,
optional MLPadOptions options = {});
};
@@ -422,14 +441,13 @@ enum MLRoundingType {
};
dictionary MLPool2dOptions {
- sequence windowDimensions;
- sequence padding;
- sequence strides;
- sequence dilations;
- MLAutoPad autoPad = "explicit";
+ sequence<[EnforceRange] unsigned long> windowDimensions;
+ sequence<[EnforceRange] unsigned long> padding;
+ sequence<[EnforceRange] unsigned long> strides;
+ sequence<[EnforceRange] unsigned long> dilations;
MLInputOperandLayout layout = "nchw";
MLRoundingType roundingType = "floor";
- sequence outputSizes;
+ sequence<[EnforceRange] unsigned long> outputSizes;
};
partial interface MLGraphBuilder {
@@ -443,7 +461,7 @@ partial interface MLGraphBuilder {
};
dictionary MLReduceOptions {
- sequence axes = null;
+ sequence<[EnforceRange] unsigned long> axes;
boolean keepDimensions = false;
};
@@ -473,8 +491,8 @@ enum MLInterpolationMode {
dictionary MLResample2dOptions {
MLInterpolationMode mode = "nearest-neighbor";
sequence scales;
- sequence sizes;
- sequence axes;
+ sequence<[EnforceRange] unsigned long> sizes;
+ sequence<[EnforceRange] unsigned long> axes;
};
partial interface MLGraphBuilder {
@@ -482,7 +500,7 @@ partial interface MLGraphBuilder {
};
partial interface MLGraphBuilder {
- MLOperand reshape(MLOperand input, sequence newShape);
+ MLOperand reshape(MLOperand input, sequence<[EnforceRange] unsigned long> newShape);
};
partial interface MLGraphBuilder {
@@ -491,21 +509,19 @@ partial interface MLGraphBuilder {
};
partial interface MLGraphBuilder {
- MLOperand slice(MLOperand input, sequence starts, sequence sizes);
+ MLOperand slice(MLOperand input,
+ sequence<[EnforceRange] unsigned long> starts,
+ sequence<[EnforceRange] unsigned long> sizes);
};
partial interface MLGraphBuilder {
- MLOperand softmax(MLOperand input);
- MLActivation softmax();
-};
-
-dictionary MLSoftplusOptions {
- float steepness = 1;
+ MLOperand softmax(MLOperand input, unsigned long axis);
+ MLActivation softmax(unsigned long axis);
};
partial interface MLGraphBuilder {
- MLOperand softplus(MLOperand input, optional MLSoftplusOptions options = {});
- MLActivation softplus(optional MLSoftplusOptions options = {});
+ MLOperand softplus(MLOperand input);
+ MLActivation softplus();
};
partial interface MLGraphBuilder {
@@ -514,21 +530,14 @@ partial interface MLGraphBuilder {
};
dictionary MLSplitOptions {
- unsigned long axis = 0;
-};
-
-partial interface MLGraphBuilder {
- sequence split(MLOperand input,
- (unsigned long or sequence) splits,
- optional MLSplitOptions options = {});
-};
-
-dictionary MLSqueezeOptions {
- sequence axes;
+ [EnforceRange] unsigned long axis = 0;
};
partial interface MLGraphBuilder {
- MLOperand squeeze(MLOperand input, optional MLSqueezeOptions options = {});
+ sequence split(
+ MLOperand input,
+ ([EnforceRange] unsigned long or sequence<[EnforceRange] unsigned long>) splits,
+ optional MLSplitOptions options = {});
};
partial interface MLGraphBuilder {
@@ -537,9 +546,22 @@ partial interface MLGraphBuilder {
};
dictionary MLTransposeOptions {
- sequence permutation;
+ sequence<[EnforceRange] unsigned long> permutation;
};
partial interface MLGraphBuilder {
MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {});
};
+
+dictionary MLTriangularOptions {
+ boolean upper = true;
+ [EnforceRange] long diagonal = 0;
+};
+
+partial interface MLGraphBuilder {
+ MLOperand triangular(MLOperand input, optional MLTriangularOptions options = {});
+};
+
+partial interface MLGraphBuilder {
+ MLOperand where(MLOperand condition, MLOperand input, MLOperand other);
+};
diff --git a/test/wpt/tests/interfaces/webrtc-encoded-transform.idl b/test/fixtures/wpt/interfaces/webrtc-encoded-transform.idl
similarity index 82%
rename from test/wpt/tests/interfaces/webrtc-encoded-transform.idl
rename to test/fixtures/wpt/interfaces/webrtc-encoded-transform.idl
index 3b169b066dc..0db2f2b9a81 100644
--- a/test/wpt/tests/interfaces/webrtc-encoded-transform.idl
+++ b/test/fixtures/wpt/interfaces/webrtc-encoded-transform.idl
@@ -78,10 +78,15 @@ dictionary RTCEncodedVideoFrameMetadata {
DOMString mimeType;
};
+dictionary RTCEncodedVideoFrameOptions {
+ RTCEncodedVideoFrameMetadata metadata;
+};
+
// New interfaces to define encoded video and audio frames. Will eventually
// re-use or extend the equivalent defined in WebCodecs.
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedVideoFrame {
+ constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameOptions options = {});
readonly attribute RTCEncodedVideoFrameType type;
attribute ArrayBuffer data;
RTCEncodedVideoFrameMetadata getMetadata();
@@ -96,8 +101,13 @@ dictionary RTCEncodedAudioFrameMetadata {
DOMString mimeType;
};
+dictionary RTCEncodedAudioFrameOptions {
+ RTCEncodedAudioFrameMetadata metadata;
+};
+
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedAudioFrame {
+ constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameOptions options = {});
attribute ArrayBuffer data;
RTCEncodedAudioFrameMetadata getMetadata();
};
@@ -112,12 +122,16 @@ partial interface DedicatedWorkerGlobalScope {
};
[Exposed=DedicatedWorker]
-interface RTCRtpScriptTransformer {
+interface RTCRtpScriptTransformer : EventTarget {
+ // Attributes and methods related to the transformer source
readonly attribute ReadableStream readable;
- readonly attribute WritableStream writable;
- readonly attribute any options;
Promise generateKeyFrame(optional DOMString rid);
Promise sendKeyFrameRequest();
+ // Attributes and methods related to the transformer sink
+ readonly attribute WritableStream writable;
+ attribute EventHandler onkeyframerequest;
+ // Attributes for configuring the Javascript code
+ readonly attribute any options;
};
[Exposed=Window]
@@ -125,6 +139,12 @@ interface RTCRtpScriptTransform {
constructor(Worker worker, optional any options, optional sequence