From f22bd17f49d7bb25867c08a4de3233b4ba7f3cbd Mon Sep 17 00:00:00 2001 From: "xiaofeng.zhang@intel.com" Date: Tue, 18 Jul 2017 21:51:21 -0700 Subject: [PATCH] Fix the issue of skip-waiting-installed.https.html According to the current spec, skipWaiting() promise should be resolved earlier even in the case that the service worker state is "installed", and then continues the activate in parallel. The test case violate that. The background is in https://github.com/w3c/ServiceWorker/issues/1015. BUG=725616 Change-Id: Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab Reviewed-on: https://chromium-review.googlesource.com/571612 Cr-Commit-Position: refs/heads/master@{#487754} WPT-Export-Revision: 8d477e09e22742fee30abee882e5349ef539b5e3 --- .../service-worker/skip-waiting-installed.https.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/service-workers/service-worker/skip-waiting-installed.https.html b/service-workers/service-worker/skip-waiting-installed.https.html index 93dc06d103378ef..f4dc24f33cb361f 100644 --- a/service-workers/service-worker/skip-waiting-installed.https.html +++ b/service-workers/service-worker/skip-waiting-installed.https.html @@ -20,15 +20,14 @@ assert_equals( message, 'PASS', 'skipWaiting promise should be resolved with undefined'); - - assert_equals(registration.active.scriptURL, normalizeURL(url2), - 'skipWaiting should make worker become active'); }); var saw_controllerchanged = new Promise(function(resolve) { oncontrollerchanged = function() { assert_equals( frame_sw.controller.scriptURL, normalizeURL(url2), 'Controller scriptURL should change to the second one'); + assert_equals(registration.active.scriptURL, normalizeURL(url2), + 'worker should be active by controllerchange'); resolve(); }; });