Index: LayoutTests/http/tests/serviceworker/registration-end-to-end.html |
diff --git a/LayoutTests/http/tests/serviceworker/registration-end-to-end.html b/LayoutTests/http/tests/serviceworker/registration-end-to-end.html |
index 13c49c7d82988088a3faa64d638f569490344a24..877bd26ad3be33ea2adf28ce6155b344bbe82efe 100644 |
--- a/LayoutTests/http/tests/serviceworker/registration-end-to-end.html |
+++ b/LayoutTests/http/tests/serviceworker/registration-end-to-end.html |
@@ -22,7 +22,12 @@ t.step(function() { |
}; |
service_worker_unregister_and_register( |
- t, 'resources/end-to-end-worker.js', scope).then(t.step_func(onRegister)); |
+ t, 'resources/end-to-end-worker.js', scope) |
+ .then(function(registration) { |
+ return wait_for_update(t, registration); |
+ }) |
+ .then(onRegister) |
+ .catch(unreached_rejection(t)); |
function sendMessagePort(worker, from) { |
var messageChannel = new MessageChannel(); |