Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update WPT #25250

Merged
merged 7 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions ext/web/03_abort_signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class WeakRefSet {
const add = Symbol("[[add]]");
const signalAbort = Symbol("[[signalAbort]]");
const remove = Symbol("[[remove]]");
const runAbortSteps = Symbol("[[runAbortSteps]]");
const abortReason = Symbol("[[abortReason]]");
const abortAlgos = Symbol("[[abortAlgos]]");
const dependent = Symbol("[[dependent]]");
Expand Down Expand Up @@ -149,26 +150,43 @@ class AbortSignal extends EventTarget {
return;
}
this[abortReason] = reason;

const dependentSignalsToAbort = [];
if (this[dependentSignals] !== null) {
const dependentSignalArray = this[dependentSignals].toArray();
for (let i = 0; i < dependentSignalArray.length; ++i) {
const dependentSignal = dependentSignalArray[i];
if (dependentSignal[abortReason] === undefined) {
dependentSignal[abortReason] = this[abortReason];
ArrayPrototypePush(dependentSignalsToAbort, dependentSignal);
}
}
}

this[runAbortSteps]();

if (dependentSignalsToAbort.length !== 0) {
for (let i = 0; i < dependentSignalsToAbort.length; ++i) {
const dependentSignal = dependentSignalsToAbort[i];
dependentSignal[runAbortSteps]();
}
}
}

[runAbortSteps]() {
const algos = this[abortAlgos];
this[abortAlgos] = null;

if (listenerCount(this, "abort") > 0) {
const event = new Event("abort");
setIsTrusted(event, true);
super.dispatchEvent(event);
}
if (algos !== null) {
for (const algorithm of new SafeSetIterator(algos)) {
algorithm();
}
}

if (this[dependentSignals] !== null) {
const dependentSignalArray = this[dependentSignals].toArray();
for (let i = 0; i < dependentSignalArray.length; ++i) {
const dependentSignal = dependentSignalArray[i];
dependentSignal[signalAbort](reason);
}
if (listenerCount(this, "abort") > 0) {
const event = new Event("abort");
setIsTrusted(event, true);
super.dispatchEvent(event);
}
}

Expand Down
120 changes: 93 additions & 27 deletions tests/wpt/runner/expectation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2554,9 +2554,9 @@
"Document interface: attribute firstElementChild",
"Document interface: attribute lastElementChild",
"Document interface: attribute childElementCount",
"Document interface: operation prepend((Node or TrustedScript or DOMString)...)",
"Document interface: operation append((Node or TrustedScript or DOMString)...)",
"Document interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
"Document interface: operation prepend((Node or DOMString)...)",
"Document interface: operation append((Node or DOMString)...)",
"Document interface: operation replaceChildren((Node or DOMString)...)",
"Document interface: operation querySelector(DOMString)",
"Document interface: operation querySelectorAll(DOMString)",
"Document interface: operation createExpression(DOMString, optional XPathNSResolver?)",
Expand Down Expand Up @@ -2587,9 +2587,9 @@
"DocumentType interface: attribute name",
"DocumentType interface: attribute publicId",
"DocumentType interface: attribute systemId",
"DocumentType interface: operation before((Node or TrustedScript or DOMString)...)",
"DocumentType interface: operation after((Node or TrustedScript or DOMString)...)",
"DocumentType interface: operation replaceWith((Node or TrustedScript or DOMString)...)",
"DocumentType interface: operation before((Node or DOMString)...)",
"DocumentType interface: operation after((Node or DOMString)...)",
"DocumentType interface: operation replaceWith((Node or DOMString)...)",
"DocumentType interface: operation remove()",
"DocumentFragment interface: existence and properties of interface object",
"DocumentFragment interface object length",
Expand All @@ -2602,9 +2602,9 @@
"DocumentFragment interface: attribute firstElementChild",
"DocumentFragment interface: attribute lastElementChild",
"DocumentFragment interface: attribute childElementCount",
"DocumentFragment interface: operation prepend((Node or TrustedScript or DOMString)...)",
"DocumentFragment interface: operation append((Node or TrustedScript or DOMString)...)",
"DocumentFragment interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
"DocumentFragment interface: operation prepend((Node or DOMString)...)",
"DocumentFragment interface: operation append((Node or DOMString)...)",
"DocumentFragment interface: operation replaceChildren((Node or DOMString)...)",
"DocumentFragment interface: operation querySelector(DOMString)",
"DocumentFragment interface: operation querySelectorAll(DOMString)",
"ShadowRoot interface: existence and properties of interface object",
Expand Down Expand Up @@ -2669,16 +2669,16 @@
"Element interface: attribute firstElementChild",
"Element interface: attribute lastElementChild",
"Element interface: attribute childElementCount",
"Element interface: operation prepend((Node or TrustedScript or DOMString)...)",
"Element interface: operation append((Node or TrustedScript or DOMString)...)",
"Element interface: operation replaceChildren((Node or TrustedScript or DOMString)...)",
"Element interface: operation prepend((Node or DOMString)...)",
"Element interface: operation append((Node or DOMString)...)",
"Element interface: operation replaceChildren((Node or DOMString)...)",
"Element interface: operation querySelector(DOMString)",
"Element interface: operation querySelectorAll(DOMString)",
"Element interface: attribute previousElementSibling",
"Element interface: attribute nextElementSibling",
"Element interface: operation before((Node or TrustedScript or DOMString)...)",
"Element interface: operation after((Node or TrustedScript or DOMString)...)",
"Element interface: operation replaceWith((Node or TrustedScript or DOMString)...)",
"Element interface: operation before((Node or DOMString)...)",
"Element interface: operation after((Node or DOMString)...)",
"Element interface: operation replaceWith((Node or DOMString)...)",
"Element interface: operation remove()",
"Element interface: attribute assignedSlot",
"NamedNodeMap interface: existence and properties of interface object",
Expand Down Expand Up @@ -2723,9 +2723,9 @@
"CharacterData interface: operation replaceData(unsigned long, unsigned long, DOMString)",
"CharacterData interface: attribute previousElementSibling",
"CharacterData interface: attribute nextElementSibling",
"CharacterData interface: operation before((Node or TrustedScript or DOMString)...)",
"CharacterData interface: operation after((Node or TrustedScript or DOMString)...)",
"CharacterData interface: operation replaceWith((Node or TrustedScript or DOMString)...)",
"CharacterData interface: operation before((Node or DOMString)...)",
"CharacterData interface: operation after((Node or DOMString)...)",
"CharacterData interface: operation replaceWith((Node or DOMString)...)",
"CharacterData interface: operation remove()",
"Text interface: existence and properties of interface object",
"Text interface object length",
Expand Down Expand Up @@ -3089,7 +3089,16 @@
"Node member must be removed: getFeature",
"Node member must be removed: getUserData",
"Node member must be removed: setUserData",
"Node member must be removed: rootNode"
"Node member must be removed: rootNode",
"The DOMSubtreeModified mutation event must not be fired.",
"The DOMNodeInserted mutation event must not be fired.",
"The DOMNodeRemoved mutation event must not be fired.",
"The DOMNodeRemovedFromDocument mutation event must not be fired.",
"The DOMNodeInsertedIntoDocument mutation event must not be fired.",
"The DOMCharacterDataModified mutation event must not be fired.",
"The DOMAttrModified mutation event must not be fired.",
"The DOMAttributeNameChanged mutation event must not be fired.",
"The DOMElementNameChanged mutation event must not be fired."
],
"idlharness.any.serviceworker.html": false,
"idlharness.any.sharedworker.html": false,
Expand Down Expand Up @@ -4577,7 +4586,31 @@
"≯ (using <a>.host)",
"≯ (using <a>.hostname)",
"≯ (using <area>.host)",
"≯ (using <area>.hostname)"
"≯ (using <area>.hostname)",
"≠ (using <a>.host)",
"≠ (using <a>.hostname)",
"≠ (using <area>.host)",
"≠ (using <area>.hostname)",
"≮ (using <a>.host)",
"≮ (using <a>.hostname)",
"≮ (using <area>.host)",
"≮ (using <area>.hostname)",
"≯ (using <a>.host)",
"≯ (using <a>.hostname)",
"≯ (using <area>.host)",
"≯ (using <area>.hostname)",
"=­̸ (using <a>.host)",
"=­̸ (using <a>.hostname)",
"=­̸ (using <area>.host)",
"=­̸ (using <area>.hostname)",
"<­̸ (using <a>.host)",
"<­̸ (using <a>.hostname)",
"<­̸ (using <area>.host)",
"<­̸ (using <area>.hostname)",
">­̸ (using <a>.host)",
">­̸ (using <a>.hostname)",
">­̸ (using <area>.host)",
">­̸ (using <area>.hostname)"
],
"url-origin.any.html": [
"Origin parsing: <blob:blob:https://example.org/> without base",
Expand Down Expand Up @@ -4850,6 +4883,7 @@
"Parsing: <///example.org/../path/../../path> against <http://example.org/>"
],
"url-constructor.any.html?include=file": [
"Parsing: <file:///w|/m> without base",
"Parsing: </> against <file://h/C:/a/b>",
"Parsing: <file:\\\\//> without base",
"Parsing: <file:\\\\\\\\> without base",
Expand Down Expand Up @@ -4912,6 +4946,7 @@
"Parsing: <///example.org/../path/../../path> against <http://example.org/>"
],
"url-constructor.any.worker.html?include=file": [
"Parsing: <file:///w|/m> without base",
"Parsing: </> against <file://h/C:/a/b>",
"Parsing: <file:\\\\//> without base",
"Parsing: <file:\\\\\\\\> without base",
Expand Down Expand Up @@ -5790,7 +5825,6 @@
"Parsing origin: <wow:%NBD> against <about:blank>",
"Parsing origin: <wow:%1G> against <about:blank>",
"Parsing origin: <wow:￿> against <about:blank>",
"Parsing origin: <http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿> against <about:blank>",
"Parsing origin: <http://!\"$&'()*+,-.;=_`{}~/> against <about:blank>",
"Parsing origin: <sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\u000b\f\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f!\"$%&'()*+,-.;=_`{}~/> against <about:blank>",
"Parsing origin: <ftp://%e2%98%83> against <about:blank>",
Expand Down Expand Up @@ -5891,7 +5925,21 @@
"Parsing origin: <stun:///test> against <about:blank>",
"Parsing origin: <stun://test/a/../b> against <about:blank>",
"Parsing origin: <w://x:0> against <about:blank>",
"Parsing origin: <west://x:0> against <about:blank>"
"Parsing origin: <west://x:0> against <about:blank>",
"Parsing origin: <android://x:0/a> against <about:blank>",
"Parsing origin: <drivefs://x:0/a> against <about:blank>",
"Parsing origin: <chromeos-steam://x:0/a> against <about:blank>",
"Parsing origin: <steam://x:0/a> against <about:blank>",
"Parsing origin: <materialized-view://x:0/a> against <about:blank>",
"Parsing origin: <android-app://x:0> against <about:blank>",
"Parsing origin: <chrome-distiller://x:0> against <about:blank>",
"Parsing origin: <chrome-extension://x:0> against <about:blank>",
"Parsing origin: <chrome-native://x:0> against <about:blank>",
"Parsing origin: <chrome-resource://x:0> against <about:blank>",
"Parsing origin: <chrome-search://x:0> against <about:blank>",
"Parsing origin: <fuchsia-dir://x:0> against <about:blank>",
"Parsing origin: <isolated-app://x:0> against <about:blank>",
"Parsing origin: <http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿> against <about:blank>"
],
"a-element.html?exclude=(file|javascript|mailto)": [
"Test that embedded 0x0A is stripped",
Expand Down Expand Up @@ -6222,7 +6270,6 @@
"Parsing: <wow:%NBD> against <about:blank>",
"Parsing: <wow:%1G> against <about:blank>",
"Parsing: <wow:￿> against <about:blank>",
"Parsing: <http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿> against <about:blank>",
"Parsing: <sc://a\u0000b/> against <about:blank>",
"Parsing: <sc://a b/> against <about:blank>",
"Parsing: <sc://a<b> against <about:blank>",
Expand Down Expand Up @@ -6568,14 +6615,28 @@
"Parsing: <stun://[:1]> against <about:blank>",
"Parsing: <w://x:0> against <about:blank>",
"Parsing: <west://x:0> against <about:blank>",
"Parsing: <android://x:0/a> against <about:blank>",
"Parsing: <drivefs://x:0/a> against <about:blank>",
"Parsing: <chromeos-steam://x:0/a> against <about:blank>",
"Parsing: <steam://x:0/a> against <about:blank>",
"Parsing: <materialized-view://x:0/a> against <about:blank>",
"Parsing: <android-app://x:0> against <about:blank>",
"Parsing: <chrome-distiller://x:0> against <about:blank>",
"Parsing: <chrome-extension://x:0> against <about:blank>",
"Parsing: <chrome-native://x:0> against <about:blank>",
"Parsing: <chrome-resource://x:0> against <about:blank>",
"Parsing: <chrome-search://x:0> against <about:blank>",
"Parsing: <fuchsia-dir://x:0> against <about:blank>",
"Parsing: <isolated-app://x:0> against <about:blank>",
"Parsing: <///test> against <http://example.org/>",
"Parsing: <///\\//\\//test> against <http://example.org/>",
"Parsing: <///example.org/path> against <http://example.org/>",
"Parsing: <///example.org/../path> against <http://example.org/>",
"Parsing: <///example.org/../../> against <http://example.org/>",
"Parsing: <///example.org/../path/../../> against <http://example.org/>",
"Parsing: <///example.org/../path/../../path> against <http://example.org/>",
"Parsing: </\\/\\//example.org/../path> against <http://example.org/>"
"Parsing: </\\/\\//example.org/../path> against <http://example.org/>",
"Parsing: <http://example.com/\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿?\ud800𐟾\udfff﷐﷏﷯ﷰ￾￿> against <about:blank>"
],
"a-element.html?include=file": [
"Test that embedded 0x0A is stripped",
Expand Down Expand Up @@ -6603,6 +6664,11 @@
"Parsing: <file://localhost/test> against <file:///tmp/mock/path>",
"Parsing: <test> against <file:///tmp/mock/path>",
"Parsing: <file:test> against <file:///tmp/mock/path>",
"Parsing: <file:///w|m> against <about:blank>",
"Parsing: <file:///w||m> against <about:blank>",
"Parsing: <file:///w|/m> against <about:blank>",
"Parsing: <file:C|/m/> against <about:blank>",
"Parsing: <file:C||/m/> against <about:blank>",
"Parsing: <file:/example.com/> against <about:blank>",
"Parsing: <file:...> against <http://www.example.com/test>",
"Parsing: <file:..> against <http://www.example.com/test>",
Expand Down Expand Up @@ -10323,9 +10389,9 @@
"import() should not drain the microtask queue if it fails during specifier resolution",
"import() should not drain the microtask queue when loading an already loaded module"
],
"css-import-in-worker.any.worker.html": false,
"with-import-assertions.any.html": false,
"with-import-assertions.any.worker.html": false
"css-import-in-worker.any.worker.html": true,
"with-import-assertions.any.html": true,
"with-import-assertions.any.worker.html": true
}
},
"import-meta": {
Expand Down
2 changes: 1 addition & 1 deletion tests/wpt/suite
Submodule suite updated 3519 files