blob: 34f8f398e9be05457d33e2caa6362de67ed16ab5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<html>
<head>
<script src="resources/clearSessionStorage.js"></script>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
}
function log(a)
{
document.getElementById("logger").innerHTML += a + "<br>";
}
function runTest()
{
if (!window.sessionStorage) {
log("window.sessionStorage DOES NOT exist");
return;
}
window.log = log;
window.sessionStorage.setItem("FOO", "BAR");
log("Value for FOO is " + window.sessionStorage.getItem("FOO"));
window.open("resources/window-open-second.html");
}
</script>
</head>
<body onload="runTest();">
This is a new window to make sure there is a copy of the previous window's sessionStorage, and that they diverge after a change<br>
<div id="logger"></div>
</body>
</html>
|