blob: 2eeff0b86508809ef974578bac011a6235ed5225 (
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
40
41
|
<!DOCTYPE HTML>
<html>
<head>
<title>WebStorage Test: sessionStorage - second page</title>
</head>
<body>
<script>
var storage = window.sessionStorage;
var assertions = [];
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR",
message: "storage.getItem('FOO')"
});
storage.setItem("FOO", "BAR-NEWWINDOW");
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR-NEWWINDOW",
message: "value for FOO after changing"
});
assertions.push({
actual: window.opener.sessionStorage.getItem("FOO"),
expected: "BAR",
message: "value for FOO in my opening window"
});
assertions.push({
actual: storage.getItem("BAZ"),
expected: null,
message: "value for BAZ set after window.open(), is not set in new window"
});
window.opener.postMessage(assertions, '*');
</script>
</body>
</html>
|