Index: LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js |
diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js |
index bb07dcd19a2c4f73666a3a839b8037dd1c937b62..9329a1a4d42c56e90a0be4025e71b3bb134b0e45 100644 |
--- a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js |
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js |
@@ -135,15 +135,12 @@ function executeTests(test, test_targets) { |
SCOPE); |
}) |
.then(function(registration) { |
- return wait_for_update(test, registration); |
- }) |
- .then(function(sw) { |
- worker = sw; |
+ worker = registration.installing; |
var messageChannel = new MessageChannel(); |
messageChannel.port1.onmessage = test.step_func(onWorkerMessage); |
- sw.postMessage( |
+ worker.postMessage( |
{port: messageChannel.port2}, [messageChannel.port2]); |
- return wait_for_state(test, sw, 'activated'); |
+ return wait_for_state(test, worker, 'activated'); |
}) |
.then(function() { |
return with_iframe(SCOPE); |