1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:47:46 +00:00

LibWeb: Reorganize tests into DOM/ and HTML/

This commit is contained in:
Andreas Kling 2020-08-03 20:50:20 +02:00
parent 2dc08d259e
commit 354f9aafd5
3 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,18 @@
loadPage("file:///res/html/misc/blank.html");
afterInitialPageLoad(() => {
test("Basic functionality", () => {
expect(document.compatMode).toBe("CSS1Compat");
expect(document.doctype).not.toBe(null);
expect(document.doctype.name).toBe("html");
expect(document.doctype.publicId).toBe("");
expect(document.doctype.systemId).toBe("");
});
libweb_tester.changePage("file:///res/html/misc/blank-no-doctype.html");
test("Quirks mode", () => {
expect(document.compatMode).toBe("BackCompat");
expect(document.doctype).toBe(null);
});
});

View file

@ -0,0 +1,8 @@
loadPage("file:///res/html/misc/blank.html");
afterInitialPageLoad(() => {
test("Basic functionality", () => {
expect(document.documentElement).not.toBe(null);
expect(document.documentElement.nodeName).toBe("html");
});
});