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