1
0
Fork 0
firefox/dom/tests/mochitest/localstorage/frameLocalStorageCookieSettings.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

26 lines
592 B
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>localStorage cookies settings test</title>
</head>
<body>
<script type="text/javascript">
function ok(what, msg) {
parent.postMessage({ type: "ok", what: !!what, msg }, "*");
}
function is(a, b, msg) {
ok(a === b, msg);
}
try {
localStorage.setItem("contentkey", "test-value");
ok(false, "Setting localStorageItem should throw a security exception");
} catch(ex) {
is(ex.name, "SecurityError", "Got security exception");
}
parent.postMessage({ type: "finish" }, "*");
</script>
</body>
</html>