Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html

Issue 1314123002: Remove hard-coded origins in layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix fetch(...) tests relying on hard-coded origins. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html
diff --git a/LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html b/LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html
index 7b15d9dcd84d22fed1f8ca8a5c9c1a0bcf480129..9aca557da2b0c95158dbbb75a299bd83d9e7484f 100644
--- a/LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html
+++ b/LayoutTests/http/tests/fetch/serviceworker-proxied/thorough/auth-nocors.html
@@ -3,6 +3,7 @@
<meta name="timeout" content="long"></meta>
<script src = "/resources/testharness.js"></script>
<script src = "/resources/testharnessreport.js"></script>
+<script src = "/resources/get-host-info.js"></script>
<script src = "/serviceworker/resources/test-helpers.js"></script>
<script src = "/fetch/resources/fetch-test-options.js"></script>
<script src = "/fetch/resources/fetch-test-helpers.js"></script>
@@ -16,13 +17,17 @@ function onlyOnServiceWorkerProxiedTest(checkFuncs) {
</head>
<body>
<script>
+var host_info = get_host_info();
function start(t) {
executeServiceWorkerProxiedTests(TEST_TARGETS);
t.done();
}
function init(test) {
- return login(test)
- .then(function() {return login_https(test);});
+ return login(host_info["HTTP_ORIGIN"], host_info["HTTP_REMOTE_ORIGIN"], test)
+ .then(function() {
+ return login(host_info["HTTPS_ORIGIN"],
+ host_info["HTTPS_REMOTE_ORIGIN"], test);
+ });
}
</script>

Powered by Google App Engine
This is Rietveld 408576698