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

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

Issue 466723002: ServiceWorker: Enable ServiceWorkerRegistration and update layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@updatefound
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/active.html
diff --git a/LayoutTests/http/tests/serviceworker/active.html b/LayoutTests/http/tests/serviceworker/active.html
index 68ec45dd5bfcfbaf7b46c181540078f47afd4762..b1bd7930f6fb82f781c1e6ee0d5e909f17b67541 100644
--- a/LayoutTests/http/tests/serviceworker/active.html
+++ b/LayoutTests/http/tests/serviceworker/active.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); }))
@@ -18,6 +19,10 @@ 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, 'activating');
}))
@@ -28,15 +33,15 @@ async_test(function(t) {
null,
'On activating state a document should not have a controller');
assert_equals(
- container.active.scriptURL,
+ registration.active.scriptURL,
normalizeURL(url),
'On activating state a document should have an active worker ');
assert_equals(
- container.waiting,
+ registration.waiting,
null,
'On activating state a document should not have a waiting worker');
assert_equals(
- container.installing,
+ registration.installing,
null,
'On activating state a document should not have an installing ' +
'worker');

Powered by Google App Engine
This is Rietveld 408576698