diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini deleted file mode 100644 index a9005e45d6e..00000000000 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini +++ /dev/null @@ -1,8 +0,0 @@ -[url-charset.window.html] - expected: TIMEOUT - [Blob charset should override any auto-detected charset.] - expected: TIMEOUT - - [Blob charset should override .] - expected: TIMEOUT - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flexbox_justifycontent-center-overflow.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flexbox_justifycontent-center-overflow.html.ini deleted file mode 100644 index 6a17c313296..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-flexbox/flexbox_justifycontent-center-overflow.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[flexbox_justifycontent-center-overflow.html] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index c131078eace..23c61ede1a1 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,3 +17,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini new file mode 100644 index 00000000000..e181af5397f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-invalid-cases.html] + [The root element is the last element returned for otherwise empty queries within the viewport] + 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 a49f9c9d78c..325ac8c3f5b 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 @@ -312,24 +312,24 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ @@ -29,11 +29,14 @@ t.done(); } }); + }); + function startTest() { + var url = new URL("./location_reload-iframe.html", window.location).href; var iframe = document.querySelector("iframe"); iframe.src = url; history_length = history.length; - }); + } diff --git a/tests/wpt/web-platform-tests/interfaces/webhid.idl b/tests/wpt/web-platform-tests/interfaces/webhid.idl index 38d917e1ec0..ad2f0b78653 100644 --- a/tests/wpt/web-platform-tests/interfaces/webhid.idl +++ b/tests/wpt/web-platform-tests/interfaces/webhid.idl @@ -63,60 +63,43 @@ enum HIDUnitSystem { "english-rotation", "vendor-defined", "reserved" }; -[ - Exposed=Window, - SecureContext -] interface HIDReportItem { - readonly attribute boolean isAbsolute; - readonly attribute boolean isArray; - readonly attribute boolean isRange; - readonly attribute boolean hasNull; - readonly attribute FrozenArray usages; - readonly attribute unsigned long usageMinimum; - readonly attribute unsigned long usageMaximum; - readonly attribute unsigned long designatorMinimum; - readonly attribute unsigned long designatorMaximum; - readonly attribute unsigned long stringMinimum; - readonly attribute unsigned long stringMaximum; - readonly attribute unsigned short reportSize; - readonly attribute unsigned short reportCount; - readonly attribute byte unitExponent; - readonly attribute unsigned long unit; - readonly attribute long logicalMinimum; - readonly attribute long logicalMaximum; - readonly attribute long physicalMinimum; - readonly attribute long physicalMaximum; +dictionary HIDReportItem { + boolean isAbsolute; + boolean isArray; + boolean isRange; + boolean hasNull; + sequence usages; + unsigned long usageMinimum; + unsigned long usageMaximum; + unsigned short reportSize; + unsigned short reportCount; + byte unitExponent; + HIDUnitSystem unitSystem; + byte unitFactorLengthExponent; + byte unitFactorMassExponent; + byte unitFactorTimeExponent; + byte unitFactorTemperatureExponent; + byte unitFactorCurrentExponent; + byte unitFactorLuminousIntensityExponent; + long logicalMinimum; + long logicalMaximum; + long physicalMinimum; + long physicalMaximum; + sequence strings; }; -[ - Exposed=Window, - SecureContext -] interface HIDReportInfo { - readonly attribute octet reportId; - readonly attribute FrozenArray items; +dictionary HIDReportInfo { + octet reportId; + sequence items; }; -dictionary HIDFieldOptions { - required octet reportId; - required unsigned long fieldIndex; - boolean isFeatureReport; -}; - -[ - Exposed=Window, - SecureContext -] interface HIDCollectionInfo { - readonly attribute unsigned short usagePage; - readonly attribute unsigned short usage; - readonly attribute FrozenArray children; - readonly attribute FrozenArray inputReports; - readonly attribute FrozenArray outputReports; - readonly attribute FrozenArray featureReports; - readonly attribute FrozenArray reportIds; - - double getField(BufferSource reportData, HIDFieldOptions options); - void setField(BufferSource reportData, HIDFieldOptions options, - double value); +dictionary HIDCollectionInfo { + unsigned short usagePage; + unsigned short usage; + sequence children; + sequence inputReports; + sequence outputReports; + sequence featureReports; }; [ @@ -129,9 +112,9 @@ dictionary HIDFieldOptions { readonly attribute unsigned short productId; readonly attribute DOMString productName; readonly attribute FrozenArray collections; - Promise open(); - Promise close(); - Promise sendReport([EnforceRange] octet reportId, BufferSource data); - Promise sendFeatureReport([EnforceRange] octet reportId, BufferSource data); + Promise open(); + Promise close(); + Promise sendReport([EnforceRange] octet reportId, BufferSource data); + Promise sendFeatureReport([EnforceRange] octet reportId, BufferSource data); Promise receiveFeatureReport([EnforceRange] octet reportId); }; diff --git a/tests/wpt/web-platform-tests/js/builtins/weakrefs/finalizationregistry-cleanupCallback-gets-a-microtask.optional.any.js b/tests/wpt/web-platform-tests/js/builtins/weakrefs/finalizationregistry-cleanupCallback-gets-a-microtask.optional.any.js new file mode 100644 index 00000000000..6365ea7d232 --- /dev/null +++ b/tests/wpt/web-platform-tests/js/builtins/weakrefs/finalizationregistry-cleanupCallback-gets-a-microtask.optional.any.js @@ -0,0 +1,60 @@ +// META: script=resources/maybe-garbage-collect.js +// ├──> maybeGarbageCollectAsync +// └──> resolveGarbageCollection +/*--- +esid: sec-finalization-registry-target +info: | + FinalizationRegistry ( cleanupCallback ) + + Execution + At any time, if a set of objects S is not live, an ECMAScript implementation may perform the + following steps atomically: + + For each obj of S, do + For each WeakRef ref such that ref.[[WeakRefTarget]] is obj, do + Set ref.[[WeakRefTarget]] to empty. + For each FinalizationRegistry fg such that fg.[[Cells]] contains cell, such that + cell.[[WeakRefTarget]] is obj, + Set cell.[[WeakRefTarget]] to empty. + Optionally, perform ! HostCleanupFinalizationRegistry(fg). + + HostCleanupFinalizationRegistry(finalizationRegistry) + + HostCleanupFinalizationRegistry is an implementation-defined abstract operation that is expected + to call CleanupFinalizationRegistry(finalizationRegistry) at some point in the future, if + possible. The host's responsibility is to make this call at a time which does not interrupt + synchronous ECMAScript code execution. +---*/ + +let count = 1_000; +let calls = 0; +let registries = []; +let callback = function() { + calls++; +}; +for (let i = 0; i < count; i++) { + registries.push( + new FinalizationRegistry(callback) + ); +} +setup({ allow_uncaught_exception: true }); + +promise_test((test) => { + assert_implements( + typeof FinalizationRegistry.prototype.register === 'function', + 'FinalizationRegistry.prototype.register is not implemented.' + ); + return (async () => { + + { + let target = {}; + for (let registry of registries) { + registry.register(target, 1); + } + target = null; + } + + await maybeGarbageCollectAsync(); + await test.step_wait(() => calls === count, `Expected ${count} registry cleanups.`); + })().catch(resolveGarbageCollection); +}, 'HostCleanupFinalizationRegistry is an implementation-defined abstract operation that is expected to call CleanupFinalizationRegistry(finalizationRegistry) at some point in the future, if possible.'); diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/largeop-hit-testing.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/largeop-hit-testing.html deleted file mode 100644 index 4f6a7782f27..00000000000 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/largeop-hit-testing.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - -Test hit testing on large operators - - - - - - - - - - - - - - ⫿ - - - - - ⫿ - - - - - - - diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html deleted file mode 100644 index e13a9f47ff4..00000000000 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - -Padding/border/margin on largeop (reference) - -

This test passes if you see a cyan rectangle of width 300px and - height 1500px, surrounded by a 10px blue padding, surrounded by a 10px - blue/yellow dashed border, itself - surrounded by a 10px pink margin.

- -
-
-
-
-
- - diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html deleted file mode 100644 index 1ccfbb7005f..00000000000 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - -Padding/border/margin on largeop - - - - - - - -

This test passes if you see a cyan rectangle of width 300px and - height 1500px, surrounded by a 10px blue padding, surrounded by a 10px - blue/yellow dashed border, itself - surrounded by a 10px pink margin.

-
- - ⫿ - -
- - diff --git a/tests/wpt/web-platform-tests/selection/select-internal.html b/tests/wpt/web-platform-tests/selection/anonymous/details-ancestor.html similarity index 91% rename from tests/wpt/web-platform-tests/selection/select-internal.html rename to tests/wpt/web-platform-tests/selection/anonymous/details-ancestor.html index 305e26d4057..b0adfa68907 100644 --- a/tests/wpt/web-platform-tests/selection/select-internal.html +++ b/tests/wpt/web-platform-tests/selection/anonymous/details-ancestor.html @@ -22,6 +22,12 @@ promise_test(async () => { .pointerUp() .send(); const selection = getSelection(); + + if (selection.anchorNode === null) { + //
is not selectable, which is acceptable + return; + } + // Gecko throws when accessing any property from DOM-invisible node // so check we can access something assert_equals(selection.anchorNode.constructor.name, "HTMLDetailsElement"); diff --git a/tests/wpt/web-platform-tests/selection/anonymous/details-mutate.html b/tests/wpt/web-platform-tests/selection/anonymous/details-mutate.html new file mode 100644 index 00000000000..3cd54751125 --- /dev/null +++ b/tests/wpt/web-platform-tests/selection/anonymous/details-mutate.html @@ -0,0 +1,38 @@ + + +Test selecting anonymous summary element inside details + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/selection/selection-shadow-dom-crash-print.html b/tests/wpt/web-platform-tests/selection/selection-shadow-dom-crash-print.html new file mode 100644 index 00000000000..cf626091739 --- /dev/null +++ b/tests/wpt/web-platform-tests/selection/selection-shadow-dom-crash-print.html @@ -0,0 +1,18 @@ + +Printing with odd selections doesn't crash + + + + + + +
  • x
  • diff --git a/tests/wpt/web-platform-tests/tools/manifest/vcs.py b/tests/wpt/web-platform-tests/tools/manifest/vcs.py index 3dfd7c980d7..344575276b4 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/vcs.py +++ b/tests/wpt/web-platform-tests/tools/manifest/vcs.py @@ -9,11 +9,9 @@ from six.moves.collections_abc import MutableMapping from .utils import git -try: - from ..gitignore import gitignore -except ValueError: - # relative import beyond toplevel throws *ValueError*! - from gitignore import gitignore # type: ignore +# Cannot do `from ..gitignore import gitignore` because +# relative import beyond toplevel throws *ImportError*! +from gitignore import gitignore # type: ignore MYPY = False diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.tentative.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html similarity index 80% rename from tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.tentative.html rename to tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html index 22a98e291ae..a83fa1dbe67 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.tentative.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-detached-execution-context.html @@ -19,12 +19,9 @@ let context = new iframe.contentWindow.AudioContext(); document.body.removeChild(iframe); - // TODO(crbug.com/1060315): This assertion needs to be revised when the - // spec behavior is clarified for the case of a non-existent - // ExecutionContext. should(context.decodeAudioData(new ArrayBuffer(1)), 'decodeAudioData() upon a detached iframe') - .beRejectedWith('NotAllowedError') + .beRejectedWith('InvalidStateError') .then(() => task.done()); }); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/promise-methods-after-discard.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/promise-methods-after-discard.html new file mode 100644 index 00000000000..2fb3c5a50bb --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/promise-methods-after-discard.html @@ -0,0 +1,28 @@ + +Test for rejected promises from methods on an AudioContext in a + discarded browsing context + + + + diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html similarity index 68% rename from tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html rename to tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html index 66d62cf6aa4..6eafd15fd24 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.html @@ -12,7 +12,7 @@ + + + diff --git a/tests/wpt/web-platform-tests/webrtc/protocol/unknown-mediatypes.html b/tests/wpt/web-platform-tests/webrtc/protocol/unknown-mediatypes.html new file mode 100644 index 00000000000..f5176d1c87b --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/protocol/unknown-mediatypes.html @@ -0,0 +1,34 @@ + + +RTCPeerconnection SDP handling of unknown media types + + + +