summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom')
-rw-r--r--testing/web-platform/tests/html/dom/elements/global-attributes/dir-assorted.window.js33
-rw-r--r--testing/web-platform/tests/html/dom/historical.html5
-rw-r--r--testing/web-platform/tests/html/dom/idlharness.https.html2
3 files changed, 39 insertions, 1 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 2017269f0b..93f798e600 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
@@ -64,6 +64,39 @@ test(() => {
assert_true(ele2.matches(":dir(ltr)"), "child is LTR after change");
}, "Non-HTML element text contents influence dir=auto");
+
+for (const tag of ["style", "script"]) {
+ test(() => {
+ const e1 = document.createElement("div");
+ e1.dir = "auto";
+
+ const e2 = document.createElement(tag);
+ const node = document.createTextNode("\u05D0");
+ e2.appendChild(node);
+ e1.appendChild(e2);
+ assert_true(e1.matches(":dir(ltr)", "is LTR before change"));
+ node.data = "ABC";
+ assert_true(e1.matches(":dir(ltr)", "is LTR after change"));
+
+ }, `${tag} element text contents do not influence dir=auto`);
+}
+
+for (const tag of ["style", "script", "input", "textarea"]) {
+ test(() => {
+ const e1 = document.createElement("div");
+ e1.dir = "auto";
+ const svg = document.createElement("svg");
+ const e2 = document.createElementNS("http://www.w3.org/2000/svg", tag);
+ const node = document.createTextNode("\u05D0");
+ e2.appendChild(node);
+ svg.appendChild(e2);
+ e1.appendChild(svg);
+ assert_true(e1.matches(":dir(rtl)", "is RTL before change"));
+ node.data = "ABC";
+ assert_true(e1.matches(":dir(ltr)", "is LTR after change"));
+ }, `non-html ${tag} element text contents influence dir=auto`);
+}
+
test(() => {
const e1 = document.createElement("div");
e1.dir = "auto";
diff --git a/testing/web-platform/tests/html/dom/historical.html b/testing/web-platform/tests/html/dom/historical.html
index 396e57a391..2563810492 100644
--- a/testing/web-platform/tests/html/dom/historical.html
+++ b/testing/web-platform/tests/html/dom/historical.html
@@ -52,4 +52,9 @@ test(() => {
test(() => {
assert_false("HTMLTableHeaderCellElement" in window);
}, "HTMLTableHeaderCellElement interface is removed")
+
+// removed in https://github.com/whatwg/html/commit/6e4bcf5630d08e03212ad4e1a3c78beecf2a92fa
+test(() => {
+ assert_false("initHashChangeEvent" in HashChangeEvent.prototype);
+}, "HashChangeEvent's initHashChangeEvent method is removed")
</script>
diff --git a/testing/web-platform/tests/html/dom/idlharness.https.html b/testing/web-platform/tests/html/dom/idlharness.https.html
index 7d693d3c0a..357a4fbe0b 100644
--- a/testing/web-platform/tests/html/dom/idlharness.https.html
+++ b/testing/web-platform/tests/html/dom/idlharness.https.html
@@ -38,7 +38,7 @@ const waitForLoad = new Promise(resolve => { addEventListener('load', resolve);
idl_test(
['html'],
- ['wai-aria', 'SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr', 'FileAPI', 'mediacapture-streams', 'performance-timeline'],
+ ['wai-aria', 'SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr', 'FileAPI', 'mediacapture-streams', 'performance-timeline', 'trusted-types'],
async idlArray => {
self.documentWithHandlers = new Document();
const handler = function(e) {};