зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1155153 - [e10s] about:serviceworkers should work in e10s mode. Update B2G implementation. r=baku
This commit is contained in:
Родитель
dcdcd94a06
Коммит
71c0c12de4
|
@ -130,7 +130,16 @@ this.AboutServiceWorkers = {
|
|||
self.sendError(message.id, "MissingScope");
|
||||
return;
|
||||
}
|
||||
gServiceWorkerManager.softUpdate(message.scope);
|
||||
|
||||
if (!message.principal ||
|
||||
!message.principal.originAttributes) {
|
||||
// XXX This will always error until bug 1171915 is fixed.
|
||||
self.sendError(message.id, "MissingOriginAttributes");
|
||||
return;
|
||||
}
|
||||
|
||||
gServiceWorkerManager.propagateSoftUpdate({},
|
||||
message.scope);
|
||||
self.sendResult(message.id, true);
|
||||
break;
|
||||
|
||||
|
@ -166,9 +175,9 @@ this.AboutServiceWorkers = {
|
|||
Ci.nsIServiceWorkerUnregisterCallback
|
||||
])
|
||||
};
|
||||
gServiceWorkerManager.unregister(principal,
|
||||
serviceWorkerUnregisterCallback,
|
||||
message.scope);
|
||||
gServiceWorkerManager.propagateUnregister(principal,
|
||||
serviceWorkerUnregisterCallback,
|
||||
message.scope);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,12 +128,15 @@ add_test(function test_swm() {
|
|||
"SWM.getAllRegistrations exists");
|
||||
do_check_true(typeof gServiceWorkerManager.getAllRegistrations == "function",
|
||||
"SWM.getAllRegistrations is a function");
|
||||
do_check_true(gServiceWorkerManager.softUpdate, "SWM.softUpdate exists");
|
||||
do_check_true(typeof gServiceWorkerManager.softUpdate == "function",
|
||||
"SWM.softUpdate is a function");
|
||||
do_check_true(gServiceWorkerManager.unregister, "SWM.unregister exists");
|
||||
do_check_true(typeof gServiceWorkerManager.unregister == "function",
|
||||
"SWM.unregister exists");
|
||||
do_check_true(gServiceWorkerManager.propagateSoftUpdate,
|
||||
"SWM.propagateSoftUpdate exists");
|
||||
do_check_true(typeof gServiceWorkerManager.propagateSoftUpdate == "function",
|
||||
|
||||
"SWM.propagateSoftUpdate is a function");
|
||||
do_check_true(gServiceWorkerManager.propagateUnregister,
|
||||
"SWM.propagateUnregister exists");
|
||||
do_check_true(typeof gServiceWorkerManager.propagateUnregister == "function",
|
||||
"SWM.propagateUnregister exists");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче