LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner

This deduplicates the test-js copy-ism :^)
This commit is contained in:
Ali Mohammad Pur
2021-05-18 18:46:54 +04:30
committed by Linus Groh
parent f137c1bfaa
commit d897abf4c2
Notes: sideshowbarker 2024-07-18 17:49:46 +09:00
26 changed files with 643 additions and 1159 deletions

View File

@@ -1,13 +1,16 @@
loadPage("file:///res/html/misc/blank.html");
describe("createComment", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(() => {
test("Basic functionality", () => {
const comment = document.createComment("Create Comment Test");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const comment = page.document.createComment("Create Comment Test");
// FIXME: Add this in once Comment's constructor is implemented.
//expect(comment).toBeInstanceOf(Comment);
expect(comment.nodeName).toBe("#comment");
expect(comment.data).toBe("Create Comment Test");
expect(comment.length).toBe(19);
// FIXME: Add this in once Comment's constructor is implemented.
//expect(comment).toBeInstanceOf(Comment);
expect(comment.nodeName).toBe("#comment");
expect(comment.data).toBe("Create Comment Test");
expect(comment.length).toBe(19);
});
});
waitForPageToLoad();
});