Index: content/test/data/service_worker/imports_bust_memcache.html |
diff --git a/content/test/data/service_worker/imports_bust_memcache.html b/content/test/data/service_worker/imports_bust_memcache.html |
index cc0db4f494046130898a3c2aac557ca2494fb94f..2fc8af574e3144f735b42bbc4842a8f4c106792c 100644 |
--- a/content/test/data/service_worker/imports_bust_memcache.html |
+++ b/content/test/data/service_worker/imports_bust_memcache.html |
@@ -8,14 +8,18 @@ |
var scope = 'imports_bust_memcache_scope/'; |
var script = 'worker_with_one_import.js'; |
-navigator.serviceWorker.unregister(scope) |
+navigator.serviceWorker.getRegistration(scope) |
+.then(function(registration) { |
+ if (registration) |
+ return registration.unregister(); |
+}) |
.then(function(_) { |
console.log('initial unregistration done'); |
return navigator.serviceWorker.register(script, {scope: scope}); |
}) |
-.then(function(_) { |
+.then(function(registration) { |
console.log('initial registration done'); |
- return navigator.serviceWorker.unregister(scope); |
+ return registration.unregister(); |
}) |
.then(function(_) { |
console.log('unregistration done'); |