diff options
Diffstat (limited to 'LayoutTests/storage/domstorage/sessionstorage/resources/window-open-second.html')
-rw-r--r-- | LayoutTests/storage/domstorage/sessionstorage/resources/window-open-second.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/LayoutTests/storage/domstorage/sessionstorage/resources/window-open-second.html b/LayoutTests/storage/domstorage/sessionstorage/resources/window-open-second.html new file mode 100644 index 0000000..b8dede6 --- /dev/null +++ b/LayoutTests/storage/domstorage/sessionstorage/resources/window-open-second.html @@ -0,0 +1,36 @@ +<html> +<head> +<script> + +var secondWindowLog = "Logging from second window:<br>"; + +function log(a) +{ + secondWindowLog += a + "<br>"; +} + +function runTest() +{ + if (!window.sessionStorage) { + log("window.sessionStorage DOES NOT exist"); + return; + } + + log("Value for FOO is " + window.sessionStorage.getItem("FOO")); + window.sessionStorage.setItem("FOO", "BAR-NEWWINDOW"); + log("Value for FOO after changing my own copy is " + window.sessionStorage.getItem("FOO")); + + log("Value for FOO in my opening window is " + window.opener.sessionStorage.getItem("FOO")); + + window.opener.log(secondWindowLog); + + if (window.layoutTestController) + layoutTestController.notifyDone(); +} + +</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> +</body> +</html> |