1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00

LibWeb: Remove the Tests subfolder

These were used only by test-web, which was removed in commit 81aa60163.
This commit is contained in:
Timothy Flynn 2023-08-24 17:12:21 -04:00 committed by Andreas Kling
parent 18bbbab78c
commit 70a87795e4
Notes: sideshowbarker 2024-07-17 16:23:55 +09:00
30 changed files with 2 additions and 788 deletions

View file

@ -157,12 +157,11 @@ mkdir -p mnt/home/anon
mkdir -p mnt/home/anon/Desktop
mkdir -p mnt/home/anon/Downloads
mkdir -p mnt/home/nona
# FIXME: Handle these test copies using CMake install rules
rm -fr mnt/home/anon/Tests/js-tests mnt/home/anon/Tests/web-tests mnt/home/anon/Tests/cpp-tests
# FIXME: Handle these test copies using CMake install rules
rm -fr mnt/home/anon/Tests/js-tests mnt/home/anon/Tests/cpp-tests
mkdir -p mnt/home/anon/Tests/cpp-tests/
cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/Tests/js-tests
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/Tests/web-tests
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCodeComprehension/Cpp/Tests mnt/home/anon/Tests/cpp-tests/comprehension
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/parser mnt/home/anon/Tests/cpp-tests/parser
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests/preprocessor mnt/home/anon/Tests/cpp-tests/preprocessor

View file

@ -1,20 +0,0 @@
describe("AbortController", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const abortController = new page.AbortController();
let timesCallbackCalled = 0;
abortController.signal.addEventListener("abort", () => {
timesCallbackCalled++;
});
abortController.abort();
expect(abortController.signal.aborted).toBeTrue();
abortController.abort();
expect(timesCallbackCalled).toBe(1);
});
});
waitForPageToLoad();
});

View file

@ -1,17 +0,0 @@
describe("Comments", () => {
loadLocalPage("Comment.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const comment = page.document.body.firstChild.nextSibling;
expect(comment).not.toBeNull();
// FIXME: Add this in once Comment's constructor is implemented.
//expect(comment).toBeInstanceOf(Comment);
expect(comment.nodeName).toBe("#comment");
expect(comment.data).toBe("This is a comment");
expect(comment).toHaveLength(17);
});
});
waitForPageToLoad();
});

View file

@ -1,42 +0,0 @@
describe("Element", () => {
loadLocalPage("/res/html/misc/innertext_textcontent.html");
afterInitialPageLoad(page => {
test("Element.innerText", () => {
var p = page.document.getElementsByTagName("p")[0];
expect(p.innerText).toBe("This is a very small test page :^)");
// FIXME: Call this on p once that's supported.
var b = page.document.getElementsByTagName("b")[0];
b.innerText = "foo";
expect(b.innerText).toBe("foo");
expect(p.innerText).toBe("This is a foo test page :^)");
p.innerText = "bar";
expect(p.innerText).toBe("bar");
var p = page.document.getElementById("source");
// FIXME: The leading and trailing two spaces each are wrong.
// FIXME: The text should be affected by the text-transform:uppercase.
expect(p.innerText).toBe(` Take a look at
how this text
is interpreted below. `);
});
test("Element.namespaceURI basics", () => {
const htmlNamespace = "http://www.w3.org/1999/xhtml";
const p = page.document.getElementsByTagName("p")[0];
expect(p.namespaceURI).toBe(htmlNamespace);
// createElement always sets the namespace to the HTML namespace in HTML page.documents.
const svgElement = page.document.createElement("svg");
expect(svgElement.namespaceURI).toBe(htmlNamespace);
const svgNamespace = "http://www.w3.org/2000/svg";
p.innerHTML = "<svg></svg>";
const domSVGElement = p.getElementsByTagName("svg")[0];
expect(domSVGElement.namespaceURI).toBe(svgNamespace);
});
});
waitForPageToLoad();
});

View file

@ -1,68 +0,0 @@
describe("Node", () => {
loadLocalPage("/res/html/misc/innertext_textcontent.html");
afterInitialPageLoad(page => {
test("Node.textContent", () => {
var p = page.document.getElementsByTagName("p")[0];
expect(p.textContent).toBe("This is a very small test page :^)");
expect(p.firstChild.textContent).toBe("This is a ");
expect(p.firstChild.firstChild).toBe(null);
p.firstChild.textContent = "foo";
expect(p.firstChild.textContent).toBe("foo");
expect(p.firstChild.firstChild).toBe(null);
expect(p.textContent).toBe("foovery small test page :^)");
p.textContent = "bar";
expect(p.textContent).toBe("bar");
expect(p.firstChild.textContent).toBe("bar");
expect(p.firstChild.firstChild).toBe(null);
var p = page.document.getElementById("source");
expect(p.textContent).toBe(`
#source { color: red; } #text { text-transform: uppercase; }
Take a look athow this textis interpreted
below.
HIDDEN TEXT
`);
});
test("Node.isConnected", () => {
var element = page.document.createElement("p");
expect(element.isConnected).toBeFalse();
page.document.body.appendChild(element);
expect(element.isConnected).toBeTrue();
page.document.body.removeChild(element);
expect(element.isConnected).toBeFalse();
});
test("Node.compareDocumentPosition()", () => {
const head = page.document.head;
const body = page.document.body;
expect(head.compareDocumentPosition(head)).toBe(0);
// FIXME: Can be uncommented once the IDL parser correctly implements nullable parameters.
// expect(head.compareDocumentPosition(null) & Node.DOCUMENT_POSITION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC).
// toBe(Node.DOCUMENT_POSITION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC);
expect(head.compareDocumentPosition(body)).toBe(page.Node.DOCUMENT_POSITION_FOLLOWING);
expect(body.compareDocumentPosition(head)).toBe(page.Node.DOCUMENT_POSITION_PRECEDING);
const source = page.document.getElementById("source");
expect(source.compareDocumentPosition(body)).toBe(
page.Node.DOCUMENT_POSITION_CONTAINS | page.Node.DOCUMENT_POSITION_PRECEDING
);
expect(body.compareDocumentPosition(source)).toBe(
page.Node.DOCUMENT_POSITION_CONTAINED_BY | page.Node.DOCUMENT_POSITION_FOLLOWING
);
expect(source.compareDocumentPosition(head)).toBe(
page.Node.DOCUMENT_POSITION_PRECEDING
);
});
});
waitForPageToLoad();
});

View file

@ -1,18 +0,0 @@
describe("Text", () => {
loadLocalPage("/res/html/misc/blank.html");
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);
expect(title.firstChild.nodeName).toBe("#text");
expect(title.firstChild.data).toBe("Blank");
expect(title.firstChild.length).toBe(5);
});
});
waitForPageToLoad();
});

View file

@ -1,16 +0,0 @@
describe("createComment", () => {
loadLocalPage("/res/html/misc/blank.html");
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);
});
});
waitForPageToLoad();
});

View file

@ -1,15 +0,0 @@
describe("createDocumentFragment", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const fragment = page.document.createDocumentFragment();
// FIXME: Add this in once DocumentFragment's constructor is implemented.
//expect(fragment).toBeInstanceOf(DocumentFragment);
expect(fragment.nodeName).toBe("#document-fragment");
});
});
waitForPageToLoad();
});

View file

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

View file

@ -1,22 +0,0 @@
describe("doctype", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
expect(page.document.compatMode).toBe("CSS1Compat");
expect(page.document.doctype).not.toBeNull();
expect(page.document.doctype.name).toBe("html");
expect(page.document.doctype.publicId).toBe("");
expect(page.document.doctype.systemId).toBe("");
});
});
waitForPageToLoad();
loadLocalPage("/res/html/misc/blank-no-doctype.html");
afterInitialPageLoad(page => {
test("Quirks mode", () => {
expect(page.document.compatMode).toBe("BackCompat");
expect(page.document.doctype).toBeNull();
});
});
waitForPageToLoad();
});

View file

@ -1,20 +0,0 @@
describe("documentElement", () => {
loadLocalPage("/res/html/misc/blank.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();
});
});
waitForPageToLoad();
});

View file

@ -1,22 +0,0 @@
describe("NonElementParentNode", () => {
loadLocalPage("ParentNode.html");
afterInitialPageLoad(page => {
test("getElementById basics", () => {
const unique = page.document.getElementById("unique");
expect(unique).not.toBeNull();
expect(unique.nodeName).toBe("DIV");
expect(unique.id).toBe("unique");
const caseSensitive = page.document.getElementById("Unique");
expect(caseSensitive).toBeNull();
const firstDuplicate = page.document.getElementById("dupeId");
expect(firstDuplicate).not.toBeNull();
expect(firstDuplicate.nodeName).toBe("DIV");
expect(firstDuplicate.id).toBe("dupeId");
expect(firstDuplicate.innerHTML).toBe("First ID");
});
});
waitForPageToLoad();
});

View file

@ -1,28 +0,0 @@
describe("ParentNode", () => {
loadLocalPage("ParentNode.html");
afterInitialPageLoad(page => {
test("querySelector basics", () => {
const firstDuplicateElement = page.document.querySelector(".duplicate");
expect(firstDuplicateElement).not.toBeNull();
expect(firstDuplicateElement.nodeName).toBe("DIV");
expect(firstDuplicateElement.innerHTML).toBe("First");
const noElement = page.document.querySelector(".nonexistent");
expect(noElement).toBeNull();
});
test("querySelectorAll basics", () => {
const allDuplicates = page.document.querySelectorAll(".duplicate");
expect(allDuplicates).toHaveLength(2);
expect(allDuplicates[0].nodeName).toBe("DIV");
expect(allDuplicates[0].innerHTML).toBe("First");
expect(allDuplicates[1].nodeName).toBe("DIV");
expect(allDuplicates[1].innerHTML).toBe("Second");
const noElements = page.document.querySelectorAll(".nonexistent");
expect(noElements).toHaveLength(0);
});
});
waitForPageToLoad();
});

View file

@ -1,28 +0,0 @@
describe("normal behavior", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const textEncoder = new page.TextEncoder();
{
const typedArray = textEncoder.encode("");
expect(typedArray).toHaveLength(0);
}
{
const typedArray = textEncoder.encode("abc");
expect(typedArray).toHaveLength(3);
expect(Array.from(typedArray)).toEqual([97, 98, 99]);
}
{
const typedArray = textEncoder.encode("€");
expect(typedArray).toHaveLength(3);
expect(Array.from(typedArray)).toEqual([226, 130, 172]);
// [255, 254, 172, 32] in UTF-16, but TextEncoder always converts JS UTF-16 strings to UTF-8
}
});
});
waitForPageToLoad();
});

View file

@ -1,12 +0,0 @@
describe("normal behavior", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const textEncoder = new page.TextEncoder();
expect(textEncoder.encoding).toBe("utf-8");
});
});
waitForPageToLoad();
});

View file

@ -1,12 +0,0 @@
describe("HTMLElement", () => {
loadLocalPage("/res/html/misc/welcome.html");
afterInitialPageLoad(page => {
test("contentEditable attribute", () => {
expect(page.document.body.contentEditable).toBe("inherit");
expect(page.document.firstChild.nextSibling.nodeName).toBe("HTML");
expect(page.document.firstChild.nextSibling.contentEditable).toBe("true");
});
});
waitForPageToLoad();
});

View file

@ -1,25 +0,0 @@
describe("HTMLScriptElement.supports", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("length is 1", () => {
expect(page.HTMLScriptElement.supports).toHaveLength(1);
});
test("Basic functionality", () => {
expect(page.HTMLScriptElement.supports("classic")).toBeTrue();
expect(page.HTMLScriptElement.supports("module")).toBeTrue();
expect(page.HTMLScriptElement.supports("abc")).toBeFalse();
// Is case sensitive.
expect(page.HTMLScriptElement.supports("Classic")).toBeFalse();
expect(page.HTMLScriptElement.supports("Module")).toBeFalse();
// Doesn't strip whitespace.
expect(page.HTMLScriptElement.supports(" classic ")).toBeFalse();
expect(page.HTMLScriptElement.supports(" module ")).toBeFalse();
});
});
waitForPageToLoad();
});

View file

@ -1,121 +0,0 @@
describe("HTMLTableElement", () => {
loadLocalPage("Table.html");
afterInitialPageLoad(page => {
test("empty table attributes", () => {
let table = page.document.getElementById("empty-table");
expect(table).not.toBeNull();
expect(table.caption).toBe(null);
expect(table.tHead).toBe(null);
expect(table.tFoot).toBe(null);
expect(table.tBodies).toHaveLength(0);
expect(table.rows).toHaveLength(0);
});
test("full table attributes", () => {
let table = page.document.getElementById("full-table");
expect(table).not.toBeNull();
expect(table.caption.nodeName).toBe("CAPTION");
expect(table.tHead.nodeName).toBe("THEAD");
expect(table.tFoot.nodeName).toBe("TFOOT");
expect(table.tBodies.length).toBe(1);
expect(table.rows.length).toBe(3);
});
test("create/delete caption", () => {
let table = page.document.createElement("table");
expect(table).not.toBeNull();
expect(table.caption).toBeNull();
table.createCaption();
expect(table.caption).not.toBeNull();
table.deleteCaption();
expect(table.caption).toBeNull();
});
test("create/delete thead", () => {
let table = page.document.createElement("table");
expect(table).not.toBeNull();
expect(table.tHead).toBeNull();
table.createTHead();
expect(table.tHead).not.toBeNull();
table.deleteTHead();
expect(table.tHead).toBeNull();
});
test("create/delete tfoot", () => {
let table = page.document.createElement("table");
expect(table).not.toBeNull();
expect(table.tFoot).toBeNull();
table.createTFoot();
expect(table.tFoot).not.toBeNull();
table.deleteTFoot();
expect(table.tFoot).toBeNull();
});
test("insert rows", () => {
let table = page.document.createElement("table");
expect(table).not.toBeNull();
// We hardcode the default value in a few places, due to the BindingsGenerator's bug with default values
const defaultValue = -1;
expect(table.rows.length).toBe(0);
// insertRow with an index > number of rows will throw
expect(() => {
table.insertRow(1);
}).toThrow();
// Inserting a row into an empty table will create a <tbody> and <tr>
let rowFirst = table.insertRow(defaultValue);
rowFirst.innerText = "row_first";
expect(table.firstElementChild.nodeName).toBe("TBODY");
expect(table.firstElementChild.firstElementChild.nodeName).toBe("TR");
expect(table.firstElementChild.firstElementChild.innerText).toBe("row_first");
for (let i = 0; i < 10; i++) {
let row = table.insertRow(defaultValue);
row.innerText = "row" + i;
}
expect(table.rows.length).toBe(11);
// insertRow with the default value
let rowDefault = table.insertRow(defaultValue);
rowDefault.innerText = "row_default";
expect(table.rows[table.rows.length - 1].innerText).toBe("row_default");
});
test("delete rows", () => {
let table = page.document.createElement("table");
expect(table).not.toBeNull();
// We hardcode the default value in a few places, due to the BindingsGenerator's bug with default values
const defaultValue = -1;
// deleteRow with an index > number of rows will throw
expect(table.deleteRow).toThrow();
for (let i = 0; i < 10; i++) {
let row = table.insertRow(defaultValue);
row.innerText = "row" + i;
}
// deleteRow with with no argument will delete the last row
expect(table.rows[table.rows.length - 1].innerText).toBe("row9");
table.deleteRow(defaultValue);
expect(table.rows[table.rows.length - 1].innerText).toBe("row8");
// We can delete a row with a specific index
expect(table.rows[5].innerText).toBe("row5");
table.deleteRow(5);
expect(table.rows[5].innerText).toBe("row6");
});
});
waitForPageToLoad();
});

View file

@ -1,30 +0,0 @@
describe("HTMLTemplateElement", () => {
loadLocalPage("Template.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const template = page.document.getElementById("template");
expect(template).not.toBeNull();
// The contents of a template element are not children of the actual element.
// The document fragment is not a child of the element either.
expect(template.firstChild).toBeNull();
// FIXME: Add this in once page.DocumentFragment's constructor is implemented.
//expect(template.content).toBeInstanceOf(page.DocumentFragment);
expect(template.content.nodeName).toBe("#document-fragment");
const templateDiv = template.content.getElementById("templatediv");
expect(templateDiv.nodeName).toBe("DIV");
expect(templateDiv.textContent).toBe("Hello template!");
});
test("Templates are inert (e.g. scripts won't run)", () => {
// The page has a template element with a script element in it.
// Templates are inert, for example, they won't run scripts.
// That script will set "templateScriptRan" to true if it ran.
expect(page.window.templateScriptRan).toBeUndefined();
});
});
waitForPageToLoad();
});

View file

@ -1,58 +0,0 @@
describe("body", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
expect(page.document.body).not.toBeNull();
// FIXME: Add this in once HTMLBodyElement's constructor is implemented.
//expect(page.document.body).toBeInstanceOf(HTMLBodyElement);
expect(page.document.body.nodeName).toBe("BODY");
});
// FIXME: Add this in once set_body is fully implemented.
test.skip("Setting body to a new body element", () => {
// Add something to body to see if it's gone afterwards
const p = page.document.createElement("p");
page.document.body.appendChild(p);
expect(page.document.body.firstChild).toBe(p);
const newBody = page.document.createElement("body");
page.document.body = newBody;
expect(page.document.body).not.toBeNull();
expect(page.document.body.nodeName).toBe("BODY");
// FIXME: Add this in once HTMLBodyElement's constructor is implemented.
//expect(page.document.body).toBeInstanceOf(HTMLBodyElement);
expect(page.document.body.firstChild).toBeNull();
});
// FIXME: Add this in once set_body is fully implemented.
test.skip("Setting body to a new frameset element", () => {
const newFrameSet = page.document.createElement("frameset");
page.document.body = newFrameSet;
expect(page.document.body).not.toBeNull();
expect(page.document.body.nodeName).toBe("FRAMESET");
// FIXME: Add this in once HTMLFrameSetElement's constructor is implemented.
//expect(page.document.body).toBeInstanceOf(HTMLFrameSetElement);
});
// FIXME: Add this in once set_body is fully implemented.
test.skip("Setting body to an element that isn't body/frameset", () => {
expect(() => {
page.document.body = page.document.createElement("div");
}).toThrow(DOMException);
});
// FIXME: Add this in once removeChild is implemented.
test.skip("Nullable", () => {
page.document.page.documentElement.removeChild(page.document.body);
expect(page.document.body).toBeNull();
});
});
waitForPageToLoad();
});

View file

@ -1,36 +0,0 @@
describe("currentScript", () => {
loadLocalPage("/res/html/misc/blank.html");
beforeInitialPageLoad(page => {
expect(page.document.currentScript).toBeNull();
});
afterInitialPageLoad(page => {
test("reset to null even if currentScript is adopted into another document", () => {
const script = page.document.createElement("script");
script.id = "test";
script.innerText = `
const newDocument = globalThis.pageObject.document.implementation.createHTMLDocument();
const thisScript = globalThis.pageObject.document.getElementById("test");
// currentScript should stay the same even across adoption.
expect(globalThis.pageObject.document.currentScript).toBe(thisScript);
newDocument.adoptNode(thisScript);
expect(globalThis.pageObject.document.currentScript).toBe(thisScript);
`;
// currentScript should be null before and after running the script on insertion.
expect(page.document.currentScript).toBeNull();
expect(script.ownerDocument).toBe(page.document);
globalThis.pageObject = page;
page.document.body.appendChild(script);
globalThis.pageObject = undefined;
expect(page.document.currentScript).toBeNull();
expect(script.ownerDocument).not.toBe(page.document);
});
});
waitForPageToLoad();
});

View file

@ -1,19 +0,0 @@
describe("head", () => {
loadLocalPage("/res/html/misc/blank.html");
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", () => {
page.document.documentElement.removeChild(page.document.head);
expect(page.document.head).toBeNull();
});
});
waitForPageToLoad();
});

View file

@ -1,34 +0,0 @@
describe("readyState", () => {
loadLocalPage("/res/html/misc/blank.html");
beforeInitialPageLoad(page => {
window.events = [];
page.document.addEventListener("readystatechange", () => {
window.events.push(page.document.readyState);
});
page.document.addEventListener("DOMContentLoaded", () => {
test("Ready state should be 'interactive' when 'DOMContentLoaded' fires", () => {
expect(page.document.readyState).toBe("interactive");
});
});
test("Ready state should be 'loading' initially", () => {
expect(page.document.readyState).toBe("loading");
});
});
afterInitialPageLoad(page => {
test("'interactive' should come before 'complete' and both should have happened", () => {
expect(page.window.events).toHaveLength(2);
expect(page.window.events[0]).toBe("interactive");
expect(page.window.events[1]).toBe("complete");
});
test("Ready state should be 'complete' after loading", () => {
expect(page.document.readyState).toBe("complete");
});
});
waitForPageToLoad();
});

View file

@ -1,7 +0,0 @@
<!DOCTYPE html>
<html>
<head> </head>
<body>
<!--This is a comment-->
</body>
</html>

View file

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head> </head>
<body>
<div class="duplicate">First</div>
<div class="duplicate">Second</div>
<div id="unique"></div>
<div id="dupeId">First ID</div>
<div id="dupeId">Second ID</div>
</body>
</html>

View file

@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head> </head>
<body>
<table id="empty-table"></table>
<table id="full-table">
<caption>
A Caption
</caption>
<thead>
<tr>
<th>Head Cell</th>
</tr>
</thead>
<tbody>
<tr>
<td>Body Cell</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Footer Cell</td>
</tr>
</tfoot>
</table>
</body>
</html>

View file

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head> </head>
<body>
<template id="template">
<div id="templatediv">Hello template!</div>
<script>
// I shouldn't be run.
window.templateScriptRan = true;
</script>
</template>
</body>
</html>

View file

@ -1,22 +0,0 @@
describe("Base64", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("atob", () => {
expect(page.atob("YQ==")).toBe("a");
expect(page.atob("YWE=")).toBe("aa");
expect(page.atob("YWFh")).toBe("aaa");
expect(page.atob("YWFhYQ==")).toBe("aaaa");
expect(page.atob("/w==")).toBe("\xff");
});
test("btoa", () => {
expect(page.btoa("a")).toBe("YQ==");
expect(page.btoa("aa")).toBe("YWE=");
expect(page.btoa("aaa")).toBe("YWFh");
expect(page.btoa("aaaa")).toBe("YWFhYQ==");
expect(page.btoa("\xff")).toBe("/w==");
});
});
waitForPageToLoad();
});

View file

@ -1,11 +0,0 @@
describe("window_frames_self", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("window.{window,frames,self} all return the Window object", () => {
expect(page.window.window).toBe(page.window.frames);
expect(page.window.window).toBe(page.window.self);
});
});
waitForPageToLoad();
});

View file

@ -1,16 +0,0 @@
// NOTE: This file is only for syntax highlighting, documentation, etc.
interface LibwebTester {
/**
* Changes the page to the specified URL. Everything afterwards will refer to the new page.
* @param url Page to load.
*/
changePage(url: string): void;
}
interface Window {
/**
* Special test object used to ease test development for LibWeb.
*/
readonly libweb_tester: LibwebTester;
}