Skip to content

Commit

Permalink
Fix the issue of skip-waiting-installed.https.html
Browse files Browse the repository at this point in the history
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 w3c/ServiceWorker#1015.

BUG=725616

Change-Id: Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab
Reviewed-on: https://chromium-review.googlesource.com/571612
Commit-Queue: Xiaofeng Zhang <[email protected]>
Reviewed-by: Makoto Shimazu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#487784}
WPT-Export-Revision: b2da840104a198eaf197f0903419fc24f39aa9a6
  • Loading branch information
xzhan96 authored and chromium-wpt-export-bot committed Jul 19, 2017
1 parent 2d92896 commit f2dfb90
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 which calls skipWaiting should be active by controllerchange');
resolve();
};
});
Expand Down

0 comments on commit f2dfb90

Please sign in to comment.