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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-installed.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-installed.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-installed.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-installed.https.html
index 795386f8cd6747c6b551195c9bfed9eda5c307ea..93dc06d103378ef908a7470a2287fe06ef3177d7 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-installed.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/skip-waiting-installed.https.html
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<title>Service Worker: Skip waiting installed worker</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-installed';
@@ -13,16 +13,17 @@ promise_test(function(t) {
var frame, frame_sw, service_worker, registration, onmessage, oncontrollerchanged;
var saw_message = new Promise(function(resolve) {
onmessage = function(e) {
- var message = e.data;
- assert_equals(
- message, 'PASS',
- 'skipWaiting promise should be resolved with undefined');
+ resolve(e.data);
+ };
+ })
+ .then(function(message) {
+ assert_equals(
+ message, 'PASS',
+ 'skipWaiting promise should be resolved with undefined');
- assert_equals(registration.active.scriptURL, normalizeURL(url2),
- "skipWaiting should make worker become active");
- resolve();
- };
- });
+ assert_equals(registration.active.scriptURL, normalizeURL(url2),
+ 'skipWaiting should make worker become active');
+ });
var saw_controllerchanged = new Promise(function(resolve) {
oncontrollerchanged = function() {
assert_equals(

Powered by Google App Engine
This is Rietveld 408576698