| Index: LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-iframe.html
|
| diff --git a/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-iframe.html b/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-iframe.html
|
| index fa98d0a3d15ae12a492aa474221be691e5b1bc0b..ae3d5f1f9d030fa38f02983e373200653ce09821 100644
|
| --- a/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-iframe.html
|
| +++ b/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-iframe.html
|
| @@ -8,16 +8,9 @@ window.addEventListener('message', function(evt) {
|
| start();
|
| }, false);
|
|
|
| -function wait_for_update(registration) {
|
| - return new Promise(function(resolve) {
|
| - registration.addEventListener('updatefound', function() {
|
| - resolve(registration.installing);
|
| - });
|
| - });
|
| -}
|
| -
|
| -function wait_for_activated(worker) {
|
| +function wait_for_activated(registration) {
|
| return new Promise(function(resolve) {
|
| + var worker = registration.installing;
|
| worker.addEventListener('statechange', function() {
|
| if (worker.state == 'activated') {
|
| resolve(worker);
|
| @@ -35,7 +28,6 @@ function start() {
|
| .then(function() {
|
| return navigator.serviceWorker.register(script, {scope: scope});
|
| })
|
| - .then(wait_for_update)
|
| .then(wait_for_activated)
|
| .then(function(worker) {
|
| port.postMessage({msg: 'registered'});
|
|
|