mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:08:12 +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
26 changed files with 643 additions and 1159 deletions
|
@ -1,16 +1,19 @@
|
|||
loadPage("file:///res/html/misc/blank.html");
|
||||
describe("head", () => {
|
||||
loadLocalPage("/res/html/misc/blank.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
expect(document.head).not.toBeNull();
|
||||
// FIXME: Add this in once HTMLHeadElement's constructor is implemented.
|
||||
//expect(document.head).toBeInstanceOf(HTMLHeadElement);
|
||||
expect(document.head.nodeName).toBe("HEAD");
|
||||
});
|
||||
afterInitialPageLoad(page => {
|
||||
test("Basic functionality", () => {
|
||||
expect(page.document.head).not.toBeNull();
|
||||
// FIXME: Add this in once HTMLHeadElement's constructor is implemented.
|
||||
//expect(page.document.head).toBeInstanceOf(HTMLHeadElement);
|
||||
expect(page.document.head.nodeName).toBe("HEAD");
|
||||
});
|
||||
|
||||
// FIXME: Add this in once removeChild is implemented.
|
||||
test.skip("Nullable", () => {
|
||||
document.documentElement.removeChild(document.head);
|
||||
expect(document.head).toBeNull();
|
||||
// FIXME: Add this in once removeChild is implemented.
|
||||
test.skip("Nullable", () => {
|
||||
page.document.documentElement.removeChild(page.document.head);
|
||||
expect(page.document.head).toBeNull();
|
||||
});
|
||||
});
|
||||
waitForPageToLoad();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue