diff options
author | Adam Hodgen <ant1441@gmail.com> | 2021-05-09 16:42:15 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-09 18:38:34 +0200 |
commit | 737f6e97b27ddde381314ca2ba968fa82c603381 (patch) | |
tree | 26e74e5c023b41b473ed42667f9a1a6981efb6fa /Userland/Libraries | |
parent | 37685b0181d2bcc6ce461b30d409b0bf1fb11c3f (diff) | |
download | serenity-737f6e97b27ddde381314ca2ba968fa82c603381.zip |
LibWeb: Fix nodeName attribute in tests
Commit 19731fc14c (#6864) made all nodeName attributes on HTML elements
uppercased. This change fixes that in all HTML & DOM tests.
Diffstat (limited to 'Userland/Libraries')
7 files changed, 12 insertions, 12 deletions
diff --git a/Userland/Libraries/LibWeb/Tests/DOM/document.documentElement.js b/Userland/Libraries/LibWeb/Tests/DOM/document.documentElement.js index 86d885c709..9ce06282de 100644 --- a/Userland/Libraries/LibWeb/Tests/DOM/document.documentElement.js +++ b/Userland/Libraries/LibWeb/Tests/DOM/document.documentElement.js @@ -5,7 +5,7 @@ afterInitialPageLoad(() => { expect(document.documentElement).not.toBeNull(); // FIXME: Add this in once HTMLHtmlElement's constructor is implemented. //expect(document.documentElement).toBeInstanceOf(HTMLHtmlElement); - expect(document.documentElement.nodeName).toBe("html"); + expect(document.documentElement.nodeName).toBe("HTML"); }); // FIXME: Add this in once removeChild is implemented. diff --git a/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js b/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js index 5b269025f4..c567c7b96a 100644 --- a/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js +++ b/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js @@ -4,7 +4,7 @@ afterInitialPageLoad(() => { test("getElementById basics", () => { const unique = document.getElementById("unique"); expect(unique).not.toBeNull(); - expect(unique.nodeName).toBe("div"); + expect(unique.nodeName).toBe("DIV"); expect(unique.id).toBe("unique"); const caseSensitive = document.getElementById("Unique"); @@ -12,7 +12,7 @@ afterInitialPageLoad(() => { const firstDuplicate = document.getElementById("dupeId"); expect(firstDuplicate).not.toBeNull(); - expect(firstDuplicate.nodeName).toBe("div"); + expect(firstDuplicate.nodeName).toBe("DIV"); expect(firstDuplicate.id).toBe("dupeId"); expect(firstDuplicate.innerHTML).toBe("First ID"); }); diff --git a/Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js b/Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js index 3558c0352f..c1fa39f760 100644 --- a/Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js +++ b/Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js @@ -4,7 +4,7 @@ afterInitialPageLoad(() => { test("querySelector basics", () => { const firstDuplicateElement = document.querySelector(".duplicate"); expect(firstDuplicateElement).not.toBeNull(); - expect(firstDuplicateElement.nodeName).toBe("div"); + expect(firstDuplicateElement.nodeName).toBe("DIV"); expect(firstDuplicateElement.innerHTML).toBe("First"); const noElement = document.querySelector(".nonexistent"); @@ -14,9 +14,9 @@ afterInitialPageLoad(() => { test("querySelectorAll basics", () => { const allDuplicates = document.querySelectorAll(".duplicate"); expect(allDuplicates).toHaveLength(2); - expect(allDuplicates[0].nodeName).toBe("div"); + expect(allDuplicates[0].nodeName).toBe("DIV"); expect(allDuplicates[0].innerHTML).toBe("First"); - expect(allDuplicates[1].nodeName).toBe("div"); + expect(allDuplicates[1].nodeName).toBe("DIV"); expect(allDuplicates[1].innerHTML).toBe("Second"); const noElements = document.querySelectorAll(".nonexistent"); diff --git a/Userland/Libraries/LibWeb/Tests/HTML/HTMLElement.js b/Userland/Libraries/LibWeb/Tests/HTML/HTMLElement.js index 2950bb45c5..bdfb2d10e3 100644 --- a/Userland/Libraries/LibWeb/Tests/HTML/HTMLElement.js +++ b/Userland/Libraries/LibWeb/Tests/HTML/HTMLElement.js @@ -3,7 +3,7 @@ loadPage("file:///res/html/misc/welcome.html"); afterInitialPageLoad(() => { test("contentEditable attribute", () => { expect(document.body.contentEditable).toBe("inherit"); - expect(document.firstChild.nextSibling.nodeName).toBe("html"); + expect(document.firstChild.nextSibling.nodeName).toBe("HTML"); expect(document.firstChild.nextSibling.contentEditable).toBe("true"); }); }); diff --git a/Userland/Libraries/LibWeb/Tests/HTML/HTMLTemplateElement.js b/Userland/Libraries/LibWeb/Tests/HTML/HTMLTemplateElement.js index dd6c66e1f2..2d668d40a6 100644 --- a/Userland/Libraries/LibWeb/Tests/HTML/HTMLTemplateElement.js +++ b/Userland/Libraries/LibWeb/Tests/HTML/HTMLTemplateElement.js @@ -14,7 +14,7 @@ afterInitialPageLoad(() => { expect(template.content.nodeName).toBe("#document-fragment"); const templateDiv = template.content.getElementById("templatediv"); - expect(templateDiv.nodeName).toBe("div"); + expect(templateDiv.nodeName).toBe("DIV"); expect(templateDiv.textContent).toBe("Hello template!"); }); diff --git a/Userland/Libraries/LibWeb/Tests/HTML/document.body.js b/Userland/Libraries/LibWeb/Tests/HTML/document.body.js index 9fc1907583..71cf6f37de 100644 --- a/Userland/Libraries/LibWeb/Tests/HTML/document.body.js +++ b/Userland/Libraries/LibWeb/Tests/HTML/document.body.js @@ -5,7 +5,7 @@ afterInitialPageLoad(() => { expect(document.body).not.toBeNull(); // FIXME: Add this in once HTMLBodyElement's constructor is implemented. //expect(document.body).toBeInstanceOf(HTMLBodyElement); - expect(document.body.nodeName).toBe("body"); + expect(document.body.nodeName).toBe("BODY"); }); // FIXME: Add this in once set_body is fully implemented. @@ -20,7 +20,7 @@ afterInitialPageLoad(() => { document.body = newBody; expect(document.body).not.toBeNull(); - expect(document.body.nodeName).toBe("body"); + expect(document.body.nodeName).toBe("BODY"); // FIXME: Add this in once HTMLBodyElement's constructor is implemented. //expect(document.body).toBeInstanceOf(HTMLBodyElement); @@ -34,7 +34,7 @@ afterInitialPageLoad(() => { document.body = newFrameSet; expect(document.body).not.toBeNull(); - expect(document.body.nodeName).toBe("frameset"); + expect(document.body.nodeName).toBe("FRAMESET"); // FIXME: Add this in once HTMLFrameSetElement's constructor is implemented. //expect(document.body).toBeInstanceOf(HTMLFrameSetElement); diff --git a/Userland/Libraries/LibWeb/Tests/HTML/document.head.js b/Userland/Libraries/LibWeb/Tests/HTML/document.head.js index 5d997fe3dd..22c5adbc18 100644 --- a/Userland/Libraries/LibWeb/Tests/HTML/document.head.js +++ b/Userland/Libraries/LibWeb/Tests/HTML/document.head.js @@ -5,7 +5,7 @@ afterInitialPageLoad(() => { expect(document.head).not.toBeNull(); // FIXME: Add this in once HTMLHeadElement's constructor is implemented. //expect(document.head).toBeInstanceOf(HTMLHeadElement); - expect(document.head.nodeName).toBe("head"); + expect(document.head.nodeName).toBe("HEAD"); }); // FIXME: Add this in once removeChild is implemented. |