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
Cr-Commit-Position: refs/heads/master@{#487024}
WPT-Export-Revision: 2256ed61b315000c27f6c8b0dd94a3f025c4adc1
  • Loading branch information
xzhan96 authored and chromium-wpt-export-bot committed Jul 17, 2017
1 parent 2c5306a commit 91e2981
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
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),
'skipWaiting should make worker become active');
resolve();
};
});
Expand Down

0 comments on commit 91e2981

Please sign in to comment.