mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
To allow for a future change where one test will be loaded over HTTP (allowing us to remove the internals hook), and another test which verifies cookies do not work for file URLs.
24 lines
695 B
HTML
24 lines
695 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<script>
|
|
const printCookies = label => {
|
|
// There's no specified order for multiple cookies, and it's a bit non-deterministic in our implementation.
|
|
// Sort the cookies alphabetically here for ease of testing.
|
|
const cookies = document.cookie.split("; ").sort().join("; ");
|
|
println(`${label}: "${cookies}"`);
|
|
};
|
|
|
|
const deleteCookie = name => {
|
|
document.cookie = `${name}=""; max-age=-9999`;
|
|
};
|
|
|
|
const cookieAverseTest = () => {
|
|
document.cookie = "cookie=value";
|
|
printCookies("Cookie averse test");
|
|
};
|
|
|
|
test(() => {
|
|
cookieAverseTest();
|
|
});
|
|
</script>
|