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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/register-error-messages.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/register-error-messages.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/register-error-messages.html b/LayoutTests/http/tests/serviceworker/chromium/register-error-messages.html
index ea35b503c2c16afe7f4ef3f6ad766242d8d08a68..50835b50d53b21f98e5586606a86e60069054aa6 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/register-error-messages.html
+++ b/LayoutTests/http/tests/serviceworker/chromium/register-error-messages.html
@@ -50,7 +50,7 @@ promise_test(function(t) {
var scope = 'http://example.com';
var message = 'Failed to get a ServiceWorkerRegistration: The origin of ' +
'the provided documentURL (\'http://example.com\') does not match ' +
- 'the current origin (\'http://127.0.0.1:8000\').';
+ 'the current origin (\'' + window.location.origin + '\').';
return assert_register_fails(script, scope, message);
}, 'Registration scope outside domain');
@@ -59,7 +59,7 @@ promise_test(function(t) {
var scope = 'http://example.com/scope/';
var message = 'Failed to get a ServiceWorkerRegistration: The origin of ' +
'the provided documentURL (\'http://example.com\') does not match ' +
- 'the current origin (\'http://127.0.0.1:8000\').';
+ 'the current origin (\'' + window.location.origin + '\').';
return assert_register_fails(script, scope, message);
}, 'Registering script outside domain');
@@ -148,9 +148,9 @@ promise_test(function(t) {
var script = '../resources%2fempty-worker.js';
var scope = '../resources/scope/encoded-slash-in-script-url';
var message = 'Failed to register a ServiceWorker: The provided scope ' +
- '(\'http://127.0.0.1:8000/serviceworker/resources/scope/' +
+ '(\'' + window.location.origin + '/serviceworker/resources/scope/' +
'encoded-slash-in-script-url\') or scriptURL ' +
- '(\'http://127.0.0.1:8000/serviceworker/' +
+ '(\'' + window.location.origin + '/serviceworker/' +
'resources%2fempty-worker.js\') ' +
'includes a disallowed escape character.';
return assert_register_fails(script, scope, message);

Powered by Google App Engine
This is Rietveld 408576698