summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/domstorage/sessionstorage/window-open.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/storage/domstorage/sessionstorage/window-open.html')
-rw-r--r--LayoutTests/storage/domstorage/sessionstorage/window-open.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/LayoutTests/storage/domstorage/sessionstorage/window-open.html b/LayoutTests/storage/domstorage/sessionstorage/window-open.html
new file mode 100644
index 0000000..34f8f39
--- /dev/null
+++ b/LayoutTests/storage/domstorage/sessionstorage/window-open.html
@@ -0,0 +1,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>