Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html |
index ac6c3226f1371771fac1e4800712e86b64dd2678..48b5a8c9aeeb40648c4d295492d4a44b957d788f 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html |
@@ -1,17 +1,17 @@ |
<!DOCTYPE html> |
<title>Service Worker: Skip waiting</title> |
<script src="/resources/testharness.js"></script> |
-<script src="resources/testharness-helpers.js"></script> |
<script src="/resources/testharnessreport.js"></script> |
<script src="resources/test-helpers.sub.js"></script> |
<script> |
+'use strict'; |
promise_test(function(t) { |
var scope = 'resources/blank.html?skip-waiting'; |
var url1 = 'resources/empty.js'; |
var url2 = 'resources/empty-worker.js'; |
var url3 = 'resources/skip-waiting-worker.js'; |
- var frame, sw_registration, activated_worker, waiting_worker; |
+ var sw_registration, activated_worker, waiting_worker; |
return service_worker_unregister_and_register(t, url1, scope) |
.then(function(registration) { |
sw_registration = registration; |
@@ -21,7 +21,9 @@ promise_test(function(t) { |
return with_iframe(scope); |
}) |
.then(function(f) { |
- frame = f; |
+ t.add_cleanup(function() { |
+ f.remove(); |
+ }); |
return navigator.serviceWorker.register(url2, {scope: scope}); |
}) |
.then(function(registration) { |
@@ -46,7 +48,6 @@ promise_test(function(t) { |
'Worker with url2 should be redundant'); |
assert_equals(sw_registration.active.scriptURL, normalizeURL(url3), |
'Worker with url3 should be activated'); |
- frame.remove(); |
return service_worker_unregister_and_done(t, scope); |
}); |
}, 'Test skipWaiting with both active and waiting workers'); |