summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/html/dom
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/dom')
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js5
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-dataChange.html31
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-ref.html13
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-replace.html32
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-textContent.html31
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-41-ref.html2
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42-ref.html25
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42.html33
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html6
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN.html4
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.html (renamed from testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.tentative.html)0
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-029.html29
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-030.html34
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-031.html32
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-032.html34
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-033.html30
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-034.html30
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-035.html31
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-036.html31
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-037.html31
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-038.html35
48 files changed, 491 insertions, 8 deletions
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js
index 0d4e4b82d9..2017269f0b 100644
--- a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js
@@ -90,10 +90,11 @@ for (const bdi_test of [
{ markup: "<bdi dir=rtl></bdi>", expected: "rtl", desc: "dir=rtl empty" },
{ markup: "<bdi dir=auto>A</bdi>", expected: "ltr", desc: "dir=auto with LTR contents" },
{ markup: "<bdi dir=auto>\u05d0</bdi>", expected: "rtl", desc: "dir=auto with RTL contents" },
- { markup: "<bdi dir=auto></bdi>", expected: "parent", desc: "dir=auto empty" },
+ { markup: "<bdi dir=auto></bdi>", expected: "ltr", desc: "dir=auto empty" },
+ { markup: "<bdi dir=auto>123</bdi>", expected: "ltr", desc: "dir=auto numbers" },
{ markup: "<bdi>A</bdi>", expected: "ltr", desc: "no dir attribute with LTR contents" },
{ markup: "<bdi>\u05d0</bdi>", expected: "rtl", desc: "no dir attribute with RTL contents" },
- { markup: "<bdi></bdi>", expected: "parent", desc: "no dir attribute empty" },
+ { markup: "<bdi></bdi>", expected: "ltr", desc: "no dir attribute empty" },
]) {
for (const parent_dir of [ "ltr", "rtl" ]) {
test(() => {
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-dataChange.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-dataChange.html
new file mode 100644
index 0000000000..ded136a3ae
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-dataChange.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Dynamic changes with textContent and dir=auto</title>
+<link rel="match" href="dir-auto-dynamic-simple-ref.html">
+<div>Test for elements with dir="auto" whose content changes between directional and neutral</div>
+<div dir="auto" id="from_ltr_to_ltr">abc</div>
+<div dir="auto" id="from_ltr_to_rtl">abc</div>
+<div dir="auto" id="from_ltr_to_neutral">abc</div>
+<div dir="auto" id="from_rtl_to_ltr">אבג</div>
+<div dir="auto" id="from_rtl_to_rtl">אבג</div>
+<div dir="auto" id="from_rtl_to_neutral">אבג</div>
+<div dir="auto" id="from_neutral_to_ltr">123</div>
+<div dir="auto" id="from_neutral_to_rtl">123</div>
+<div dir="auto" id="from_neutral_to_neutral">123</div>
+<script>
+function changeContent() {
+ var directionalTexts = {ltr:"xyz", rtl:"ابج", neutral:"456"};
+
+ for (var dirFrom in directionalTexts) {
+ for (var dirTo in directionalTexts) {
+ var element = document.getElementById("from_" + dirFrom +
+ "_to_" + dirTo);
+ element.firstChild.data = directionalTexts[dirTo];
+ }
+ }
+ document.documentElement.removeAttribute("class");
+}
+
+document.addEventListener("TestRendered", changeContent);
+</script>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-ref.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-ref.html
new file mode 100644
index 0000000000..5a9a2f2484
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Dynamic changes and dir=auto</title>
+<div>Test for elements with dir="auto" whose content changes between directional and neutral</div>
+<div dir="auto">xyz</div>
+<div dir="auto">ابج</div>
+<div dir="auto">456</div>
+<div dir="auto">xyz</div>
+<div dir="auto">ابج</div>
+<div dir="auto">456</div>
+<div dir="auto">xyz</div>
+<div dir="auto">ابج</div>
+<div dir="auto">456</div>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-replace.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-replace.html
new file mode 100644
index 0000000000..6d785f08b8
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-replace.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Dynamic changes with textContent and dir=auto</title>
+<link rel="match" href="dir-auto-dynamic-simple-ref.html">
+<div>Test for elements with dir="auto" whose content changes between directional and neutral</div>
+<div dir="auto" id="from_ltr_to_ltr">abc</div>
+<div dir="auto" id="from_ltr_to_rtl">abc</div>
+<div dir="auto" id="from_ltr_to_neutral">abc</div>
+<div dir="auto" id="from_rtl_to_ltr">אבג</div>
+<div dir="auto" id="from_rtl_to_rtl">אבג</div>
+<div dir="auto" id="from_rtl_to_neutral">אבג</div>
+<div dir="auto" id="from_neutral_to_ltr">123</div>
+<div dir="auto" id="from_neutral_to_rtl">123</div>
+<div dir="auto" id="from_neutral_to_neutral">123</div>
+<script>
+function changeContent() {
+ var directionalTexts = {ltr:"xyz", rtl:"ابج", neutral:"456"};
+
+ for (var dirFrom in directionalTexts) {
+ for (var dirTo in directionalTexts) {
+ var element = document.getElementById("from_" + dirFrom +
+ "_to_" + dirTo);
+ element.firstChild.remove();
+ element.appendChild(document.createTextNode(directionalTexts[dirTo]));
+ }
+ }
+ document.documentElement.removeAttribute("class");
+}
+
+document.addEventListener("TestRendered", changeContent);
+</script>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-textContent.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-textContent.html
new file mode 100644
index 0000000000..3b644908ab
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-auto-dynamic-simple-textContent.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>Dynamic changes with textContent and dir=auto</title>
+<link rel="match" href="dir-auto-dynamic-simple-ref.html">
+<div>Test for elements with dir="auto" whose content changes between directional and neutral</div>
+<div dir="auto" id="from_ltr_to_ltr">abc</div>
+<div dir="auto" id="from_ltr_to_rtl">abc</div>
+<div dir="auto" id="from_ltr_to_neutral">abc</div>
+<div dir="auto" id="from_rtl_to_ltr">אבג</div>
+<div dir="auto" id="from_rtl_to_rtl">אבג</div>
+<div dir="auto" id="from_rtl_to_neutral">אבג</div>
+<div dir="auto" id="from_neutral_to_ltr">123</div>
+<div dir="auto" id="from_neutral_to_rtl">123</div>
+<div dir="auto" id="from_neutral_to_neutral">123</div>
+<script>
+function changeContent() {
+ var directionalTexts = {ltr:"xyz", rtl:"ابج", neutral:"456"};
+
+ for (var dirFrom in directionalTexts) {
+ for (var dirTo in directionalTexts) {
+ var element = document.getElementById("from_" + dirFrom +
+ "_to_" + dirTo);
+ element.textContent = directionalTexts[dirTo];
+ }
+ }
+ document.documentElement.removeAttribute("class");
+}
+
+document.addEventListener("TestRendered", changeContent);
+</script>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-41-ref.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-41-ref.html
index b52e08df20..79b844edbe 100644
--- a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-41-ref.html
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-41-ref.html
@@ -18,7 +18,7 @@ span {border: 1px solid silver;}
<p>`dir=rtl` on a div in the shadow tree, `dir=ltr` on the shadow host, no slotted text in the light or dark trees</p>
<div id="host" dir="ltr"><div dir="rtl"><span></span></div></div>
-<p id="result">The HTML direction / computed CSS `direction` value is: rtl / rtl (on the slot).</p>
+<p id="result">The HTML direction / computed CSS `direction` value is: ltr / ltr (on the slot).</p>
</body>
</html>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42-ref.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42-ref.html
new file mode 100644
index 0000000000..8ea1100246
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>[dir] and shadow slots: dir=ltr on a div in the shadow tree, dir=rtl on the shadow host, no slotted text in the light or dark trees</title>
+<link rel="author" title="Eric Meyer" href="mailto:emeyer@igalia.com">
+<link rel="author" title="L. David Baron" href="mailto:dbaron@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/C#the-dir-attribute">
+<link rel="help" href="https://github.com/whatwg/html/issues/3699">
+<link rel="help" href="https://github.com/whatwg/html/pull/9796">
+<style type="text/css">
+body {width: 600px;}
+#host {border: 1px solid gray; margin: 1em; padding: 0.25em;}
+span {border: 1px solid silver;}
+
+</style>
+</head>
+<body>
+
+<p>`dir=ltr` on a div in the shadow tree, `dir=rtl` on the shadow host, no slotted text in the light or dark trees</p>
+<div id="host" dir="rtl"><div dir="ltr"><span></span></div></div>
+<p id="result">The HTML direction / computed CSS `direction` value is: ltr / ltr (on the slot).</p>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42.html
new file mode 100644
index 0000000000..b9697678cb
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir-shadow-42.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>[dir] and shadow slots: dir=ltr on a div in the shadow tree, dir=rtl on the shadow host, no slotted text in the light or dark trees</title>
+<link rel="author" title="Eric Meyer" href="mailto:emeyer@igalia.com">
+<link rel="author" title="L. David Baron" href="mailto:dbaron@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/C#the-dir-attribute">
+<link rel="help" href="https://github.com/whatwg/html/issues/3699">
+<link rel="help" href="https://github.com/whatwg/html/pull/9796">
+<link rel="match" href="dir-shadow-42-ref.html">
+<style type="text/css">
+body {width: 600px;}
+#host {border: 1px solid gray; margin: 1em; padding: 0.25em;}
+span {border: 1px solid silver;}
+
+</style>
+<script src="dir-shadow-utils.js"></script>
+</head>
+<body>
+
+<p>`dir=ltr` on a div in the shadow tree, `dir=rtl` on the shadow host, no slotted text in the light or dark trees</p>
+<div id="host" dir="rtl"><span slot="x1"></span></div>
+<p id="result">The HTML direction / computed CSS `direction` value is: </p>
+
+<script type="text/javascript">
+ let root = host.attachShadow({mode:"open"});
+ root.innerHTML = `<div dir="ltr"><slot dir="auto" name="x1"></slot></div>`;
+ result.innerHTML += html_direction(root.querySelector("div[dir=ltr]").firstChild) + " / " + getComputedStyle(root.querySelector("div[dir=ltr]").firstChild).direction + " (on the " + root.querySelector("div[dir=ltr]").firstChild.localName + ').';
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html
index 0d938b2e16..496d699d73 100644
--- a/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html
@@ -10,7 +10,7 @@
<meta name="assert" content="
When dir='auto', the direction is set according to the first strong character
of the text, ignoring neutrals and numbers.
- If there is no strong character, as in this test, the direction defaults to the parent." />
+ If there is no strong character, as in this test, the direction defaults to LTR." />
<style>
input, textarea {
font-size:1em;
@@ -35,7 +35,7 @@
<p dir="ltr">@123!</p>
</div>
<div dir="rtl">
- <p dir="rtl">@123!</p>
+ <p dir="ltr">@123!</p>
</div>
</div>
<div class="ref">
@@ -43,7 +43,7 @@
<p dir="ltr">@123!</p>
</div>
<div dir="rtl">
- <p dir="rtl">@123!</p>
+ <p dir="ltr">@123!</p>
</div>
</div>
</body>
diff --git a/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN.html b/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN.html
index 467b4d0939..5d948d3456 100644
--- a/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN.html
+++ b/testing/web-platform/tests/html/dom/elements/global-attributes/dir_auto-N-EN.html
@@ -11,7 +11,7 @@
<meta name="assert" content="
When dir='auto', the direction is set according to the first strong character
of the text, ignoring neutrals and numbers.
- If there is no strong character, as in this test, the direction defaults to the parent." />
+ If there is no strong character, as in this test, the direction defaults to LTR." />
<style>
input, textarea {
font-size:1em;
@@ -44,7 +44,7 @@
<p dir="ltr">@123!</p>
</div>
<div dir="rtl">
- <p dir="rtl">@123!</p>
+ <p dir="ltr">@123!</p>
</div>
</div>
</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.html
index 36567f9d54..36567f9d54 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-001.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.html
index 3c907597f7..3c907597f7 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-002.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.html
index 2858798a35..2858798a35 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-003.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.html
index f45f558720..f45f558720 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-004.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.html
index 098a3c5767..098a3c5767 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-005.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.html
index 223e42109e..223e42109e 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-006.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.html
index 9aa0aeea79..9aa0aeea79 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-007.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.html
index e671dda19c..e671dda19c 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-008.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.html
index 8498816ea5..8498816ea5 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-009.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.html
index ef6f709012..ef6f709012 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-010.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.html
index dee82d8c59..dee82d8c59 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-011.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.html
index 4110e54c5f..4110e54c5f 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-012.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.html
index ecd97be86a..ecd97be86a 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-013.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.html
index ea8948de42..ea8948de42 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-014.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.html
index a775ee4174..a775ee4174 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-015.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.html
index 8968c5dacd..8968c5dacd 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-016.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.html
index 2d3b574721..2d3b574721 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-017.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.html
index 76e6394b5b..76e6394b5b 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-018.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.html
index 80a7019edc..80a7019edc 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-019.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.html
index 10019c943f..10019c943f 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-020.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.html
index 1ca2114689..1ca2114689 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-021.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.html
index 5dfbcac30a..5dfbcac30a 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-022.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.html
index 8fe8b6a8c8..8fe8b6a8c8 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-023.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.html
index 19e4020fb7..19e4020fb7 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-024.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.html
index 689ae69f45..689ae69f45 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-025.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.html
index 6abfc43b8b..6abfc43b8b 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-026.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.html
index 56f88e0fc2..56f88e0fc2 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-027.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.tentative.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.html
index a64d542c4a..a64d542c4a 100644
--- a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.tentative.html
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-028.html
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-029.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-029.html
new file mode 100644
index 0000000000..44dff3cb84
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-029.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>`link rel=expect` supports &lt;a name&gt;</title>
+
+<link rel=expect href="#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementsByName("second")), "the second element should unblock rendering");
+ t.step(() => assert_false(!!document.getElementById("last")));
+ t.done();
+ });
+}, "blocking defers frames until full parsing");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <a name="second"></a>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-030.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-030.html
new file mode 100644
index 0000000000..307c2d303d
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-030.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>&lt;a name&gt; should only unblock when finished parsing children</title>
+
+<link rel=expect href="#fold" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementsByName("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "blocking defers frames until full parsing");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <a name="fold">
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second"></div>
+ </a>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-031.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-031.html
new file mode 100644
index 0000000000..2098483a06
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-031.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>`link rel=expect` supports dynamically changed &lt;a name&gt;</title>
+
+<link rel=expect href="#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementsByName("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "blocking defers frames until full parsing");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <a id="fold"></a>
+ <script>
+ document.getElementById("fold").setAttribute("name", "second");
+ </script>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-032.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-032.html
new file mode 100644
index 0000000000..307c2d303d
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-032.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>&lt;a name&gt; should only unblock when finished parsing children</title>
+
+<link rel=expect href="#fold" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementsByName("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "blocking defers frames until full parsing");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <a name="fold">
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second"></div>
+ </a>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-033.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-033.html
new file mode 100644
index 0000000000..59d41c08c0
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-033.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect should support percent encoding</title>
+
+<link rel=expect href="#se%F0%9F%98%8Fcond" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("se😏cond")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "blocking defers frames until full parsing");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="se😏cond"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-034.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-034.html
new file mode 100644
index 0000000000..a505de4875
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-034.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect should allow relative URLs</title>
+
+<link rel=expect href="../render-blocking/element-render-blocking-034.html#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "relative URLs that match this document are OK");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second">
+ </div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-035.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-035.html
new file mode 100644
index 0000000000..050244c7a6
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-035.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect: base URL should be OK with relative URLs</title>
+
+<base href="dummy.html">
+<link rel=expect href="../render-blocking/element-render-blocking-035.html#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "relative URLs that match this document are OK, regarless of <base>");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second">
+ </div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-036.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-036.html
new file mode 100644
index 0000000000..83637b3a08
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-036.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect: base URL mismatch causes link to not block</title>
+
+<base href="dummy.html">
+<link rel=expect href="#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("first")));
+ t.step(() => assert_false(!!document.getElementById("second")), "the first element should already unblock rendering");
+ t.done();
+ });
+}, "link URLs are relative to base URL, not to document URL");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second">
+ </div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-037.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-037.html
new file mode 100644
index 0000000000..5fe469a2fd
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-037.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect: base URL should be OK with relative URLs</title>
+
+<base href="dummy.html">
+<link rel=expect href="../render-blocking/element-render-blocking-037.html#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("second")));
+ t.step(() => assert_false(!!document.getElementById("last")), "the second element should already unblock rendering");
+ t.done();
+ });
+}, "relative URLs that match this document are OK, regarless of <base>");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second">
+ </div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>
diff --git a/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-038.html b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-038.html
new file mode 100644
index 0000000000..c7fabe7f32
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/element-render-blocking-038.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/utils.js"></script>
+<title>link rel=expect: only connected elements are eligible</title>
+
+<link rel=expect href="#second" blocking="render">
+<script>
+async_test((t) => {
+ requestAnimationFrame(() => {
+ t.step(() => assert_true(!!document.getElementById("second"), "The second element should be there"));
+ t.step(() => assert_false(!!document.getElementById("last"), "The last element should not be there yet, even though it's created (in a shadow root)"));
+ t.done();
+ });
+}, "");
+</script>
+</head>
+<body>
+ <div id="first"></div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="second">
+ <custom-element>
+ <template shadowrootmode="open">
+ <div id="last"></div>
+ </template>
+ </custom-element>
+ </div>
+ <script>
+ generateParserDelay();
+ </script>
+ <div id="last"></div>
+</body>