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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting.https.html

Issue 2900183002: Upstream service wrkr "skipWaiting" tests to WPT (Closed)
Patch Set: Improve assertion message Created 3 years, 7 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: 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');

Powered by Google App Engine
This is Rietveld 408576698