From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../tests/dom/nodes/Document-createEvent.js | 2 +- ...nd-form-and-script-from-fragment.tentative.html | 22 +++ ...eferrer-and-script-from-fragment.tentative.html | 29 ++++ ...Child-script-and-button-from-div.tentative.html | 26 ++++ ...-script-and-custom-from-fragment.tentative.html | 34 +++++ ...default-style-meta-from-fragment.tentative.html | 35 +++++ ...ild-script-and-div-from-fragment.tentative.html | 29 ++++ ...de-appendChild-script-and-iframe.tentative.html | 89 ++++++++++++ ...-script-and-source-from-fragment.tentative.html | 33 +++++ ...ode-appendChild-script-and-style.tentative.html | 118 +++++++++++++++ ...ode-appendChild-script-in-script.tentative.html | 51 +++++++ ...-script-with-mutation-observer-takeRecords.html | 21 +++ ...ndChild-text-and-script-in-style.tentative.html | 30 ++++ .../Node-appendChild-text-in-script.tentative.html | 24 ++++ ...hild-three-scripts-from-fragment.tentative.html | 30 ++++ .../Node-appendChild-three-scripts.tentative.html | 30 ++++ .../insertion-removing-steps/blur-event.window.js | 19 +++ .../insertion-removing-steps-iframe.window.js | 158 +++++++++++++++++++++ .../insertion-removing-steps-script.window.js | 48 +++++++ .../script-does-not-run-on-child-removal.window.js | 33 +++++ 20 files changed, 860 insertions(+), 1 deletion(-) create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-form-and-script-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-button-from-div.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-custom-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-div-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-iframe.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-source-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-style.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-in-script.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-with-mutation-observer-takeRecords.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-and-script-in-style.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts-from-fragment.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/blur-event.window.js create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/insertion-removing-steps-iframe.window.js create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/insertion-removing-steps-script.window.js create mode 100644 testing/web-platform/tests/dom/nodes/insertion-removing-steps/script-does-not-run-on-child-removal.window.js (limited to 'testing/web-platform/tests/dom/nodes') diff --git a/testing/web-platform/tests/dom/nodes/Document-createEvent.js b/testing/web-platform/tests/dom/nodes/Document-createEvent.js index 57e8e966f8..0df5d3f6e1 100644 --- a/testing/web-platform/tests/dom/nodes/Document-createEvent.js +++ b/testing/web-platform/tests/dom/nodes/Document-createEvent.js @@ -16,7 +16,7 @@ var aliases = { "MouseEvents": "MouseEvent", "StorageEvent": "StorageEvent", "SVGEvents": "Event", - "TextEvent": "CompositionEvent", + "TextEvent": "TextEvent", "UIEvent": "UIEvent", "UIEvents": "UIEvent", }; diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-form-and-script-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-form-and-script-from-fragment.tentative.html new file mode 100644 index 0000000000..10351d1645 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-form-and-script-from-fragment.tentative.html @@ -0,0 +1,22 @@ + + +Node.appendChild: inserting script and associated form + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html new file mode 100644 index 0000000000..d247797603 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-append-meta-referrer-and-script-from-fragment.tentative.html @@ -0,0 +1,29 @@ + + +Node.appendChild: inserting script and meta-referrer from a div + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-button-from-div.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-button-from-div.tentative.html new file mode 100644 index 0000000000..91f09ae500 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-button-from-div.tentative.html @@ -0,0 +1,26 @@ + + +Node.appendChild: inserting script and button from a div + + +
+ diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-custom-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-custom-from-fragment.tentative.html new file mode 100644 index 0000000000..23a050f37e --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-custom-from-fragment.tentative.html @@ -0,0 +1,34 @@ + + +Node.appendChild: inserting script and custom element from a DocumentFragment + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html new file mode 100644 index 0000000000..a9b7ba633e --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html @@ -0,0 +1,35 @@ + + +Node.appendChild: inserting script and default-style meta from a fragment + + + +
hello
+ diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-div-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-div-from-fragment.tentative.html new file mode 100644 index 0000000000..b154c1bf4f --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-div-from-fragment.tentative.html @@ -0,0 +1,29 @@ + + +Node.appendChild: inserting script and div from a DocumentFragment + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-iframe.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-iframe.tentative.html new file mode 100644 index 0000000000..68b288f24d --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-iframe.tentative.html @@ -0,0 +1,89 @@ + + +Node.appendChild: inserting script and iframe + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-source-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-source-from-fragment.tentative.html new file mode 100644 index 0000000000..7f93ac43bd --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-source-from-fragment.tentative.html @@ -0,0 +1,33 @@ + + +Node.appendChild: inserting script and source from a fragment + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-style.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-style.tentative.html new file mode 100644 index 0000000000..d3365f8a5e --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-and-style.tentative.html @@ -0,0 +1,118 @@ + + +Node.appendChild: inserting a script and a style where the script modifies the style + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-in-script.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-in-script.tentative.html new file mode 100644 index 0000000000..39c4393323 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-in-script.tentative.html @@ -0,0 +1,51 @@ + + +Node.appendChild: inserting a script and some code in an empty script + + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-with-mutation-observer-takeRecords.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-with-mutation-observer-takeRecords.html new file mode 100644 index 0000000000..33598e6408 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-script-with-mutation-observer-takeRecords.html @@ -0,0 +1,21 @@ + + +Node.appendChild: inserted script should be able to take own mutation record + + + +
+ diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-and-script-in-style.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-and-script-in-style.tentative.html new file mode 100644 index 0000000000..850af680a0 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-and-script-in-style.tentative.html @@ -0,0 +1,30 @@ + + +Node.appendChild: inserting text and script nodes in a style element + + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html new file mode 100644 index 0000000000..4d6543695c --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-text-in-script.tentative.html @@ -0,0 +1,24 @@ + + +Node.appendChild: inserting two text nodes in an empty script + + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts-from-fragment.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts-from-fragment.tentative.html new file mode 100644 index 0000000000..a7b7405b64 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts-from-fragment.tentative.html @@ -0,0 +1,30 @@ + + +Node.appendChild: inserting three scripts from a document fragment + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html new file mode 100644 index 0000000000..6ffa35515e --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/Node-appendChild-three-scripts.tentative.html @@ -0,0 +1,30 @@ + + +Node.appendChild: inserting three scripts from a div + + + + diff --git a/testing/web-platform/tests/dom/nodes/insertion-removing-steps/blur-event.window.js b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/blur-event.window.js new file mode 100644 index 0000000000..4c8cd85cbf --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/insertion-removing-steps/blur-event.window.js @@ -0,0 +1,19 @@ +test(() => { + const input = document.body.appendChild(document.createElement('input')); + input.focus(); + + let blurCalled = false; + input.onblur = e => blurCalled = true; + input.remove(); + assert_false(blurCalled, "Blur event was not fired"); +}, " element does not fire blur event upon DOM removal"); + +test(() => { + const button = document.body.appendChild(document.createElement('button')); + button.focus(); + + let blurCalled = false; + button.onblur = e => blurCalled = true; + button.remove(); + assert_false(blurCalled, "Blur event was not fired"); +}, "