summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js')
-rw-r--r--Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js31
1 files changed, 17 insertions, 14 deletions
diff --git a/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js b/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js
index c567c7b96a..23bcb84d2d 100644
--- a/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js
+++ b/Userland/Libraries/LibWeb/Tests/DOM/mixins/NonElementParentNode.js
@@ -1,19 +1,22 @@
-loadPage("file:///home/anon/web-tests/Pages/ParentNode.html");
+describe("NonElementParentNode", () => {
+ loadLocalPage("ParentNode.html");
-afterInitialPageLoad(() => {
- test("getElementById basics", () => {
- const unique = document.getElementById("unique");
- expect(unique).not.toBeNull();
- expect(unique.nodeName).toBe("DIV");
- expect(unique.id).toBe("unique");
+ afterInitialPageLoad(page => {
+ test("getElementById basics", () => {
+ const unique = page.document.getElementById("unique");
+ expect(unique).not.toBeNull();
+ expect(unique.nodeName).toBe("DIV");
+ expect(unique.id).toBe("unique");
- const caseSensitive = document.getElementById("Unique");
- expect(caseSensitive).toBeNull();
+ const caseSensitive = page.document.getElementById("Unique");
+ expect(caseSensitive).toBeNull();
- const firstDuplicate = document.getElementById("dupeId");
- expect(firstDuplicate).not.toBeNull();
- expect(firstDuplicate.nodeName).toBe("DIV");
- expect(firstDuplicate.id).toBe("dupeId");
- expect(firstDuplicate.innerHTML).toBe("First ID");
+ const firstDuplicate = page.document.getElementById("dupeId");
+ expect(firstDuplicate).not.toBeNull();
+ expect(firstDuplicate.nodeName).toBe("DIV");
+ expect(firstDuplicate.id).toBe("dupeId");
+ expect(firstDuplicate.innerHTML).toBe("First ID");
+ });
});
+ waitForPageToLoad();
});