mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Revert the debugging patch for bug 1157901
This commit is contained in:
parent
aacb467ca4
commit
2ff1229507
@ -17,24 +17,18 @@
|
||||
var registration;
|
||||
var promise;
|
||||
|
||||
SimpleTest.requestCompleteLog();
|
||||
|
||||
function start() {
|
||||
info("start got called");
|
||||
return navigator.serviceWorker.register("worker_updatefoundevent.js",
|
||||
{ scope: "./updatefoundevent.html" })
|
||||
.then((swr) => registration = swr);
|
||||
}
|
||||
|
||||
function startWaitForUpdateFound() {
|
||||
info("startWaitForUpdateFound got called");
|
||||
registration.onupdatefound = function(e) {
|
||||
info("onupdatefound");
|
||||
}
|
||||
|
||||
promise = new Promise(function(resolve, reject) {
|
||||
window.onmessage = function(e) {
|
||||
info("Got message " + e.data);
|
||||
|
||||
if (e.data == "finish") {
|
||||
ok(true, "Received updatefound");
|
||||
@ -52,18 +46,15 @@
|
||||
}
|
||||
|
||||
function registerNext() {
|
||||
info("registerNext got called");
|
||||
return navigator.serviceWorker.register("worker_updatefoundevent2.js",
|
||||
{ scope: "./updatefoundevent.html" });
|
||||
}
|
||||
|
||||
function waitForUpdateFound() {
|
||||
info("waitForUpdateFound got called");
|
||||
return promise;
|
||||
}
|
||||
|
||||
function unregister() {
|
||||
info("unregister got called");
|
||||
return registration.unregister().then(function(result) {
|
||||
ok(result, "Unregister should return true.");
|
||||
});
|
||||
@ -85,7 +76,6 @@
|
||||
["dom.serviceWorkers.exemptFromPerDomainMax", true],
|
||||
["dom.serviceWorkers.enabled", true],
|
||||
["dom.serviceWorkers.testing.enabled", true],
|
||||
["browser.dom.window.dump.enabled", true],
|
||||
]}, runTest);
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -6,10 +6,8 @@
|
||||
onactivate = function(e) {
|
||||
e.waitUntil(new Promise(function(resolve, reject) {
|
||||
registration.onupdatefound = function(e) {
|
||||
dump("Update found for scope " + registration.scope + "\n");
|
||||
clients.matchAll().then(function(clients) {
|
||||
if (!clients.length) {
|
||||
dump("No clients found\n");
|
||||
reject("No clients found");
|
||||
}
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
// Not useful.
|
||||
dump("worker_updatefoundevent2.js loaded\n");
|
||||
|
Loading…
Reference in New Issue
Block a user