| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html
|
| index dce8b1129d9969fc7eec09860fa75ecf84bb7728..4fd92008766a381463ce0f8abe5c6846eea5adb9 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html
|
| @@ -7,10 +7,13 @@ async_test(function(t) {
|
| var scope = 'resources/scope/installing-waiting-active-after-registration';
|
| var worker_url = 'resources/empty-worker.js';
|
| var expected_url = normalizeURL(worker_url);
|
| + var installing_worker;
|
| + var registration;
|
|
|
| service_worker_unregister_and_register(t, worker_url, scope)
|
| .then(function(r) {
|
| registration = r;
|
| + installing_worker = registration.installing;
|
| assert_equals(registration.installing.scriptURL, expected_url,
|
| 'installing before updatefound');
|
| assert_equals(registration.waiting, null,
|
| @@ -19,8 +22,8 @@ async_test(function(t) {
|
| 'active before updatefound');
|
| return wait_for_update(t, registration);
|
| })
|
| - .then(function(worker) {
|
| - assert_equals(registration.installing.scriptURL, expected_url,
|
| + .then(function() {
|
| + assert_equals(registration.installing, installing_worker,
|
| 'installing after updatefound');
|
| assert_equals(registration.waiting, null,
|
| 'waiting after updatefound');
|
| @@ -31,18 +34,18 @@ async_test(function(t) {
|
| .then(function() {
|
| assert_equals(registration.installing, null,
|
| 'installing after installed');
|
| - assert_equals(registration.waiting.scriptURL, expected_url,
|
| + assert_equals(registration.waiting, installing_worker,
|
| 'waiting after installed');
|
| assert_equals(registration.active, null,
|
| 'active after installed');
|
| return wait_for_state(t, registration.waiting, 'activated');
|
| - })
|
| + })
|
| .then(function() {
|
| assert_equals(registration.installing, null,
|
| 'installing after activated');
|
| assert_equals(registration.waiting, null,
|
| 'waiting after activated');
|
| - assert_equals(registration.active.scriptURL, expected_url,
|
| + assert_equals(registration.active, installing_worker,
|
| 'active after activated');
|
| return Promise.all([
|
| wait_for_state(t, registration.active, 'redundant'),
|
|
|