Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html

Issue 517223002: ServiceWorker: Tweak layout tests based on the latest install sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html
diff --git a/LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html b/LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html
index b5eeb6aa56e8f539431a3c1df55d35580d37d844..7f72d9eed1d8f2014f5b1540c361a4cac9ab3abf 100644
--- a/LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html
+++ b/LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html
@@ -52,10 +52,11 @@ async_test(function(t) {
var scope = 'install-fulfilled';
var onRegister = function(worker) {
var obj = {};
+ assert_equals(worker.state,
+ 'installing',
+ 'Should be in the "installing" state upon updatefound');
worker.onstatechange = t.step_func(function() {
- if (worker.state == 'installing') {
- syncWorker(t, worker, obj);
- } else if (worker.state == 'installed') {
+ if (worker.state == 'installed') {
assert_true(
obj.synced,
'state should be "installed" after the waitUntil promise ' +
@@ -63,6 +64,7 @@ async_test(function(t) {
service_worker_unregister_and_done(t, scope);
}
});
+ syncWorker(t, worker, obj);
};
runTest(t, scope, onRegister);
}, 'Test install event waitUntil fulfilled', properties);

Powered by Google App Engine
This is Rietveld 408576698