Revert the debugging patch for bug 1157901

This commit is contained in:
Ehsan Akhgari 2015-05-05 21:43:53 -04:00
parent aacb467ca4
commit 2ff1229507
3 changed files with 0 additions and 13 deletions

View File

@ -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>

View File

@ -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");
}

View File

@ -1,2 +1 @@
// Not useful.
dump("worker_updatefoundevent2.js loaded\n");