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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html

Issue 1314123002: Remove hard-coded origins in layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ?pipe=sub and make test first parameter. Created 5 years, 3 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/serviceworker/chromium/service-worker-allowed.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html b/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
index 25dda4af0daf22eb3ea5d40e9c849eaee4edcff1..1ab415256ed115ae40451091895f5ac141382a2e 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
+++ b/LayoutTests/http/tests/serviceworker/chromium/service-worker-allowed.html
@@ -6,9 +6,12 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharness-helpers.js"></script>
<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/get-host-info.js"></script>
<script src="../resources/test-helpers.js"></script>
<script>
+var host_info = get_host_info();
+
promise_test(function(t) {
var script = 'resources/service-worker-allowed-worker.php' +
'?ServiceWorkerAllowed=/allowed-path';
@@ -66,9 +69,11 @@ promise_test(function(t) {
}, 'Registering outside Service-Worker-Allowed path with parent reference');
promise_test(function(t) {
- var script = 'https://localhost:8443/serviceworker/chromium/resources/' +
+ var script = host_info.HTTPS_REMOTE_ORIGIN +
+ '/serviceworker/chromium/resources/' +
'service-worker-allowed-worker.php' +
- '?ServiceWorkerAllowed=http://localhost:8000/cross-origin/';
+ '?ServiceWorkerAllowed=' +
+ host_info.HTTP_REMOTE_ORIGIN + '/cross-origin/';
var scope = '/cross-origin/';
return assert_promise_rejects(
navigator.serviceWorker.register(script, {scope: scope}),

Powered by Google App Engine
This is Rietveld 408576698