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

Unified Diff: LayoutTests/http/tests/serviceworker/activation-after-registration.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/activation-after-registration.html
diff --git a/LayoutTests/http/tests/serviceworker/activation-after-registration.html b/LayoutTests/http/tests/serviceworker/activation-after-registration.html
index b391141f9d81ba2b808553e12a6c6eb4fee946e0..06b716b3f2aeb7d6f285cc359ccec63629dd542f 100644
--- a/LayoutTests/http/tests/serviceworker/activation-after-registration.html
+++ b/LayoutTests/http/tests/serviceworker/activation-after-registration.html
@@ -12,17 +12,20 @@ t.step(function() {
service_worker_unregister_and_register(
t, 'resources/empty-worker.js', scope)
- .then(t.step_func(function(r) {
+ .then(function(r) {
registration = r;
return wait_for_update(t, registration);
- }))
- .then(t.step_func(function(worker) {
- assert_equals(worker.state, 'parsed', 'worker should be in the "parsed" state upon registration');
- worker.addEventListener('statechange', t.step_func(function(event) {
- if (event.target.state == 'activated')
- service_worker_unregister_and_done(t, scope);
- }));
- }))
+ })
+ .then(function(worker) {
+ assert_equals(
+ worker.state,
+ 'installing',
+ 'worker should be in the "installing" state upon registration');
+ return wait_for_state(t, worker, 'activated');
+ })
+ .then(function() {
+ service_worker_unregister_and_done(t, scope);
+ })
.catch(unreached_rejection(t));
});
</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/serviceworker/install-phase-event-waituntil.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698