mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
This commit is contained in:
committed by
Linus Groh
parent
f137c1bfaa
commit
d897abf4c2
Notes:
sideshowbarker
2024-07-18 17:49:46 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/d897abf4c2e Pull-request: https://github.com/SerenityOS/serenity/pull/7255 Reviewed-by: https://github.com/linusg
@@ -1,16 +1,20 @@
|
||||
loadPage("file:///res/html/misc/blank.html");
|
||||
describe("documentElement", () => {
|
||||
loadLocalPage("/res/html/misc/blank.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
expect(document.documentElement).not.toBeNull();
|
||||
// FIXME: Add this in once HTMLHtmlElement's constructor is implemented.
|
||||
//expect(document.documentElement).toBeInstanceOf(HTMLHtmlElement);
|
||||
expect(document.documentElement.nodeName).toBe("HTML");
|
||||
afterInitialPageLoad(page => {
|
||||
test("Basic functionality", () => {
|
||||
expect(page.document.documentElement).not.toBeNull();
|
||||
// FIXME: Add this in once HTMLHtmlElement's constructor is implemented.
|
||||
//expect(document.documentElement).toBeInstanceOf(HTMLHtmlElement);
|
||||
expect(page.document.documentElement.nodeName).toBe("HTML");
|
||||
});
|
||||
|
||||
// FIXME: Add this in once removeChild is implemented.
|
||||
test.skip("Nullable", () => {
|
||||
page.document.removeChild(page.document.documentElement);
|
||||
expect(page.document.documentElement).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
// FIXME: Add this in once removeChild is implemented.
|
||||
test.skip("Nullable", () => {
|
||||
document.removeChild(document.documentElement);
|
||||
expect(document.documentElement).toBeNull();
|
||||
});
|
||||
waitForPageToLoad();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user