Index: LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html |
diff --git a/LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html b/LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html |
index 84095ed20d9e2f334ba113b747c2df0ba2bfe5f7..128328631a913ed4a715ac6f0922b4f118898cbb 100644 |
--- a/LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html |
+++ b/LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html |
@@ -3,12 +3,21 @@ |
<script src="../resources/testharness.js"></script> |
<script src="../resources/testharnessreport.js"></script> |
<script src="resources/test-helpers.js?pipe=sub"></script> |
+<body> |
<script> |
async_test(function(t) { |
+ var login1 = |
+ test_login(t, 'http://127.0.0.1:8000', 'username1', 'password1'); |
+ var login2 = |
+ test_login(t, 'http://localhost:8000', 'username2', 'password2'); |
var SCOPE = 'resources/fetch-cors-xhr-iframe.html'; |
var SCRIPT = 'resources/fetch-rewrite-worker.js'; |
var host_info = get_host_info(); |
- service_worker_unregister_and_register(t, SCRIPT, SCOPE) |
+ |
+ Promise.all([login1, login2]) |
+ .then(function() { |
+ return service_worker_unregister_and_register(t, SCRIPT, SCOPE); |
+ }) |
.then(function(registration) { |
return wait_for_update(t, registration); |
}) |
@@ -31,3 +40,4 @@ async_test(function(t) { |
.catch(unreached_rejection(t)); |
}, 'Verify CORS XHR of fetch() in a Service Worker'); |
</script> |
+</body> |