diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /dom/tests/mochitest/localstorage/frameOrder.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/tests/mochitest/localstorage/frameOrder.html')
-rw-r--r-- | dom/tests/mochitest/localstorage/frameOrder.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dom/tests/mochitest/localstorage/frameOrder.html b/dom/tests/mochitest/localstorage/frameOrder.html new file mode 100644 index 0000000000..8fed3bc794 --- /dev/null +++ b/dom/tests/mochitest/localstorage/frameOrder.html @@ -0,0 +1,28 @@ +<html> +<head> +</head> +<script type="text/javascript"> +function doTest() +{ + var query = location.search.substring(1); + query = unescape(query); + // eslint-disable-next-line no-eval + var keyNames = eval(query); + + parent.is(localStorage.a, "10", "a = 10"); + parent.is(localStorage.b, "20", "b = 20"); + parent.is(localStorage.c, "30", "c = 30"); + parent.is(localStorage.d, "40", "d = 40"); + parent.is(localStorage.e, "50", "e = 50"); + parent.is(localStorage.length, 5, "length = 5"); + + for (var i = 0; i < localStorage.length; ++i) + parent.is(keyNames[i], localStorage.key(i), "key "+keyNames[i]+" on same index"); + + parent.SimpleTest.finish(); + localStorage.clear(); +} +</script> +<body onload="doTest();"> +</body> +</html> |