mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
This commit is contained in:
parent
f137c1bfaa
commit
d897abf4c2
Notes:
sideshowbarker
2024-07-18 17:49:46 +09:00
Author: https://github.com/alimpfard
Commit: d897abf4c2
Pull-request: https://github.com/SerenityOS/serenity/pull/7255
Reviewed-by: https://github.com/linusg
26 changed files with 643 additions and 1159 deletions
|
@ -1,15 +1,18 @@
|
|||
loadPage("file:///res/html/misc/blank.html");
|
||||
describe("Text", () => {
|
||||
loadLocalPage("/res/html/misc/blank.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
const title = document.getElementsByTagName("title")[0];
|
||||
expect(title).toBeDefined();
|
||||
afterInitialPageLoad(page => {
|
||||
test("Basic functionality", () => {
|
||||
const title = page.document.getElementsByTagName("title")[0];
|
||||
expect(title).toBeDefined();
|
||||
|
||||
// FIXME: Add this in once Text's constructor is implemented.
|
||||
//expect(title.firstChild).toBeInstanceOf(Text);
|
||||
// FIXME: Add this in once Text's constructor is implemented.
|
||||
//expect(title.firstChild).toBeInstanceOf(Text);
|
||||
|
||||
expect(title.firstChild.nodeName).toBe("#text");
|
||||
expect(title.firstChild.data).toBe("Blank");
|
||||
expect(title.firstChild.length).toBe(5);
|
||||
expect(title.firstChild.nodeName).toBe("#text");
|
||||
expect(title.firstChild.data).toBe("Blank");
|
||||
expect(title.firstChild.length).toBe(5);
|
||||
});
|
||||
});
|
||||
waitForPageToLoad();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue