storage_session_window_open.window.js (634B)
1 async_test(function(t) { 2 3 var storage = window.sessionStorage; 4 storage.clear(); 5 6 storage.setItem("FOO", "BAR"); 7 var win = window.open("resources/storage_session_window_open_second.html"); 8 storage.setItem("BAZ", "QUX"); 9 window.addEventListener('message', t.step_func(function(e) { 10 e.data.forEach(t.step_func(function(assertion) { 11 assert_equals(assertion.actual, assertion.expected, assertion.message); 12 })); 13 win.close(); 14 t.done(); 15 })); 16 17 }, "A new window to make sure there is a copy of the previous window's sessionStorage, and that they diverge after a change");