From 7079acd74d583a14f3c09e16f196a6851381439b Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 4 Sep 2024 16:15:34 +1000 Subject: [PATCH] chore: update WPT (#25250) Co-authored-by: crowlkats --- ext/web/03_abort_signal.js | 40 +++++++--- tests/wpt/runner/expectation.json | 120 +++++++++++++++++++++++------- tests/wpt/suite | 2 +- 3 files changed, 123 insertions(+), 39 deletions(-) diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js index 81844d53fc..ae0701451b 100644 --- a/ext/web/03_abort_signal.js +++ b/ext/web/03_abort_signal.js @@ -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]]"); @@ -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); } } diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 6dfcccf164..ef22d1dd79 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -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?)", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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, @@ -4577,7 +4586,31 @@ "≯ (using .host)", "≯ (using .hostname)", "≯ (using .host)", - "≯ (using .hostname)" + "≯ (using .hostname)", + "≠ (using .host)", + "≠ (using .hostname)", + "≠ (using .host)", + "≠ (using .hostname)", + "≮ (using .host)", + "≮ (using .hostname)", + "≮ (using .host)", + "≮ (using .hostname)", + "≯ (using .host)", + "≯ (using .hostname)", + "≯ (using .host)", + "≯ (using .hostname)", + "=­̸ (using .host)", + "=­̸ (using .hostname)", + "=­̸ (using .host)", + "=­̸ (using .hostname)", + "<­̸ (using .host)", + "<­̸ (using .hostname)", + "<­̸ (using .host)", + "<­̸ (using .hostname)", + ">­̸ (using .host)", + ">­̸ (using .hostname)", + ">­̸ (using .host)", + ">­̸ (using .hostname)" ], "url-origin.any.html": [ "Origin parsing: without base", @@ -4850,6 +4883,7 @@ "Parsing: against " ], "url-constructor.any.html?include=file": [ + "Parsing: without base", "Parsing: against ", "Parsing: without base", "Parsing: without base", @@ -4912,6 +4946,7 @@ "Parsing: against " ], "url-constructor.any.worker.html?include=file": [ + "Parsing: without base", "Parsing: against ", "Parsing: without base", "Parsing: without base", @@ -5790,7 +5825,6 @@ "Parsing origin: against ", "Parsing origin: against ", "Parsing origin: against ", - "Parsing origin: against ", "Parsing origin: against ", "Parsing origin: against ", "Parsing origin: against ", @@ -5891,7 +5925,21 @@ "Parsing origin: against ", "Parsing origin: against ", "Parsing origin: against ", - "Parsing origin: against " + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against ", + "Parsing origin: against " ], "a-element.html?exclude=(file|javascript|mailto)": [ "Test that embedded 0x0A is stripped", @@ -6222,7 +6270,6 @@ "Parsing: against ", "Parsing: against ", "Parsing: against ", - "Parsing: against ", "Parsing: against ", "Parsing: against ", "Parsing: against ", @@ -6568,6 +6615,19 @@ "Parsing: against ", "Parsing: against ", "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", "Parsing: against ", "Parsing: against ", "Parsing: against ", @@ -6575,7 +6635,8 @@ "Parsing: against ", "Parsing: against ", "Parsing: against ", - "Parsing: against " + "Parsing: against ", + "Parsing: against " ], "a-element.html?include=file": [ "Test that embedded 0x0A is stripped", @@ -6603,6 +6664,11 @@ "Parsing: against ", "Parsing: against ", "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", + "Parsing: against ", "Parsing: against ", "Parsing: against ", "Parsing: against ", @@ -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": { diff --git a/tests/wpt/suite b/tests/wpt/suite index a7b5eac8f2..e78446e34a 160000 --- a/tests/wpt/suite +++ b/tests/wpt/suite @@ -1 +1 @@ -Subproject commit a7b5eac8f2cfac28bb12beeea15a9e2b126a568e +Subproject commit e78446e34a1921371658a5df08c71d83f50a2a2f