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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html

Issue 466723002: ServiceWorker: Enable ServiceWorkerRegistration and update layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@updatefound
Patch Set: apply horo@'s patch (PatchSet 25 on https://codereview.chromium.org/468753003/) 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/chromium/service-worker-gc.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html b/LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html
index 18e09f603fb74b31cb7594bc4af669a5cb0de62f..aa4176bf71892ab3650d58e1084b68ad191274f8 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html
+++ b/LayoutTests/http/tests/serviceworker/chromium/service-worker-gc.html
@@ -27,7 +27,14 @@ function unregisterAndRegister(url, scope) {
});
}
-function onRegister(sw) {
+function onRegister(registration) {
+ registrationObservation = internals.observeGC(registration);
falken 2014/08/14 04:46:11 observeGC just returns an observer you can use to
horo 2014/08/14 07:11:46 Done.
+ registration.addEventListener('updatefound', (function() {
+ onUpdate(registration.installing);
+ }));
+}
+
+function onUpdate(sw) {
swObservation = internals.observeGC(sw);
sw.addEventListener('statechange', onStateChange);
}

Powered by Google App Engine
This is Rietveld 408576698