Bug 1251238 - Part 2: Modify test because we notify chrome listener each time when service worker's state is updated. r=bkelly

--HG--
extra : rebase_source : 255c6771dc705c556e82789b1af9b04aed697a0b
This commit is contained in:
Tom Tung 2017-03-24 09:57:14 +08:00
Родитель f25c306bc0
Коммит 7e01edd0c6
1 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -58,6 +58,13 @@
ok(registration.activeWorker === null);
return waitForServiceWorkerRegistrationChange(registration, function () {
// Activating
ok(registration.installingWorker === null);
ok(registration.waitingWorker === null);
ok(registration.activeWorker !== null);
return waitForServiceWorkerRegistrationChange(registration, function () {
// Activated
ok(registration.installingWorker === null);
ok(registration.waitingWorker === null);
ok(registration.activeWorker !== null);
@ -67,6 +74,7 @@
});
});
});
});
iframe.contentWindow.postMessage("register", "*");
let registration = yield promise;
@ -83,6 +91,13 @@
ok(registration.activeWorker !== null);
return waitForServiceWorkerRegistrationChange(registration, function () {
// Activating
ok(registration.installingWorker === null);
ok(registration.waitingWorker === null);
ok(registration.activeWorker !== null);
return waitForServiceWorkerRegistrationChange(registration, function () {
// Activated
ok(registration.installingWorker === null);
ok(registration.waitingWorker === null);
ok(registration.activeWorker !== null);
@ -91,6 +106,7 @@
});
});
});
});
iframe.contentWindow.postMessage("register", "*");
yield promise;