зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1059007 - Don't skip MozStorageChanged event for frames in session store (r=ttaubert)
This commit is contained in:
Родитель
5acbba65ce
Коммит
22dcee9a12
|
@ -60,7 +60,7 @@ function createLazy(fn) {
|
|||
*/
|
||||
function isSessionStorageEvent(event) {
|
||||
try {
|
||||
return event.storageArea == content.sessionStorage;
|
||||
return event.storageArea == event.target.sessionStorage;
|
||||
} catch (ex if ex instanceof Ci.nsIException && ex.result == Cr.NS_ERROR_NOT_AVAILABLE) {
|
||||
// This page does not have a DOMSessionStorage
|
||||
// (this is typically the case for about: pages)
|
||||
|
|
|
@ -29,7 +29,17 @@ add_task(function session_storage() {
|
|||
is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
|
||||
"sessionStorage data for mochi.test has been serialized correctly");
|
||||
|
||||
// Ensure that modifying sessionStore values works.
|
||||
// Ensure that modifying sessionStore values works for the inner frame only.
|
||||
yield modifySessionStorage2(browser, {test: "modified1"});
|
||||
TabState.flush(browser);
|
||||
|
||||
({storage} = JSON.parse(ss.getTabState(tab)));
|
||||
is(storage["http://example.com"].test, "modified1",
|
||||
"sessionStorage data for example.com has been serialized correctly");
|
||||
is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
|
||||
"sessionStorage data for mochi.test has been serialized correctly");
|
||||
|
||||
// Ensure that modifying sessionStore values works for both frames.
|
||||
yield modifySessionStorage(browser, {test: "modified"});
|
||||
yield modifySessionStorage2(browser, {test: "modified2"});
|
||||
TabState.flush(browser);
|
||||
|
|
Загрузка…
Ссылка в новой задаче