diff options
Diffstat (limited to '')
-rw-r--r-- | testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html b/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html new file mode 100644 index 0000000000..2eeff0b865 --- /dev/null +++ b/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html @@ -0,0 +1,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> |