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@{#487754}
WPT-Export-Revision: 8d477e09e22742fee30abee882e5349ef539b5e3
  • Loading branch information
xzhan96 authored and chromium-wpt-export-bot committed Jul 19, 2017
1 parent 5068e1f commit f22bd17
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 should be active by controllerchange');
resolve();
};
});
Expand Down

0 comments on commit f22bd17

Please sign in to comment.