mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb: Add a very basic test for Text node APIs ("data" and "length")
This commit is contained in:
parent
73645e11c4
commit
99d81a5d49
1 changed files with 10 additions and 0 deletions
10
Libraries/LibWeb/Tests/DOM/Text.js
Normal file
10
Libraries/LibWeb/Tests/DOM/Text.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
loadPage("file:///res/html/misc/blank.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
var title = document.getElementsByTagName("title")[0];
|
||||
expect(title.firstChild.nodeName).toBe("#text");
|
||||
expect(title.firstChild.data).toBe("Blank");
|
||||
expect(title.firstChild.length).toBe(5);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue