3 <script src=
"resources/clearSessionStorage.js"></script>
7 testRunner
.dumpAsText();
11 document
.getElementById('logger').appendChild(document
.createTextNode(a
));
12 document
.getElementById('logger').appendChild(document
.createElement("br"));
17 if (!window
.sessionStorage
) {
18 log("window.sessionStorage DOES NOT exist");
22 log("foo (before anything) is: " + sessionStorage
.foo
);
23 sessionStorage
.foo
= "bar";
24 log("foo (after a named property setter set) is: " + sessionStorage
.foo
);
25 delete sessionStorage
.foo
;
26 log("foo (after a delete) is: " + sessionStorage
.foo
);
27 sessionStorage
["foo"] = "bar";
28 log("foo (after an indexed setter set) is: " + sessionStorage
.foo
);
29 delete sessionStorage
.FOO
;
30 log("foo (after deleting FOO (not foo)) is : " + sessionStorage
.foo
);
31 delete sessionStorage
.foo
;
32 log("foo (after a delete) is: " + sessionStorage
.foo
);
33 sessionStorage
.setItem("foo", "bar");
34 log("foo (after calling setItem) is: " + sessionStorage
.foo
);
35 delete sessionStorage
.foo
;
36 log("foo (after a delete) is: " + sessionStorage
.foo
);
37 delete sessionStorage
.foo
;
38 log("foo (after a redundant delete) is: " + sessionStorage
.foo
);
39 sessionStorage
.foo
= "bar";
40 log("foo (after a named property setter set) is: " + sessionStorage
.foo
);
41 delete sessionStorage
["foo"];
42 log("foo (after an indexed delete) is: " + sessionStorage
.foo
);
47 <body onload=
"runTest();">
48 This test makes sure that using the syntax `delete sessionStorage.keyName` works as an alias to `sessionStorage.removeItem(keyName).`
<br><hr>
49 <div id=
"logger"></div>