Diff
Modified: trunk/LayoutTests/TestExpectations (287787 => 287788)
--- trunk/LayoutTests/TestExpectations 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/TestExpectations 2022-01-07 22:56:47 UTC (rev 287788)
@@ -5080,6 +5080,9 @@
webkit.org/b/183994 imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block.html [ Failure ]
+# Test is crashing in Debug builds since import.
+webkit.org/b/234977 [ Debug ] imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html [ Skip ]
+
# Plugins
# FIXME: Remove these tests.
plugins/ [ Skip ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-07 22:56:47 UTC (rev 287788)
@@ -1,5 +1,17 @@
2022-01-07 Chris Dumez <cdu...@apple.com>
+ Resync web-platform-tests/dom from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=234963
+
+ Reviewed by Geoffrey Garen.
+
+ Resync web-platform-tests/dom from upstream 84b2be5b17e8542dea2.
+
+ * resources/resource-files.json:
+ * web-platform-tests/dom/*: Updated.
+
+2022-01-07 Chris Dumez <cdu...@apple.com>
+
Resync web-platform-tests/webaudio from upstream
https://bugs.webkit.org/show_bug.cgi?id=234981
Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/resources/resource-files.json 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/resources/resource-files.json 2022-01-07 22:56:47 UTC (rev 287788)
@@ -1616,7 +1616,11 @@
"web-platform-tests/dom/nodes/getElementsByClassNameFrame.htm",
"web-platform-tests/dom/nodes/node-appendchild-crash.html",
"web-platform-tests/dom/nodes/query-target-in-load-event.part.html",
+ "web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-ref.html",
"web-platform-tests/dom/ranges/Range-test-iframe.html",
+ "web-platform-tests/dom/slot-recalc-ref.html",
+ "web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-subframe.html",
+ "web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-subframe.html",
"web-platform-tests/dom/traversal/unfinished/001.xml",
"web-platform-tests/dom/traversal/unfinished/002.xml",
"web-platform-tests/dom/traversal/unfinished/003.xml",
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -13,4 +13,6 @@
PASS throwIfAborted() should throw abort.reason if signal aborted
PASS throwIfAborted() should throw primitive abort.reason if signal aborted
PASS throwIfAborted() should not throw if signal not aborted
+PASS AbortSignal.reason returns the same DOMException
+PASS AbortController.signal.reason returns the same DOMException
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.js (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.js 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.js 2022-01-07 22:56:47 UTC (rev 287788)
@@ -158,4 +158,33 @@
controller.signal.throwIfAborted();
}, "throwIfAborted() should not throw if signal not aborted");
+test(t => {
+ const signal = AbortSignal.abort();
+
+ assert_true(
+ signal.reason instanceof DOMException,
+ "signal.reason is a DOMException"
+ );
+ assert_equals(
+ signal.reason,
+ signal.reason,
+ "signal.reason returns the same DOMException"
+ );
+}, "AbortSignal.reason returns the same DOMException");
+
+test(t => {
+ const controller = new AbortController();
+ controller.abort();
+
+ assert_true(
+ controller.signal.reason instanceof DOMException,
+ "signal.reason is a DOMException"
+ );
+ assert_equals(
+ controller.signal.reason,
+ controller.signal.reason,
+ "signal.reason returns the same DOMException"
+ );
+}, "AbortController.signal.reason returns the same DOMException");
+
done();
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -13,4 +13,6 @@
PASS throwIfAborted() should throw abort.reason if signal aborted
PASS throwIfAborted() should throw primitive abort.reason if signal aborted
PASS throwIfAborted() should not throw if signal not aborted
+PASS AbortSignal.reason returns the same DOMException
+PASS AbortController.signal.reason returns the same DOMException
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor-expected.txt (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,4 @@
+
+
+PASS AbortSignal.reason.constructor should be from iframe
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>AbortSignal.reason constructor</title>
+<script src=""
+<script src=""
+<iframe id="iframe"></iframe>
+<script>
+ test(() => {
+ const aborted = iframe.contentWindow.AbortSignal.abort();
+ assert_equals(aborted.reason.constructor, iframe.contentWindow.DOMException, "DOMException is using the correct global");
+ }, "AbortSignal.reason.constructor should be from iframe");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -16,3 +16,4 @@
List of files:
/LayoutTests/imported/w3c/web-platform-tests/dom/abort/AbortSignal.any.js
/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.js
+/LayoutTests/imported/w3c/web-platform-tests/dom/abort/reason-constructor.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -1,7 +1,7 @@
PASS Supports passive option on addEventListener only
-FAIL preventDefault should be ignored if-and-only-if the passive option is true assert_equals: Incorrect defaultPrevented for options: undefined expected (boolean) true but got (undefined) undefined
+PASS preventDefault should be ignored if-and-only-if the passive option is true
PASS returnValue should be ignored if-and-only-if the passive option is true
-FAIL passive behavior of one listener should be unaffected by the presence of other listeners assert_equals: Incorrect defaultPrevented for options: {} expected (boolean) true but got (undefined) undefined
+PASS passive behavior of one listener should be unaffected by the presence of other listeners
PASS Equivalence of option values
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.js (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.js 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.js 2022-01-07 22:56:47 UTC (rev 287788)
@@ -22,7 +22,7 @@
assert_false(supportsPassive, "removeEventListener supports the passive option when it should not");
}, "Supports passive option on addEventListener only");
-function testPassiveValue(optionsValue, expectedDefaultPrevented) {
+function testPassiveValue(optionsValue, expectedDefaultPrevented, existingEventTarget) {
var defaultPrevented = undefined;
var handler = function handler(e) {
assert_false(e.defaultPrevented, "Event prematurely marked defaultPrevented");
@@ -29,9 +29,9 @@
e.preventDefault();
defaultPrevented = e.defaultPrevented;
}
- const et = new EventTarget();
+ const et = existingEventTarget || new EventTarget();
et.addEventListener('test', handler, optionsValue);
- var uncanceled = document.body.dispatchEvent(new Event('test', {bubbles: true, cancelable: true}));
+ var uncanceled = et.dispatchEvent(new Event('test', {bubbles: true, cancelable: true}));
assert_equals(defaultPrevented, expectedDefaultPrevented, "Incorrect defaultPrevented for options: " + JSON.stringify(optionsValue));
assert_equals(uncanceled, !expectedDefaultPrevented, "Incorrect return value from dispatchEvent");
@@ -89,7 +89,7 @@
et.addEventListener('test', dummyHandler1, {passive:true});
et.addEventListener('test', dummyHandler2);
- testPassiveValue(optionsValue, expectedDefaultPrevented);
+ testPassiveValue(optionsValue, expectedDefaultPrevented, et);
assert_true(handlerInvoked1, "Extra passive handler not invoked");
assert_true(handlerInvoked2, "Extra non-passive handler not invoked");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.worker-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.worker-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-passive.any.worker-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -1,7 +1,7 @@
PASS Supports passive option on addEventListener only
-FAIL preventDefault should be ignored if-and-only-if the passive option is true Can't find variable: document
+PASS preventDefault should be ignored if-and-only-if the passive option is true
PASS returnValue should be ignored if-and-only-if the passive option is true
-FAIL passive behavior of one listener should be unaffected by the presence of other listeners Can't find variable: document
+PASS passive behavior of one listener should be unaffected by the presence of other listeners
PASS Equivalence of option values
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.js (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.js 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.js 2022-01-07 22:56:47 UTC (rev 287788)
@@ -2,7 +2,7 @@
// Step 1.
test(function() {
- assert_equals(document.removeEventListener("x", null, false), undefined);
- assert_equals(document.removeEventListener("x", null, true), undefined);
- assert_equals(document.removeEventListener("x", null), undefined);
+ assert_equals(globalThis.removeEventListener("x", null, false), undefined);
+ assert_equals(globalThis.removeEventListener("x", null, true), undefined);
+ assert_equals(globalThis.removeEventListener("x", null), undefined);
}, "removing a null event listener should succeed");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.worker-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.worker-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.any.worker-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -1,3 +1,3 @@
-FAIL removing a null event listener should succeed Can't find variable: document
+PASS removing a null event listener should succeed
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker-expected.txt (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,3 @@
+
+FAIL self.event is set before 'handleEvent' lookup assert_equals: expected (object) object "[object Event]" but got (undefined) undefined
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.worker.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move-expected.txt (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,3 @@
+
+PASS Moving a node during mousedown should not crash
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<link rel="author" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+
+<script>
+ function handleDown(node) {
+ var d2 = new Document();
+ d2.appendChild(node);
+ }
+</script>
+
+<!-- No crash should occur if a node is moved during mousedown. -->
+<div id='click' _onmousedown_='handleDown(this)'>Click me</div>
+
+<script>
+ const target = document.getElementById('click');
+ async_test(t => {
+ let actions = new test_driver.Actions()
+ .pointerMove(0, 0, {origin: target})
+ .pointerDown()
+ .pointerUp()
+ .send()
+ .then(t.step_func_done(() => {
+ assert_equals(null,document.getElementById('click'));
+ }))
+ .catch(e => t.step_func(() => assert_unreached('Error')));
+ },'Moving a node during mousedown should not crash');
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -15,4 +15,5 @@
------------------------------------------------------------------------
List of files:
/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/event-global-extra-frame.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/event-global-is-still-set-when-coercing-beforeunload-result-frame.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/resources/prefixed-animation-event-tests.js
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -53,6 +53,7 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopImmediatePropagation.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-cross-realm-getter.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution.https.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-safe-resolution.html
@@ -80,8 +81,11 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.tentative.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-disabled-dynamic.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-extra.window.js
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.js
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/keypress-dispatch-crash.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/legacy-pre-activation-behavior.window.js
/LayoutTests/imported/w3c/web-platform-tests/dom/events/relatedTarget.window.js
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -18,10 +18,11 @@
PASS Historical DOM features must be removed: TypeInfo
PASS Historical DOM features must be removed: UserDataHandler
PASS Historical DOM features must be removed: RangeException
+FAIL Historical DOM features must be removed: SVGPathSegList assert_false: expected false got true
PASS Historical DOM features must be removed: createEntityReference
-FAIL Historical DOM features must be removed: xmlEncoding assert_equals: expected (undefined) undefined but got (object) null
-FAIL Historical DOM features must be removed: xmlStandalone assert_equals: expected (undefined) undefined but got (boolean) false
-FAIL Historical DOM features must be removed: xmlVersion assert_equals: expected (undefined) undefined but got (object) null
+FAIL Historical DOM features must be removed: xmlEncoding assert_false: expected false got true
+FAIL Historical DOM features must be removed: xmlStandalone assert_false: expected false got true
+FAIL Historical DOM features must be removed: xmlVersion assert_false: expected false got true
PASS Historical DOM features must be removed: strictErrorChecking
PASS Historical DOM features must be removed: domConfig
PASS Historical DOM features must be removed: normalizeDocument
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -6,6 +6,7 @@
<script>
function isInterfaceRemoved(name) {
test(function() {
+ assert_false(name in window)
assert_equals(window[name], undefined)
}, "Historical DOM features must be removed: " + name)
}
@@ -28,7 +29,8 @@
"Notation",
"TypeInfo",
"UserDataHandler",
- "RangeException" // DOM Range
+ "RangeException", // DOM Range
+ "SVGPathSegList"
]
removedInterfaces.forEach(isInterfaceRemoved)
@@ -35,7 +37,9 @@
function isRemovedFromDocument(name) {
test(function() {
var doc = document.implementation.createDocument(null,null,null)
+ assert_false(name in document)
assert_equals(document[name], undefined)
+ assert_false(name in doc)
assert_equals(doc[name], undefined)
}, "Historical DOM features must be removed: " + name)
}
@@ -65,6 +69,7 @@
test(function() {
// https://github.com/whatwg/html/commit/e236f46820b93d6fe2e2caae0363331075c6c4fb
assert_false("load" in document);
+ assert_equals(document["load"], undefined)
}, "document.load");
test(function() {
@@ -71,9 +76,11 @@
// https://github.com/whatwg/html/commit/523f7a8773d2ab8a1eb0da6510651e8c5d2a7531
var doc = document.implementation.createDocument(null, null, null);
assert_false("load" in doc);
+ assert_equals(doc["load"], undefined)
}, "XMLDocument.load");
test(function() {
+ assert_false("getFeature" in document.implementation)
assert_equals(document.implementation["getFeature"], undefined)
}, "DOMImplementation.getFeature() must be removed.")
@@ -80,7 +87,9 @@
function isRemovedFromElement(name) {
test(function() {
var ele = document.createElementNS("test", "test")
+ assert_false(name in document.body)
assert_equals(document.body[name], undefined)
+ assert_false(name in ele)
assert_equals(ele[name], undefined)
}, "Historical DOM features must be removed: " + name)
}
@@ -95,6 +104,7 @@
function isRemovedFromAttr(name) {
test(function() {
var attr = document.createAttribute("test")
+ assert_false(name in attr)
assert_equals(attr[name], undefined)
}, "Attr member must be removed: " + name)
}
@@ -107,6 +117,7 @@
function isRemovedFromDoctype(name) {
test(function() {
var doctype = document.implementation.createDocumentType("test", "", "")
+ assert_false(name in doctype)
assert_equals(doctype[name], undefined)
}, "DocumentType member must be removed: " + name)
}
@@ -120,6 +131,7 @@
function isRemovedFromText(name) {
test(function() {
var text = document.createTextNode("test")
+ assert_false(name in text)
assert_equals(text[name], undefined)
}, "Text member must be removed: " + name)
}
@@ -134,8 +146,11 @@
var doc = document.implementation.createDocument(null,null,null)
var doctype = document.implementation.createDocumentType("test", "", "")
var text = document.createTextNode("test")
+ assert_false(name in doc)
assert_equals(doc[name], undefined)
+ assert_false(name in doctype)
assert_equals(doctype[name], undefined)
+ assert_false(name in text)
assert_equals(text[name], undefined)
}, "Node member must be removed: " + name)
}
@@ -155,6 +170,7 @@
function isRemovedFromWindow(name) {
test(function() {
+ assert_false(name in window)
assert_equals(window[name], undefined)
}, "Window member must be removed: " + name)
}
@@ -165,6 +181,7 @@
function isRemovedFromEvent(name) {
test(() => {
+ assert_false(name in Event)
assert_equals(Event[name], undefined)
}, "Event should not have this constant: " + name)
}
@@ -194,7 +211,9 @@
]
EventPrototypeRemoved.forEach(name => {
test(() => {
+ assert_false(name in Event.prototype)
assert_equals(Event.prototype[name], undefined)
+ assert_false(name in new Event("test"))
assert_equals((new Event("test"))[name], undefined)
}, "Event.prototype should not have this property: " + name)
})
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-ref.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-ref.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-ref.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,4 @@
+<!doctype html>
+<title>DOM Test Reference</title>
+<p>You should see the word PASS below.</p>
+<div>PASS</div>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -261,6 +261,7 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/query-target-in-load-event.part.html
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-and-adopt-thcrash.html
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe-ref.html
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-from-shadow-host-and-adopt-into-iframe.html
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-unscopable.html
/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/rootNode.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-ref.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-ref.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-ref.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<div>
+ <p>there should be more text below this</p>
+ <p>PASS if this text is visible</p>
+</div>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,19 @@
+
+
+FAIL parent's |this|, parent's method, parent's filter, parent's root assert_equals: expected function "function TypeError() {
+ [native code]
+}" but got function "function TypeError() {
+ [native code]
+}"
+FAIL parent's |this|, parent's method, parent's filter, iframe's root assert_equals: expected function "function TypeError() {
+ [native code]
+}" but got function "function TypeError() {
+ [native code]
+}"
+FAIL parent's |this|, parent's method, iframe's filter, iframe's root assert_equals: expected function "function TypeError() {
+ [native code]
+}" but got function "function TypeError() {
+ [native code]
+}"
+PASS parent's |this|, iframes's method, iframe's filter, iframe's root
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-expected.txt (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-expected.txt 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,3 @@
+
+PASS TreeWalker: NodeFilter from detached iframe works as expected
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>TreeWalker: NodeFilter from detached iframe works as expected</title>
+<link rel="help" href=""
+<script src=""
+<script src=""
+
+<body>
+<script>
+const t = async_test();
+
+const iframe = document.createElement("iframe");
+iframe.src = ""
+iframe._onload_ = t.step_func_done(() => {
+ const nodeIterator = iframe.contentWindow.createNodeIterator();
+ iframe.remove();
+
+ assert_equals(iframe.contentWindow, null);
+ assert_equals(nodeIterator.nextNode(), document.body);
+ assert_true(nodeIterator.dummyFilterCalled);
+});
+
+document.body.append(iframe);
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<title>TreeWalker: cross-realm NodeFilter throws TypeError of current realm</title>
+<script src=""
+<script src=""
+<link rel="help" href=""
+
+<body id="treeWalkerRoot">
+<div></div>
+
+<script>
+const iframe = document.createElement("iframe");
+iframe.src = ""
+iframe._onload_ = () => {
+ for (const testCase of iframe.contentWindow.testCases) {
+ test(t => {
+ assert_equals(testCase.actual.constructor, testCase.expected);
+ }, testCase.description);
+ }
+};
+document.body.append(iframe);
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-subframe.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-subframe.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-subframe.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+
+<script>
+function createNodeIterator() {
+ function filter() {
+ nodeIterator.dummyFilterCalled = true;
+ return true;
+ }
+ const nodeIterator = parent.document.createNodeIterator(parent.document.body, NodeFilter.SHOW_ELEMENT, filter);
+ nodeIterator.dummyFilterCalled = false;
+ return nodeIterator;
+}
+</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-subframe.html (0 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-subframe.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-subframe.html 2022-01-07 22:56:47 UTC (rev 287788)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+
+<body id="treeWalkerRoot">
+<div></div>
+
+<script>
+window.testCases = [];
+
+(function() {
+ let walker = parent.document.createTreeWalker(parent.treeWalkerRoot, NodeFilter.SHOW_ELEMENT, new parent.Object);
+ try { walker.firstChild(); } catch (err) { testCases.push({ actual: err, expected: parent.TypeError, description: "parent's |this|, parent's method, parent's filter, parent's root" }); }
+
+ walker = parent.document.createTreeWalker(treeWalkerRoot, NodeFilter.SHOW_ELEMENT, new parent.Object);
+ try { walker.firstChild(); } catch (err) { testCases.push({ actual: err, expected: parent.TypeError, description: "parent's |this|, parent's method, parent's filter, iframe's root" }); }
+
+ walker = parent.document.createTreeWalker(treeWalkerRoot, NodeFilter.SHOW_ELEMENT, {});
+ try { walker.firstChild(); } catch (err) { testCases.push({ actual: err, expected: parent.TypeError, description: "parent's |this|, parent's method, iframe's filter, iframe's root" }); }
+
+ walker = document.createTreeWalker.call(parent.document, treeWalkerRoot, NodeFilter.SHOW_ELEMENT, {});
+ try { walker.firstChild(); } catch (err) { testCases.push({ actual: err, expected: TypeError, description: "parent's |this|, iframes's method, iframe's filter, iframe's root" }); }
+})();
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -14,4 +14,6 @@
None
------------------------------------------------------------------------
List of files:
+/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context-subframe.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/TreeWalker-acceptNode-filter-cross-realm-subframe.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/support/assert-node.js
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -17,6 +17,8 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/NodeFilter-constants.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/NodeIterator-removal.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/NodeIterator.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm-null-browsing-context.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-cross-realm.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-basic.html
/LayoutTests/imported/w3c/web-platform-tests/dom/traversal/TreeWalker-currentNode.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log (287787 => 287788)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log 2022-01-07 22:51:45 UTC (rev 287787)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log 2022-01-07 22:56:47 UTC (rev 287788)
@@ -22,6 +22,7 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.any.js
/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js
/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-ref.html
/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc.html
/LayoutTests/imported/w3c/web-platform-tests/dom/svg-insert-crash.html
/LayoutTests/imported/w3c/web-platform-tests/dom/window-extends-event-target.html