From dd49336f6c85b9d14d06c4e6013bd181786bd6bf Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 4 Feb 2019 16:21:06 +0100 Subject: [PATCH 01/31] Test inserting a script and a div from a DocumentFragment The test follows the spec, but the spec is followed only by Safari. --- ...endChild-script-and-div-from-fragment.html | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-div-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-div-from-fragment.html b/dom/nodes/Node-appendChild-script-and-div-from-fragment.html new file mode 100644 index 00000000000000..fa99b98faf0292 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-div-from-fragment.html @@ -0,0 +1,28 @@ + + +Node.appendChild: inserting script and div from a DocumentFragment + + + + + +
+ From b8c4374bd04518df509db5ed9da48e95f60889e1 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 6 Feb 2019 13:10:36 +0100 Subject: [PATCH 02/31] Test inserting a script and a custom element This test too follows the spec, but only Safari defines the custom element before inserting one in the document, other browsers upgrade the custom-element at the time of the customElements.define call because it is already in tree. --- ...Child-script-and-custom-from-fragment.html | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-custom-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html b/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html new file mode 100644 index 00000000000000..ce13f76be00644 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html @@ -0,0 +1,36 @@ + + +Node.appendChild: inserting script and custom element from a DocumentFragment + + + + + +
+ From 05694a94f5bdf89abd39c83943c9b87f7f48d888 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 6 Feb 2019 13:26:09 +0100 Subject: [PATCH 03/31] Test inserting a script and button in a form from a div This test once again follows the spec, but only Safari executes it correctly, with no form owner set on the button at the time of the execution of the script. --- ...ppendChild-script-and-button-from-div.html | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-button-from-div.html diff --git a/dom/nodes/Node-appendChild-script-and-button-from-div.html b/dom/nodes/Node-appendChild-script-and-button-from-div.html new file mode 100644 index 00000000000000..7489dfc4a5dc38 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-button-from-div.html @@ -0,0 +1,34 @@ + + +Node.appendChild: inserting script and button from a div + + + + + +
+ + +
+ From 6e602f633b393f8df7b1835dac0f03ca38adf70f Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 6 Feb 2019 20:49:16 +0100 Subject: [PATCH 04/31] Test inserting three scripts where the first one modifies the third one Safari and Chrome pass that test, Firefox fails it. --- ...pendChild-three-scripts-from-fragment.html | 44 +++++++++++++++++++ dom/nodes/Node-appendChild-three-scripts.html | 44 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 dom/nodes/Node-appendChild-three-scripts-from-fragment.html create mode 100644 dom/nodes/Node-appendChild-three-scripts.html diff --git a/dom/nodes/Node-appendChild-three-scripts-from-fragment.html b/dom/nodes/Node-appendChild-three-scripts-from-fragment.html new file mode 100644 index 00000000000000..c920a8631c7535 --- /dev/null +++ b/dom/nodes/Node-appendChild-three-scripts-from-fragment.html @@ -0,0 +1,44 @@ + + +Node.appendChild: inserting three scripts from a document fragment + + + + + + + +
+ diff --git a/dom/nodes/Node-appendChild-three-scripts.html b/dom/nodes/Node-appendChild-three-scripts.html new file mode 100644 index 00000000000000..e167e74c548140 --- /dev/null +++ b/dom/nodes/Node-appendChild-three-scripts.html @@ -0,0 +1,44 @@ + + +Node.appendChild: inserting three scripts from a div + + + + + + + +
+ From 8a43ca1662dfcfe29633fa87b3c69315b570ebda Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 6 Feb 2019 22:43:43 +0100 Subject: [PATCH 05/31] Test inserting two text nodes from a fragment into an empty script element --- .../Node-appendChild-text-in-script.html | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dom/nodes/Node-appendChild-text-in-script.html diff --git a/dom/nodes/Node-appendChild-text-in-script.html b/dom/nodes/Node-appendChild-text-in-script.html new file mode 100644 index 00000000000000..10143e846b4c1e --- /dev/null +++ b/dom/nodes/Node-appendChild-text-in-script.html @@ -0,0 +1,24 @@ + + +Node.appendChild: inserting two text nodes in an empty script + + + + + + +
+ + From 11214ffc7825ad218877997cf9cc309bd8f9bab4 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Thu, 7 Feb 2019 18:41:54 +0100 Subject: [PATCH 06/31] Test inserting text and script nodes in a style element --- ...-appendChild-text-and-script-in-style.html | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dom/nodes/Node-appendChild-text-and-script-in-style.html diff --git a/dom/nodes/Node-appendChild-text-and-script-in-style.html b/dom/nodes/Node-appendChild-text-and-script-in-style.html new file mode 100644 index 00000000000000..9f384aba69c2a4 --- /dev/null +++ b/dom/nodes/Node-appendChild-text-and-script-in-style.html @@ -0,0 +1,35 @@ + + +Node.appendChild: inserting text and script nodes in a style element + + + + + + +
+ + From 631c9ac27093a7ef37dc735a28467c0c3f4d2ede Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 12 Feb 2019 11:23:47 +0100 Subject: [PATCH 07/31] Test inserting a script and a style where the script modifies the style --- ...dChild-script-and-style-from-fragment.html | 38 +++++++++++++++++++ .../Node-appendChild-script-and-style.html | 38 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-style-from-fragment.html create mode 100644 dom/nodes/Node-appendChild-script-and-style.html diff --git a/dom/nodes/Node-appendChild-script-and-style-from-fragment.html b/dom/nodes/Node-appendChild-script-and-style-from-fragment.html new file mode 100644 index 00000000000000..02dd3c37d400b9 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-style-from-fragment.html @@ -0,0 +1,38 @@ + + +Node.appendChild: inserting a script and a style from a fragment + + + + + + +
+ diff --git a/dom/nodes/Node-appendChild-script-and-style.html b/dom/nodes/Node-appendChild-script-and-style.html new file mode 100644 index 00000000000000..27826709882870 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-style.html @@ -0,0 +1,38 @@ + + +Node.appendChild: inserting a script and a style where the script modifies the style + + + + + + +
+ From 2ddd1252d56cf56aacc7168cf534c18b1885ddac Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 12 Feb 2019 12:09:24 +0100 Subject: [PATCH 08/31] Test inserting a script and some code in an empty script --- .../Node-appendChild-script-in-script.html | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-in-script.html diff --git a/dom/nodes/Node-appendChild-script-in-script.html b/dom/nodes/Node-appendChild-script-in-script.html new file mode 100644 index 00000000000000..3a71dc87da5a5c --- /dev/null +++ b/dom/nodes/Node-appendChild-script-in-script.html @@ -0,0 +1,41 @@ + + +Node.appendChild: inserting a script and some code in an empty script + + + + + + +
+ + From 764320718dbdcfff2eea6e52cdadc5b6bf537b12 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 18 Feb 2019 12:50:14 +0100 Subject: [PATCH 09/31] Test inserting a script and an iframe both at the same time --- ...Child-script-and-iframe-from-fragment.html | 31 +++++++++++++++++++ .../Node-appendChild-script-and-iframe.html | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html create mode 100644 dom/nodes/Node-appendChild-script-and-iframe.html diff --git a/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html b/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html new file mode 100644 index 00000000000000..1004dbbbcb29e1 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html @@ -0,0 +1,31 @@ + + +Node.appendChild: inserting script and iframe from a div + + + + + +
+ + + diff --git a/dom/nodes/Node-appendChild-script-and-iframe.html b/dom/nodes/Node-appendChild-script-and-iframe.html new file mode 100644 index 00000000000000..a6f70dd8c754bd --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-iframe.html @@ -0,0 +1,31 @@ + + +Node.appendChild: inserting script and iframe from a div + + + + + +
+ + + From 66357e18b9f68db02b6ef6b1ee64e08237e18c10 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 18 Feb 2019 13:00:50 +0100 Subject: [PATCH 10/31] Test inserting a script and a stylesheet link both at the same time --- ...ipt-and-stylesheet-link-from-fragment.html | 32 +++++++++++++++++++ ...ppendChild-script-and-stylesheet-link.html | 32 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html create mode 100644 dom/nodes/Node-appendChild-script-and-stylesheet-link.html diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html b/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html new file mode 100644 index 00000000000000..8b253df27e14b8 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html @@ -0,0 +1,32 @@ + + +Node.appendChild: inserting script and stylesheet link from a div + + + + + +
+ + + diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link.html b/dom/nodes/Node-appendChild-script-and-stylesheet-link.html new file mode 100644 index 00000000000000..afc9adb092bd28 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-stylesheet-link.html @@ -0,0 +1,32 @@ + + +Node.appendChild: inserting script and stylesheet link from a div + + + + + +
+ + + From d104e232c736ea2be2c38a0ac6400ecd7ee607e1 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 19 Feb 2019 09:39:39 +0100 Subject: [PATCH 11/31] Test inserting a script and a source in a media element --- ...Child-script-and-source-from-fragment.html | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-source-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-source-from-fragment.html b/dom/nodes/Node-appendChild-script-and-source-from-fragment.html new file mode 100644 index 00000000000000..2aaff89387396e --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-source-from-fragment.html @@ -0,0 +1,37 @@ + + +Node.appendChild: inserting script and source from a fragment + + + + + +
+ + + + From 1e52f0f40e7370b2fa8b9766a9430a1bd380a7d8 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 19 Feb 2019 11:34:12 +0100 Subject: [PATCH 12/31] Test inserting a script and a default-style meta --- ...-and-default-style-meta-from-fragment.html | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html b/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html new file mode 100644 index 00000000000000..44516e56f4b0d4 --- /dev/null +++ b/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html @@ -0,0 +1,39 @@ + + +Node.appendChild: inserting script and default-style meta from a fragment + + + + + + + + + +
+
hello
+ From ae30cc5a62c45fd882f4ac99952de959800396f5 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 9 Dec 2019 17:23:06 +0100 Subject: [PATCH 13/31] rewrite first four files to work again --- ...ppendChild-script-and-button-from-div.html | 37 +++++++-------- ...Child-script-and-custom-from-fragment.html | 40 ++++++++--------- ...-and-default-style-meta-from-fragment.html | 45 +++++++++---------- ...endChild-script-and-div-from-fragment.html | 38 ++++++++-------- 4 files changed, 72 insertions(+), 88 deletions(-) diff --git a/dom/nodes/Node-appendChild-script-and-button-from-div.html b/dom/nodes/Node-appendChild-script-and-button-from-div.html index 7489dfc4a5dc38..4a66220ffb07c5 100644 --- a/dom/nodes/Node-appendChild-script-and-button-from-div.html +++ b/dom/nodes/Node-appendChild-script-and-button-from-div.html @@ -1,9 +1,6 @@ Node.appendChild: inserting script and button from a div - - -
@@ -11,24 +8,20 @@
diff --git a/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html b/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html index ce13f76be00644..0fce38829a045d 100644 --- a/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-custom-from-fragment.html @@ -1,36 +1,32 @@ Node.appendChild: inserting script and custom element from a DocumentFragment - - -
diff --git a/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html b/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html index 44516e56f4b0d4..4915c184524cec 100644 --- a/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-default-style-meta-from-fragment.html @@ -1,39 +1,34 @@ Node.appendChild: inserting script and default-style meta from a fragment - - - -
hello
diff --git a/dom/nodes/Node-appendChild-script-and-div-from-fragment.html b/dom/nodes/Node-appendChild-script-and-div-from-fragment.html index fa99b98faf0292..d6d37be3c071a8 100644 --- a/dom/nodes/Node-appendChild-script-and-div-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-div-from-fragment.html @@ -1,28 +1,28 @@ Node.appendChild: inserting script and div from a DocumentFragment - - -
From 392eed7742113b1e7e3e94a422b2dd40dc3a5951 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 13 Dec 2019 16:53:49 +0100 Subject: [PATCH 14/31] more --- .../Node-appendChild-text-in-script.html | 26 +++++----- ...pendChild-three-scripts-from-fragment.html | 48 +++++++------------ dom/nodes/Node-appendChild-three-scripts.html | 48 +++++++------------ 3 files changed, 51 insertions(+), 71 deletions(-) diff --git a/dom/nodes/Node-appendChild-text-in-script.html b/dom/nodes/Node-appendChild-text-in-script.html index 10143e846b4c1e..654a44f56f7dae 100644 --- a/dom/nodes/Node-appendChild-text-in-script.html +++ b/dom/nodes/Node-appendChild-text-in-script.html @@ -10,15 +10,19 @@
diff --git a/dom/nodes/Node-appendChild-three-scripts-from-fragment.html b/dom/nodes/Node-appendChild-three-scripts-from-fragment.html index c920a8631c7535..3c8c7c13e1054d 100644 --- a/dom/nodes/Node-appendChild-three-scripts-from-fragment.html +++ b/dom/nodes/Node-appendChild-three-scripts-from-fragment.html @@ -1,44 +1,32 @@ Node.appendChild: inserting three scripts from a document fragment - - -
diff --git a/dom/nodes/Node-appendChild-three-scripts.html b/dom/nodes/Node-appendChild-three-scripts.html index e167e74c548140..604217cd0e85e3 100644 --- a/dom/nodes/Node-appendChild-three-scripts.html +++ b/dom/nodes/Node-appendChild-three-scripts.html @@ -1,44 +1,32 @@ Node.appendChild: inserting three scripts from a div - - -
From a339b3524fab7e9528f26ece0a25758641460db1 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 2 Apr 2020 16:46:54 +0200 Subject: [PATCH 15/31] wip --- ...Child-script-and-iframe-from-fragment.html | 33 ++++++-------- .../Node-appendChild-script-and-iframe.html | 34 +++++++------- ...Child-script-and-source-from-fragment.html | 39 ++++++---------- ...dChild-script-and-style-from-fragment.html | 42 +++++++----------- .../Node-appendChild-script-and-style.html | 40 +++++++---------- ...ipt-and-stylesheet-link-from-fragment.html | 37 +++++++--------- ...ppendChild-script-and-stylesheet-link.html | 35 +++++++-------- .../Node-appendChild-script-in-script.html | 44 +++++++------------ 8 files changed, 122 insertions(+), 182 deletions(-) diff --git a/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html b/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html index 1004dbbbcb29e1..37d44756a7f435 100644 --- a/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html @@ -1,31 +1,26 @@ Node.appendChild: inserting script and iframe from a div - - -
- - diff --git a/dom/nodes/Node-appendChild-script-and-iframe.html b/dom/nodes/Node-appendChild-script-and-iframe.html index a6f70dd8c754bd..fa4f7da4a10f85 100644 --- a/dom/nodes/Node-appendChild-script-and-iframe.html +++ b/dom/nodes/Node-appendChild-script-and-iframe.html @@ -1,31 +1,27 @@ Node.appendChild: inserting script and iframe from a div - - -
- - diff --git a/dom/nodes/Node-appendChild-script-and-source-from-fragment.html b/dom/nodes/Node-appendChild-script-and-source-from-fragment.html index 2aaff89387396e..1dc95f577d1408 100644 --- a/dom/nodes/Node-appendChild-script-and-source-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-source-from-fragment.html @@ -1,37 +1,26 @@ Node.appendChild: inserting script and source from a fragment - - -
- - diff --git a/dom/nodes/Node-appendChild-script-and-style-from-fragment.html b/dom/nodes/Node-appendChild-script-and-style-from-fragment.html index 02dd3c37d400b9..9e2c0766f858d0 100644 --- a/dom/nodes/Node-appendChild-script-and-style-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-style-from-fragment.html @@ -1,38 +1,30 @@ Node.appendChild: inserting a script and a style from a fragment - - - -
diff --git a/dom/nodes/Node-appendChild-script-and-style.html b/dom/nodes/Node-appendChild-script-and-style.html index 27826709882870..9b75159f473e20 100644 --- a/dom/nodes/Node-appendChild-script-and-style.html +++ b/dom/nodes/Node-appendChild-script-and-style.html @@ -1,38 +1,30 @@ Node.appendChild: inserting a script and a style where the script modifies the style - - - -
diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html b/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html index 8b253df27e14b8..c8f18dbb7fc621 100644 --- a/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html +++ b/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html @@ -1,32 +1,27 @@ -Node.appendChild: inserting script and stylesheet link from a div - - - +Node.appendChild: inserting script and stylesheet link from a fragment
- - diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link.html b/dom/nodes/Node-appendChild-script-and-stylesheet-link.html index afc9adb092bd28..f803f955484bf7 100644 --- a/dom/nodes/Node-appendChild-script-and-stylesheet-link.html +++ b/dom/nodes/Node-appendChild-script-and-stylesheet-link.html @@ -1,32 +1,27 @@ Node.appendChild: inserting script and stylesheet link from a div - - -
- - diff --git a/dom/nodes/Node-appendChild-script-in-script.html b/dom/nodes/Node-appendChild-script-in-script.html index 3a71dc87da5a5c..b8cd5bc2cac805 100644 --- a/dom/nodes/Node-appendChild-script-in-script.html +++ b/dom/nodes/Node-appendChild-script-in-script.html @@ -1,41 +1,27 @@ Node.appendChild: inserting a script and some code in an empty script - - - -
From 982a1f49953e33c35b8323b0a1b3d461818aac11 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 2 Apr 2020 16:55:46 +0200 Subject: [PATCH 16/31] more cleanup --- ...ppendChild-script-and-button-from-div.html | 2 - ...-and-default-style-meta-from-fragment.html | 2 - .../Node-appendChild-script-in-script.html | 2 +- ...-appendChild-text-and-script-in-style.html | 39 ++++++++----------- .../Node-appendChild-text-in-script.html | 4 -- ...pendChild-three-scripts-from-fragment.html | 2 - dom/nodes/Node-appendChild-three-scripts.html | 2 - 7 files changed, 17 insertions(+), 36 deletions(-) diff --git a/dom/nodes/Node-appendChild-script-and-button-from-div.html b/dom/nodes/Node-appendChild-script-and-button-from-div.html index 4a66220ffb07c5..431483890cabc3 100644 --- a/dom/nodes/Node-appendChild-script-and-button-from-div.html +++ b/dom/nodes/Node-appendChild-script-and-button-from-div.html @@ -4,8 +4,6 @@
- -
- -
hello
diff --git a/dom/nodes/Node-appendChild-text-and-script-in-style.html b/dom/nodes/Node-appendChild-text-and-script-in-style.html index 9f384aba69c2a4..5e734a0ae52ac8 100644 --- a/dom/nodes/Node-appendChild-text-and-script-in-style.html +++ b/dom/nodes/Node-appendChild-text-and-script-in-style.html @@ -1,35 +1,28 @@ Node.appendChild: inserting text and script nodes in a style element - - - -
diff --git a/dom/nodes/Node-appendChild-text-in-script.html b/dom/nodes/Node-appendChild-text-in-script.html index 654a44f56f7dae..746a5a58fd8461 100644 --- a/dom/nodes/Node-appendChild-text-in-script.html +++ b/dom/nodes/Node-appendChild-text-in-script.html @@ -1,12 +1,8 @@ Node.appendChild: inserting two text nodes in an empty script - - - -
- -
- -
diff --git a/dom/nodes/Node-appendChild-script-and-div-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-div-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-iframe-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-iframe.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.html similarity index 70% rename from dom/nodes/Node-appendChild-script-and-iframe.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.html index fa4f7da4a10f85..3be1154ff5fc86 100644 --- a/dom/nodes/Node-appendChild-script-and-iframe.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.html @@ -5,7 +5,7 @@
diff --git a/dom/nodes/Node-appendChild-script-and-source-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-source-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-style-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-style-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-style.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-style.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-style.html diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-stylesheet-link-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.html diff --git a/dom/nodes/Node-appendChild-script-and-stylesheet-link.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.html similarity index 100% rename from dom/nodes/Node-appendChild-script-and-stylesheet-link.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.html diff --git a/dom/nodes/Node-appendChild-script-in-script.html b/dom/nodes/insertion-effects/Node-appendChild-script-in-script.html similarity index 100% rename from dom/nodes/Node-appendChild-script-in-script.html rename to dom/nodes/insertion-effects/Node-appendChild-script-in-script.html diff --git a/dom/nodes/Node-appendChild-text-and-script-in-style.html b/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.html similarity index 100% rename from dom/nodes/Node-appendChild-text-and-script-in-style.html rename to dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.html diff --git a/dom/nodes/Node-appendChild-text-in-script.html b/dom/nodes/insertion-effects/Node-appendChild-text-in-script.html similarity index 100% rename from dom/nodes/Node-appendChild-text-in-script.html rename to dom/nodes/insertion-effects/Node-appendChild-text-in-script.html diff --git a/dom/nodes/Node-appendChild-three-scripts-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.html similarity index 100% rename from dom/nodes/Node-appendChild-three-scripts-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.html diff --git a/dom/nodes/Node-appendChild-three-scripts.html b/dom/nodes/insertion-effects/Node-appendChild-three-scripts.html similarity index 100% rename from dom/nodes/Node-appendChild-three-scripts.html rename to dom/nodes/insertion-effects/Node-appendChild-three-scripts.html From 3ee610583e5a9662624a75c9368db95ffbebed85 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Mon, 19 Feb 2024 20:59:19 +0000 Subject: [PATCH 18/31] Add .tentative --- ...=> Node-appendChild-script-and-button-from-div.tentative.html} | 0 ...de-appendChild-script-and-custom-from-fragment.tentative.html} | 0 ...ld-script-and-default-style-meta-from-fragment.tentative.html} | 0 ... Node-appendChild-script-and-div-from-fragment.tentative.html} | 0 ...de-appendChild-script-and-iframe-from-fragment.tentative.html} | 0 ...ame.html => Node-appendChild-script-and-iframe.tentative.html} | 0 ...de-appendChild-script-and-source-from-fragment.tentative.html} | 0 ...ode-appendChild-script-and-style-from-fragment.tentative.html} | 0 ...tyle.html => Node-appendChild-script-and-style.tentative.html} | 0 ...Child-script-and-stylesheet-link-from-fragment.tentative.html} | 0 ...=> Node-appendChild-script-and-stylesheet-link.tentative.html} | 0 ...ript.html => Node-appendChild-script-in-script.tentative.html} | 0 ...l => Node-appendChild-text-and-script-in-style.tentative.html} | 0 ...script.html => Node-appendChild-text-in-script.tentative.html} | 0 ...> Node-appendChild-three-scripts-from-fragment.tentative.html} | 0 ...scripts.html => Node-appendChild-three-scripts.tentative.html} | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-button-from-div.html => Node-appendChild-script-and-button-from-div.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-custom-from-fragment.html => Node-appendChild-script-and-custom-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-default-style-meta-from-fragment.html => Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-div-from-fragment.html => Node-appendChild-script-and-div-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-iframe-from-fragment.html => Node-appendChild-script-and-iframe-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-iframe.html => Node-appendChild-script-and-iframe.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-source-from-fragment.html => Node-appendChild-script-and-source-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-style-from-fragment.html => Node-appendChild-script-and-style-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-style.html => Node-appendChild-script-and-style.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-stylesheet-link-from-fragment.html => Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-and-stylesheet-link.html => Node-appendChild-script-and-stylesheet-link.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-script-in-script.html => Node-appendChild-script-in-script.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-text-and-script-in-style.html => Node-appendChild-text-and-script-in-style.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-text-in-script.html => Node-appendChild-text-in-script.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-three-scripts-from-fragment.html => Node-appendChild-three-scripts-from-fragment.tentative.html} (100%) rename dom/nodes/insertion-effects/{Node-appendChild-three-scripts.html => Node-appendChild-three-scripts.tentative.html} (100%) diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-style.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.html rename to dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-in-script.html b/dom/nodes/insertion-effects/Node-appendChild-script-in-script.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-script-in-script.html rename to dom/nodes/insertion-effects/Node-appendChild-script-in-script.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.html b/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.html rename to dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-text-in-script.html b/dom/nodes/insertion-effects/Node-appendChild-text-in-script.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-text-in-script.html rename to dom/nodes/insertion-effects/Node-appendChild-text-in-script.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.html b/dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.html rename to dom/nodes/insertion-effects/Node-appendChild-three-scripts-from-fragment.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-three-scripts.html b/dom/nodes/insertion-effects/Node-appendChild-three-scripts.tentative.html similarity index 100% rename from dom/nodes/insertion-effects/Node-appendChild-three-scripts.html rename to dom/nodes/insertion-effects/Node-appendChild-three-scripts.tentative.html From d598cb5229562a95075fa946ca11f1568a64a949 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 20 Feb 2024 16:18:27 +0000 Subject: [PATCH 19/31] Change expected results to match batch insertion --- ...dChild-iframe-before-script.tentative.html | 27 +++++++++++++++++++ ...dChild-script-before-iframe.tentative.html | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html create mode 100644 dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html diff --git a/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html new file mode 100644 index 00000000000000..305e4be11cf30b --- /dev/null +++ b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html @@ -0,0 +1,27 @@ + + +Node.appendChild: inserting script and iframe from a div + + +
+ diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html new file mode 100644 index 00000000000000..fbe8b334b502e9 --- /dev/null +++ b/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html @@ -0,0 +1,27 @@ + + +Node.appendChild: inserting script and iframe from a div + + +
+ From 68ee4c1116a94afea8ae0d9053fb3832cac2e4fe Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Thu, 22 Feb 2024 17:38:37 +0000 Subject: [PATCH 20/31] Update dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html Co-authored-by: Dominic Farolino --- .../Node-appendChild-script-and-button-from-div.tentative.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html index 431483890cabc3..38973e46542b92 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html @@ -13,7 +13,7 @@ const script = document.createElement("script"); script.textContent = ` buttonForm = button.form; -`; + `; button = document.createElement("button"); const div = document.createElement("div"); div.appendChild(script); From b8c3dd0006091a0dbbb39035e49653ed2d07ddba Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Thu, 22 Feb 2024 17:38:56 +0000 Subject: [PATCH 21/31] Update dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html Co-authored-by: Dominic Farolino --- ...hild-script-and-stylesheet-link-from-fragment.tentative.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html index c8f18dbb7fc621..958c74ee46a5f3 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html @@ -9,7 +9,7 @@ const link = document.createElement("link"); test(() => { link.rel = "stylesheet"; - link.href = "data:text/css," + link.href = "data:text/css,"; const script = document.createElement("script"); script.textContent = ` From 70b05960251069439134386d6970e722ce0d4024 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Fri, 23 Feb 2024 11:46:24 +0000 Subject: [PATCH 22/31] Apply suggestions from code review Co-authored-by: Dominic Farolino --- .../Node-appendChild-iframe-before-script.tentative.html | 2 +- ...script-and-default-style-meta-from-fragment.tentative.html | 2 +- ...appendChild-script-and-iframe-from-fragment.tentative.html | 4 ++-- .../Node-appendChild-script-and-style.tentative.html | 2 +- ...Node-appendChild-script-and-stylesheet-link.tentative.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html index 305e4be11cf30b..1433892be6a0e7 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html @@ -9,7 +9,7 @@ const iframe = document.createElement("iframe"); test(() => { - iframe.src = "data:text/html," + iframe.src = "data:text/html,"; const script = document.createElement("script"); script.textContent = ` diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html index ad3a19cd2d72c5..25f4448fbdbb5d 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html @@ -22,7 +22,7 @@ const df = document.createDocumentFragment(); df.appendChild(script); df.appendChild(meta); - assert_equals(getComputedStyle(div).display, "block", "div is not a block"); + assert_equals(getComputedStyle(div).display, "block", "div has block display"); assert_false(scriptRan, "script ran"); document.head.appendChild(df); assert_true(scriptRan, "script has not run"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html index 37d44756a7f435..80250b84f84be9 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe-from-fragment.tentative.html @@ -1,6 +1,6 @@ -Node.appendChild: inserting script and iframe from a div +Node.appendChild: inserting script and iframe from a DocumentFragment
@@ -21,6 +21,6 @@ assert_array_equals(happened, []); document.body.appendChild(df); - assert_array_equals(happened, [false]) + assert_array_equals(happened, [false], "Script inserted before iframe can observe iframe's contentWindow"); }); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html index 9b75159f473e20..3e8b1456611bf7 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html @@ -9,7 +9,7 @@ const style = document.createElement("style"); let styleSheet = null; test(() => { -style.appendChild(new Text("body {}")); + style.appendChild(new Text("body {}")); const script = document.createElement("script"); script.textContent = ` happened.push(style.sheet === null); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html index f803f955484bf7..a28f77ece24039 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html @@ -9,7 +9,7 @@ const link = document.createElement("link"); test(() => { link.rel = "stylesheet"; - link.href = "data:text/css," + link.href = "data:text/css,"; const script = document.createElement("script"); script.textContent = ` From e5eaa85ddfd8b86c5dc9ee0a8cf4e10754e2dfe8 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Fri, 23 Feb 2024 11:48:20 +0000 Subject: [PATCH 23/31] Remove redundant log divs --- .../Node-appendChild-iframe-before-script.tentative.html | 1 - .../Node-appendChild-script-and-button-from-div.tentative.html | 1 - ...de-appendChild-script-and-custom-from-fragment.tentative.html | 1 - ...ld-script-and-default-style-meta-from-fragment.tentative.html | 1 - .../Node-appendChild-script-and-div-from-fragment.tentative.html | 1 - ...de-appendChild-script-and-iframe-from-fragment.tentative.html | 1 - .../Node-appendChild-script-and-iframe.tentative.html | 1 - ...de-appendChild-script-and-source-from-fragment.tentative.html | 1 - ...ode-appendChild-script-and-style-from-fragment.tentative.html | 1 - .../Node-appendChild-script-and-style.tentative.html | 1 - ...Child-script-and-stylesheet-link-from-fragment.tentative.html | 1 - .../Node-appendChild-script-and-stylesheet-link.tentative.html | 1 - .../Node-appendChild-script-before-iframe.tentative.html | 1 - .../Node-appendChild-script-in-script.tentative.html | 1 - .../Node-appendChild-text-and-script-in-style.tentative.html | 1 - .../Node-appendChild-text-in-script.tentative.html | 1 - .../Node-appendChild-three-scripts-from-fragment.tentative.html | 1 - .../Node-appendChild-three-scripts.tentative.html | 1 - 18 files changed, 18 deletions(-) diff --git a/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html index 1433892be6a0e7..875f1644dd5f06 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-iframe-before-script.tentative.html @@ -3,7 +3,6 @@ Node.appendChild: inserting script and iframe from a div -
-
-
-
hello
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ + diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html index da9e351ff2683f..47814e24c53cbd 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html @@ -17,7 +17,7 @@ script.textContent = ` computedStyleDuringInsertion = getComputedStyle(div).display; scriptRan = true; -`; + `; const df = document.createDocumentFragment(); df.appendChild(script); df.appendChild(meta); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html index a796fd060b0869..5f347f3737d6f5 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html @@ -3,6 +3,7 @@ Node.appendChild: inserting script and div from a DocumentFragment + - - diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html index 0198ac2d70ab45..51b3397e9cee3c 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html @@ -1,19 +1,20 @@ - + -Node.appendChild: inserting script and iframe from a div +Node.appendChild: inserting script and iframe + + assert_equals(state, "contentWindow is null", "Script inserted before iframe can observe iframe's contentWindow"); + iframe.remove(); +}, "using a DIV"); + +test(() => { + window.state = "script not run yet"; + window.iframe = document.createElement("iframe"); + iframe.src = "data:text/html," + + const script = document.createElement("script"); + script.textContent = ` + state = iframe.contentWindow ? "has contentWindow" : "contentWindow is null"; + `; + + const df = document.createDocumentFragment(); + df.appendChild(script); + df.appendChild(iframe); + + assert_equals(state, "script not run yet"); + document.body.appendChild(df); + assert_equals(state, "contentWindow is null", "Script inserted before iframe can observe iframe's contentWindow"); + iframe.remove(); +}, "using a DocumentFragment"); + + +test(() => { + window.state = "script not run yet"; + window.iframe = document.createElement("iframe"); + iframe.src = "data:text/html," + + const script = document.createElement("script"); + script.textContent = ` + state = iframe.contentWindow ? "has contentWindow" : "contentWindow is null"; + `; + + assert_equals(state, "script not run yet"); + document.body.append(script, iframe); + + assert_equals(state, "contentWindow is null", "Script inserted before iframe can observe iframe's contentWindow"); +}, "using an append() with multiple parameters"); + \ No newline at end of file diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html index 1b1c61e7b734b2..8c9a4938dee79e 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html @@ -12,7 +12,7 @@ const script = document.createElement("script"); script.textContent = ` happened.push(media.networkState); -`; + `; const df = document.createDocumentFragment(); df.appendChild(script); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html index 48f60e3c7992e7..9d3a016b4a1779 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html @@ -3,6 +3,7 @@ Node.appendChild: inserting a script and a style from a fragment + diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html index f2339d0c341ad7..809f4ac4faf801 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-style.tentative.html @@ -3,6 +3,7 @@ Node.appendChild: inserting a script and a style where the script modifies the style + diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html deleted file mode 100644 index e7728e39b95f4d..00000000000000 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link-from-fragment.tentative.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Node.appendChild: inserting script and stylesheet link from a fragment - - - diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html index 2853513e055e5a..f80070b3ec4d56 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-stylesheet-link.tentative.html @@ -1,18 +1,39 @@ -Node.appendChild: inserting script and stylesheet link from a div +Node.appendChild: inserting script and stylesheet link + diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html index a0760c296bc30e..f09621aed46138 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-before-iframe.tentative.html @@ -3,6 +3,7 @@ Node.appendChild: inserting script and iframe from a div + - + + + - + + - - - - - diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html index ab3df2adf7a89e..764c3e3b9551d6 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-button-from-div.tentative.html @@ -20,5 +20,5 @@ assert_equals(buttonForm, null); form.appendChild(div); assert_equals(buttonForm, form); -}); +}, "Script inserted after a form-associated button can observe the button's form"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html index 43c01c9349a848..23a050f37e7485 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-custom-from-fragment.tentative.html @@ -28,5 +28,7 @@ document.head.appendChild(df); assert_true(customConstructed); assert_true(customConstructedDuringEarlierScript); -}, "Upgrading an element to be custom should be synchronously observable"); +}, "An earlier-inserted script can upgrade a later-inserted custom element, " + + "whose upgrading is synchronously observable to the script, since DOM " + + "insertion has been completed by the time it runs"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html index 47814e24c53cbd..a9b7ba633e7dea 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-default-style-meta-from-fragment.tentative.html @@ -22,10 +22,14 @@ df.appendChild(script); df.appendChild(meta); assert_equals(getComputedStyle(div).display, "block", "div has block display"); - assert_false(scriptRan, "script ran"); + assert_false(scriptRan, "script has not run before insertion"); document.head.appendChild(df); - assert_true(scriptRan, "script has not run"); - assert_equals(computedStyleDuringInsertion, "none", "style is not applied during insertion"); - assert_equals(getComputedStyle(div).display, "none", "style is applied after insertion"); -}); + assert_true(scriptRan, "script has run after insertion"); + assert_equals(computedStyleDuringInsertion, "none", + "display: none; style was applied during DOM insertion, before " + + "later-inserted script runs"); + assert_equals(getComputedStyle(div).display, "none", + "style remains display: none; after insertion"); +}, "Inserting that uses alternate stylesheets, applies the style " + + "during DOM insertion, and before script runs as a result of any atomic insertions"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html index 5f347f3737d6f5..b154c1bf4fbf99 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-div-from-fragment.tentative.html @@ -24,5 +24,6 @@ document.head.appendChild(df); assert_equals(divParent, scriptParent); assert_equals(divParent, document.head); -}); +}, "Earlier-inserted scripts can observe the parentNode of later-inserted " + + "nodes, because script runs after DOM insertion completes"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html index 51b3397e9cee3c..0c2707a96f0a46 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-iframe.tentative.html @@ -6,15 +6,39 @@ \ No newline at end of file + assert_equals(state, "contentWindow is null"); + t.add_cleanup(() => window.iframe.remove()); +}, "A script inserted atomically before an iframe (using a append() with " + + "multiple arguments) does not observe the iframe's contentWindow, since " + + "the 'script running' and 'iframe setup' both happen in order, after DOM " + + "insertion completes"); + diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html index 8c9a4938dee79e..7f93ac43bd81b2 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-source-from-fragment.tentative.html @@ -20,6 +20,14 @@ assert_array_equals(happened, []); media.appendChild(df); + // This is because immediately during DOM insertion, before the + // post-insertion steps invoke script, `` insertion invokes the + // resource selection algorithm [1] which does this assignment. This + // assignment takes place before earlier-inserted script elements run + // post-insertion. + // + // [1]: https://html.spec.whatwg.org/#concept-media-load-algorithm assert_array_equals(happened, [HTMLMediaElement.NETWORK_NO_SOURCE]); -}); +}, "Empty immediately sets media.networkState during DOM insertion, " + + "so that an earlier-running script can observe networkState"); diff --git a/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html index 9d3a016b4a1779..136512574b8532 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-script-and-style-from-fragment.tentative.html @@ -5,7 +5,7 @@ - + diff --git a/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html b/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html index cf07c806397438..850af680a0d2cf 100644 --- a/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html +++ b/dom/nodes/insertion-effects/Node-appendChild-text-and-script-in-style.tentative.html @@ -24,5 +24,7 @@ assert_array_equals(happened, []); style.appendChild(df); assert_array_equals(happened, [2]); -}); +}, "All style rules appended to a