diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 3605e8f3fc9..76b44d9e9cf 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini deleted file mode 100644 index baa9f1a7541..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 73c8d014ee4..6f8d73a891b 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -309,15 +309,6 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ + + + diff --git a/tests/wpt/web-platform-tests/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative.html b/tests/wpt/web-platform-tests/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative.html new file mode 100644 index 00000000000..a9e5790c356 --- /dev/null +++ b/tests/wpt/web-platform-tests/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + + +Testing inserting content at non-collapsed selection around link element + + + + + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html new file mode 100644 index 00000000000..e10d3452b91 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html @@ -0,0 +1,28 @@ + + +window.originAgentCluster must be implied by cross-origin isolation + + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html.headers b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html.headers new file mode 100644 index 00000000000..5f8621ef836 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Opener-Policy: same-origin diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html new file mode 100644 index 00000000000..7cbd89b943f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html @@ -0,0 +1,5 @@ + + +A page with COEP set that will respond when asked + + diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html.headers b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html.headers new file mode 100644 index 00000000000..4e798cd9f5d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: cross-origin diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/clear-window-name.https.html b/tests/wpt/web-platform-tests/html/browsers/windows/clear-window-name.https.html index 39798f1e232..27601eb7f6d 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/clear-window-name.https.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/clear-window-name.https.html @@ -100,6 +100,13 @@ promise_test(async t => { await pollResultAndCheck(t, id, ""); }, "Window.name is reset at the first cross-origin navigation"); +promise_test(async t => { + const id = token(); + + window.open(`resources/window-name.sub.html?open|navOpener=about:blank|reportOpener=${id}|closeOpener|close`, id, "noopener"); + await pollResultAndCheck(t, id, id); +}, "window.name is not reset after navigating to an about:blank page from a non-about:blank page"); + diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html b/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html index 378f588e6b3..0fa874b2cfc 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html @@ -40,6 +40,42 @@ async function proceedTest() { break; } + if (step === "closeOpener") { + if (window.opener) { + window.opener.close(); + } + continue; + } + + if (step.startsWith("navOpener=")) { + if (!window.opener) { + continue; + } + + let url = step.split("=")[1]; + window.opener.location.href = url; + + continue; + } + + if (step === "open") { + const url = new URL(window.location); + url.host = "{{host}}:{{ports[https][0]}}"; + url.search = "?" + steps.join("|"); + window.open(url); + break; + } + + if (step.startsWith("reportOpener=")) { + const id = step.split("=")[1]; + const stashURL = new URL("window-name-stash.py", location); + stashURL.searchParams.set('id', id); + stashURL.searchParams.set('value', window.opener.name); + + await fetch(stashURL, { method: "POST" }); + continue; + } + if (step.startsWith("set=")) { window.name = step.split("=")[1]; continue; diff --git a/tests/wpt/web-platform-tests/input-events/input-events-get-target-ranges.js b/tests/wpt/web-platform-tests/input-events/input-events-get-target-ranges.js index f9404e07a55..004416ec2a0 100644 --- a/tests/wpt/web-platform-tests/input-events/input-events-get-target-ranges.js +++ b/tests/wpt/web-platform-tests/input-events/input-events-get-target-ranges.js @@ -1,5 +1,7 @@ "use strict"; +// TODO: extend `EditorTestUtils` in editing/include/edit-test-utils.mjs + const kBackspaceKey = "\uE003"; const kDeleteKey = "\uE017"; const kArrowRight = "\uE014"; @@ -323,7 +325,7 @@ function setupEditor(innerHTMLWithRangeMarkers) { return { marker: scanResult[0], container: textNode, - offset: scanResult.index + offset, + offset: scanResult.index + offset }; } if (startContainer.nodeType === Node.TEXT_NODE) { @@ -359,7 +361,7 @@ function setupEditor(innerHTMLWithRangeMarkers) { return { marker: scanResult[0], container: textNode, - offset: scanResult.index + offset, + offset: scanResult.index + offset }; } if (startContainer.nodeType === Node.TEXT_NODE) { diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/clients-matchall-blob-url-worker.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/clients-matchall-blob-url-worker.https.html new file mode 100644 index 00000000000..c29bac8b894 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/clients-matchall-blob-url-worker.https.html @@ -0,0 +1,85 @@ + +Service Worker: Clients.matchAll with a blob URL worker client + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/clients-matchall-blob-url-worker.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/clients-matchall-blob-url-worker.html new file mode 100644 index 00000000000..ee89a0d8b3e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/clients-matchall-blob-url-worker.html @@ -0,0 +1,20 @@ + + + + diff --git a/tests/wpt/web-platform-tests/streams/README.md b/tests/wpt/web-platform-tests/streams/README.md index fd964cf7e5b..9ab6e1284ad 100644 --- a/tests/wpt/web-platform-tests/streams/README.md +++ b/tests/wpt/web-platform-tests/streams/README.md @@ -1,3 +1,3 @@ # Streams Tests -The work on the streams tests is closely tracked by the specification authors, who maintain a reference implementation intended to match the spec line-by-line while passing all of these tests. See [the whatwg/streams repository for details](https://github.com/whatwg/streams/tree/master/reference-implementation). Some tests may be in that repository while the spec sections they test are still undergoing heavy churn. +The work on the streams tests is closely tracked by the specification authors, who maintain a reference implementation intended to match the spec line-by-line while passing all of these tests. See [the whatwg/streams repository for details](https://github.com/whatwg/streams/tree/main/reference-implementation). Some tests may be in that repository while the spec sections they test are still undergoing heavy churn. diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/update_hosts.yml b/tests/wpt/web-platform-tests/tools/ci/azure/update_hosts.yml index 2036c419380..64aff7cf46a 100644 --- a/tests/wpt/web-platform-tests/tools/ci/azure/update_hosts.yml +++ b/tests/wpt/web-platform-tests/tools/ci/azure/update_hosts.yml @@ -1,3 +1,6 @@ +parameters: + pyflag: --py3 + steps: - script: ./wpt make-hosts-file | sudo tee -a /etc/hosts displayName: 'Update hosts (macOS)' @@ -5,6 +8,6 @@ steps: - powershell: | $hostFile = "$env:systemroot\System32\drivers\etc\hosts" Copy-Item -Path $hostFile -Destination "$hostFile.back" -Force - python wpt --py2 make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append + python wpt ${{ parameters.pyflag }} make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append displayName: 'Update hosts (Windows)' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/update_manifest.yml b/tests/wpt/web-platform-tests/tools/ci/azure/update_manifest.yml index b636b23a761..e8f28217f1e 100644 --- a/tests/wpt/web-platform-tests/tools/ci/azure/update_manifest.yml +++ b/tests/wpt/web-platform-tests/tools/ci/azure/update_manifest.yml @@ -1,4 +1,7 @@ +parameters: + pyflag: --py3 + steps: # `python wpt` instead of `./wpt` is to make this work on Windows: -- script: python wpt --py2 manifest +- script: python wpt ${{ parameters.pyflag }} manifest displayName: 'Update manifest' diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/link-web-bundle.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/link-web-bundle.tentative.html index 7f6de1014cf..2f10cd6b3fd 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/link-web-bundle.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/link-web-bundle.tentative.html @@ -10,6 +10,7 @@ + diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subresource-loading-from-web-bundle.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subresource-loading-from-web-bundle.tentative.html index 53a9c1b2cc7..6f38f145bc8 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subresource-loading-from-web-bundle.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subresource-loading-from-web-bundle.tentative.html @@ -80,7 +80,42 @@ assert_equals( await loadScriptAndWaitReport(classic_script_url), 'classic script from network'); - }, 'Dynamically loading classic script from web bundle'); + }, 'Dynamically loading classic script from web bundle with link.resources'); + + promise_test(async () => { + const classic_script_url = 'http://web-platform.test:8001/web-bundle/resources/wbn/dynamic/classic_script.js'; + const scope = 'http://web-platform.test:8001/web-bundle/resources/wbn/dynamic/'; + const link = document.createElement("link"); + link.rel = "webbundle"; + link.href = "../resources/wbn/dynamic1.wbn"; + link.scopes.add(scope); + document.body.appendChild(link); + assert_equals( + await loadScriptAndWaitReport(classic_script_url), + 'classic script from dynamic1.wbn'); + link.href = "../resources/wbn/dynamic2.wbn"; + // Loading the classic script should not reuse the previously loaded + // script. So in this case, the script must be loaded from dynamic2.wbn. + assert_equals( + await loadScriptAndWaitReport(classic_script_url), + 'classic script from dynamic2.wbn'); + // Changes the scope not to hit the classic_script.js. + link.scopes = scope + 'dummy'; + // And in this case, the script must be loaded from network. + assert_equals( + await loadScriptAndWaitReport(classic_script_url), + 'classic script from network'); + // Adds the scope to hit the classic_script.js. + link.scopes.add(scope + 'classic_'); + assert_equals( + await loadScriptAndWaitReport(classic_script_url), + 'classic script from dynamic2.wbn'); + document.body.removeChild(link); + // And in this case, the script must be loaded from network. + assert_equals( + await loadScriptAndWaitReport(classic_script_url), + 'classic script from network'); + }, 'Dynamically loading classic script from web bundle with link.scopes'); promise_test(() => { return addLinkAndWaitForLoad("../resources/wbn/dynamic1.wbn?test-event"); @@ -108,7 +143,19 @@ link.resources = url; document.body.appendChild(link); assert_equals(await loadScriptAndWaitReport(url), 'OK'); - }, 'Subresource loading with urn:uuid: URL'); + document.body.removeChild(link); + }, 'Subresource loading with urn:uuid: URL with link.resources'); + + promise_test(async () => { + const url = 'urn:uuid:020111b3-437a-4c5c-ae07-adb6bbffb720'; + const link = document.createElement('link'); + link.rel = 'webbundle'; + link.href = '../resources/wbn/urn-uuid.wbn'; + link.scopes = 'urn:uuid:'; + document.body.appendChild(link); + assert_equals(await loadScriptAndWaitReport(url), 'OK'); + document.body.removeChild(link); + }, 'Subresource loading with urn:uuid: URL with link.scopes'); promise_test(async () => { const wbn_url = 'http://web-platform.test:8001/web-bundle/resources/wbn/subresource.wbn?test-resources-update'; diff --git a/tests/wpt/web-platform-tests/webcodecs/video-decoder.any.js b/tests/wpt/web-platform-tests/webcodecs/video-decoder.any.js index 33ea2dbe375..44e7375a78c 100644 --- a/tests/wpt/web-platform-tests/webcodecs/video-decoder.any.js +++ b/tests/wpt/web-platform-tests/webcodecs/video-decoder.any.js @@ -199,7 +199,7 @@ promise_test(async t => { assert_equals(frame.cropWidth, 320, "cropWidth"); assert_equals(frame.cropHeight, 240, "cropHeight"); assert_equals(frame.timestamp, 0, "timestamp"); - frame.destroy(); + frame.close(); }); }, error(e) { diff --git a/tests/wpt/web-platform-tests/webcodecs/video-encoder.any.js b/tests/wpt/web-platform-tests/webcodecs/video-encoder.any.js index 77fe184bafa..d86e6b61f20 100644 --- a/tests/wpt/web-platform-tests/webcodecs/video-encoder.any.js +++ b/tests/wpt/web-platform-tests/webcodecs/video-encoder.any.js @@ -222,14 +222,14 @@ promise_test(async t => { encoder.encode(frame); - // |frame| is not longer valid since it has been destroyed. + // |frame| is not longer valid since it has been closed. assert_not_equals(frame.timestamp, timestamp); assert_throws_dom("InvalidStateError", () => frame.clone()); encoder.close(); return endAfterEventLoopTurn(); -}, 'Test encoder consumes (destroys) frames.'); +}, 'Test encoder consumes (closes) frames.'); promise_test(async t => { let encoder = new VideoEncoder(getDefaultCodecInit(t)); @@ -251,12 +251,11 @@ promise_test(async t => { let encoder = new VideoEncoder(getDefaultCodecInit(t)); let frame = await createVideoFrame(640, 480, 0); - frame.destroy(); + frame.close(); encoder.configure(defaultConfig); - frame.destroy(); assert_throws_dom("OperationError", () => { encoder.encode(frame) }); -}, 'Verify encoding destroyed frames throws.'); +}, 'Verify encoding closed frames throws.'); diff --git a/tests/wpt/web-platform-tests/webcodecs/video-frame-serialization.any.js b/tests/wpt/web-platform-tests/webcodecs/video-frame-serialization.any.js index 524f94374f4..338f721da8f 100644 --- a/tests/wpt/web-platform-tests/webcodecs/video-frame-serialization.any.js +++ b/tests/wpt/web-platform-tests/webcodecs/video-frame-serialization.any.js @@ -25,8 +25,8 @@ test(t => { assert_equals(frame.cropWidth, clone.cropWidth); assert_equals(frame.cropHeight, clone.cropHeight); - frame.destroy(); - clone.destroy(); + frame.close(); + clone.close(); }, 'Test we can clone a VideoFrame.'); test(t => { @@ -35,23 +35,23 @@ test(t => { let copy = frame; let clone = frame.clone(); - frame.destroy(); + frame.close(); assert_not_equals(copy.timestamp, defaultInit.timestamp); assert_equals(clone.timestamp, defaultInit.timestamp); - clone.destroy(); -}, 'Verify destroying a frame doesn\'t affect its clones.'); + clone.close(); +}, 'Verify closing a frame doesn\'t affect its clones.'); test(t => { let frame = createDefaultVideoFrame(); - frame.destroy(); + frame.close(); assert_throws_dom("InvalidStateError", () => { let clone = frame.clone(); }); -}, 'Verify cloning a destroyed frame throws.'); +}, 'Verify cloning a closed frame throws.'); async_test(t => { let localFrame = createDefaultVideoFrame(); @@ -62,7 +62,7 @@ async_test(t => { externalPort.onmessage = t.step_func((e) => { let externalFrame = e.data; - externalFrame.destroy(); + externalFrame.close(); externalPort.postMessage("Done"); }) @@ -72,7 +72,7 @@ async_test(t => { localPort.postMessage(localFrame); -}, 'Verify destroying frames propagates accross contexts.'); +}, 'Verify closing frames propagates accross contexts.'); async_test(t => { let localFrame = createDefaultVideoFrame(); @@ -83,18 +83,18 @@ async_test(t => { externalPort.onmessage = t.step_func((e) => { let externalFrame = e.data; - externalFrame.destroy(); + externalFrame.close(); externalPort.postMessage("Done"); }) localPort.onmessage = t.step_func_done((e) => { assert_equals(localFrame.timestamp, defaultInit.timestamp); - localFrame.destroy(); + localFrame.close(); }) localPort.postMessage(localFrame.clone()); -}, 'Verify destroying cloned frames doesn\'t propagate accross contexts.'); +}, 'Verify closing cloned frames doesn\'t propagate accross contexts.'); async_test(t => { let localFrame = createDefaultVideoFrame(); @@ -104,11 +104,11 @@ async_test(t => { localPort.onmessage = t.unreached_func(); - localFrame.destroy(); + localFrame.close(); assert_throws_dom("DataCloneError", () => { localPort.postMessage(localFrame); }); t.done(); -}, 'Verify posting destroyed frames throws.'); +}, 'Verify posting closed frames throws.'); diff --git a/tests/wpt/web-platform-tests/webcodecs/video-frame.any.js b/tests/wpt/web-platform-tests/webcodecs/video-frame.any.js index 9eb6699c06a..14cce43baf1 100644 --- a/tests/wpt/web-platform-tests/webcodecs/video-frame.any.js +++ b/tests/wpt/web-platform-tests/webcodecs/video-frame.any.js @@ -12,7 +12,7 @@ test(t => { assert_equals(frame.cropWidth, 32, "displayWidth"); assert_equals(frame.cropHeight, 16, "displayHeight"); - frame.destroy(); + frame.close(); }, 'Test we can construct a VideoFrame.'); test(t => { @@ -24,7 +24,7 @@ test(t => { assert_equals(frame.cropWidth, 1, "displayWidth"); assert_equals(frame.cropHeight, 1, "displayHeight"); - frame.destroy(); + frame.close(); }, 'Test we can construct an odd-sized VideoFrame.'); test(t => { @@ -63,7 +63,7 @@ test(t => { // guarantees about the color space. assert_equals(view[0], 94, "Y value at (0, 0)"); - frame.destroy(); + frame.close(); }, 'Test we can read planar data from a VideoFrame.'); test(t => { @@ -78,15 +78,15 @@ test(t => { assert_equals(frame.planes.length, 3, "number of planes"); - // Attempt to read Y plane data, but destroy the frame first. + // Attempt to read Y plane data, but close the frame first. let yPlane = frame.planes[0]; let yLength = yPlane.length; - frame.destroy(); + frame.close(); let buffer = new ArrayBuffer(yLength); let view = new Uint8Array(buffer); assert_throws_dom("InvalidStateError", () => yPlane.readInto(view)); -}, 'Test we cannot read planar data from a destroyed VideoFrame.'); +}, 'Test we cannot read planar data from a closed VideoFrame.'); test(t => { let image = makeImageBitmap(32, 16); diff --git a/tests/wpt/web-platform-tests/webcodecs/video-track-reader.html b/tests/wpt/web-platform-tests/webcodecs/video-track-reader.html index b5d610e9eac..925e8374f58 100644 --- a/tests/wpt/web-platform-tests/webcodecs/video-track-reader.html +++ b/tests/wpt/web-platform-tests/webcodecs/video-track-reader.html @@ -38,7 +38,7 @@ promise_test(async function(t) { assert_equals(frame.codedWidth, testVideo.width); assert_equals(frame.codedHeight, testVideo.height); assert_not_equals(frame.timestamp, null); - frame.destroy(); + frame.close(); if (++numberFrames == 5) { vtr.stop(); diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html new file mode 100644 index 00000000000..e823bd830c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html @@ -0,0 +1,219 @@ + + +RTCRtpParameters encodings + + + + +