From 99d81a5d4997b900de72610d25d2820c9cb814ca Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 3 Aug 2020 20:53:26 +0200 Subject: LibWeb: Add a very basic test for Text node APIs ("data" and "length") --- Libraries/LibWeb/Tests/DOM/Text.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Libraries/LibWeb/Tests/DOM/Text.js (limited to 'Libraries/LibWeb') 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); + }); +}); -- cgit v1.2.3