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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-without-using-registration.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-without-using-registration.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-without-using-registration.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-without-using-registration.https.html
index 5ae9cdb51cfadd35b0411cc15391c48c28bc5e51..dbe2bde78d3c0b4bd68967188d668c455714121f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-without-using-registration.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-without-using-registration.https.html
@@ -1,22 +1,24 @@
<!DOCTYPE html>
<title>Service Worker: Skip waiting without using registration</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-without-using-registration';
var url = 'resources/skip-waiting-worker.js';
- var frame, frame_sw, sw_registration;
+ var frame_sw, sw_registration;
return service_worker_unregister(t, scope)
.then(function() {
return with_iframe(scope);
})
.then(function(f) {
- frame = f;
+ t.add_cleanup(function() {
+ f.remove();
+ });
frame_sw = f.contentWindow.navigator.serviceWorker;
assert_equals(frame_sw.controller, null,
'Document controller should be null');
@@ -24,8 +26,7 @@ promise_test(function(t) {
})
.then(function(registration) {
sw_registration = registration;
- add_completion_callback(function() {
- frame.remove();
+ t.add_cleanup(function() {
registration.unregister();
});
return wait_for_state(t, registration.installing, 'activated');

Powered by Google App Engine
This is Rietveld 408576698