mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Libraries: Move to Userland/Libraries/
This commit is contained in:
parent
dc28c07fa5
commit
13d7c09125
Notes:
sideshowbarker
2024-07-18 23:53:55 +09:00
Author: https://github.com/awesomekling
Commit: 13d7c09125
1857 changed files with 266 additions and 274 deletions
25
Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js
Normal file
25
Userland/Libraries/LibWeb/Tests/DOM/mixins/ParentNode.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
loadPage("file:///home/anon/web-tests/Pages/ParentNode.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("querySelector basics", () => {
|
||||
const firstDuplicateElement = document.querySelector(".duplicate");
|
||||
expect(firstDuplicateElement).not.toBeNull();
|
||||
expect(firstDuplicateElement.nodeName).toBe("div");
|
||||
expect(firstDuplicateElement.innerHTML).toBe("First");
|
||||
|
||||
const noElement = document.querySelector(".nonexistent");
|
||||
expect(noElement).toBeNull();
|
||||
});
|
||||
|
||||
test("querySelectorAll basics", () => {
|
||||
const allDuplicates = document.querySelectorAll(".duplicate");
|
||||
expect(allDuplicates).toHaveLength(2);
|
||||
expect(allDuplicates[0].nodeName).toBe("div");
|
||||
expect(allDuplicates[0].innerHTML).toBe("First");
|
||||
expect(allDuplicates[1].nodeName).toBe("div");
|
||||
expect(allDuplicates[1].innerHTML).toBe("Second");
|
||||
|
||||
const noElements = document.querySelectorAll(".nonexistent");
|
||||
expect(noElements).toHaveLength(0);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue