3 <script src=
"resources/clearSessionStorage.js"></script>
7 testRunner
.dumpAsText();
11 document
.getElementById("logger").innerHTML
+= a
+ "<br>";
16 if (!window
.sessionStorage
) {
17 log("window.sessionStorage DOES NOT exist");
21 log("Length is " + window
.sessionStorage
.length
);
22 log("Value for FOO is " + window
.sessionStorage
.getItem("FOO"));
24 window
.sessionStorage
.setItem("FOO", "BAR");
26 log("Length is " + window
.sessionStorage
.length
);
27 log("Value for FOO is " + window
.sessionStorage
.getItem("FOO"));
28 log("Key for index 0 is " + window
.sessionStorage
.key(0));
29 log("Key for index 1 is " + window
.sessionStorage
.key(1));
30 log("Key for index -1 is " + window
.sessionStorage
.key(-1));
32 window
.sessionStorage
.setItem("FOO", "BAZ");
34 log("Length is " + window
.sessionStorage
.length
);
35 log("Value for FOO is " + window
.sessionStorage
.getItem("FOO"));
37 window
.sessionStorage
.removeItem("FOO");
39 log("Length is " + window
.sessionStorage
.length
);
40 log("Value for FOO is " + window
.sessionStorage
.getItem("FOO"));
45 <body onload=
"runTest();">
46 This test trys simple operations on SessionStorage
<br>
47 <div id=
"logger"></div>