diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-03 20:53:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-03 20:53:26 +0200 |
commit | 99d81a5d4997b900de72610d25d2820c9cb814ca (patch) | |
tree | 18cc6398d359e0c23e1e4b0915a20e78457ca486 /Libraries/LibWeb | |
parent | 73645e11c4ba6a46d9629b0a4e4958b74be7e652 (diff) | |
download | serenity-99d81a5d4997b900de72610d25d2820c9cb814ca.zip |
LibWeb: Add a very basic test for Text node APIs ("data" and "length")
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r-- | Libraries/LibWeb/Tests/DOM/Text.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Tests/DOM/Text.js b/Libraries/LibWeb/Tests/DOM/Text.js new file mode 100644 index 0000000000..055b05ee73 --- /dev/null +++ b/Libraries/LibWeb/Tests/DOM/Text.js @@ -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); + }); +}); |