Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/onactivate-script-error.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/onactivate-script-error.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/onactivate-script-error.https.html |
index 23a7f2c86868ee57b0556b63c1caa23d6db40c8f..6c16357f3cc5aba181ee0798ac9fadc2388c3f3a 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/onactivate-script-error.https.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/onactivate-script-error.https.html |
@@ -33,16 +33,15 @@ function make_test(name, script) { |
return service_worker_unregister_and_register(t, script, scope) |
.then(function(r) { |
registration = r; |
+ |
+ t.add_cleanup(function() { |
+ r.unregister(); |
+ }); |
+ |
return wait_for_install(registration.installing); |
}) |
.then(function() { |
// Activate should succeed regardless of script errors. |
- if (registration.active && registration.active.state == 'activated') { |
- return Promise.resolve(); |
- } else if (registration.active) { |
- return wait_for_activate(registration.active); |
- } |
- |
return wait_for_activate(registration.waiting); |
}); |
}, name); |