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

Unified Diff: LayoutTests/http/tests/serviceworker/waiting.html

Issue 468753003: SW tests update (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 467133002 and fix test 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/waiting.html
diff --git a/LayoutTests/http/tests/serviceworker/waiting.html b/LayoutTests/http/tests/serviceworker/waiting.html
index 742a9fc64058f9509b16e713d7e25cb7cf7922ac..c070e5f3e657f1115e578fc3d1892311e890d85c 100644
--- a/LayoutTests/http/tests/serviceworker/waiting.html
+++ b/LayoutTests/http/tests/serviceworker/waiting.html
@@ -11,6 +11,7 @@ async_test(function(t) {
var url = 'resources/worker-no-op.js';
var scope = 'resources/blank.html';
var frame;
+ var registration;
navigator.serviceWorker.unregister(scope)
.then(step(function() { return with_iframe(scope); }),
@@ -19,15 +20,19 @@ async_test(function(t) {
frame = f;
return navigator.serviceWorker.register(url, {scope: scope});
}))
+ .then(step(function(r) {
+ registration = r;
+ return wait_for_update(t, registration);
+ }))
.then(step(function(serviceWorker) {
return wait_for_state(t, serviceWorker, 'installed');
}), unreached_rejection(t, 'Registration should not fail'))
.then(step(function() {
var container = frame.contentWindow.navigator.serviceWorker;
assert_equals(container.controller, null);
- assert_equals(container.active, null);
- assert_equals(container.waiting.scriptURL, normalizeURL(url));
- assert_equals(container.installing, null);
+ assert_equals(registration.active, null);
+ assert_equals(registration.waiting.scriptURL, normalizeURL(url));
+ assert_equals(registration.installing, null);
// FIXME: Add a test for a frame created after installation.
// Should the existing frame ("frame") block activation?

Powered by Google App Engine
This is Rietveld 408576698