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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/test-helpers.js

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/serviceworker/resources/test-helpers.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
index 5f9cc5936e34a697d2a32f8974e43acc12b434dc..57c9f286bd9f3827fe3e6c71637bbb9e5cbf710f 100644
--- a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
+++ b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
@@ -188,21 +188,13 @@ function test_login(test, origin, username, password, cookie) {
});
}
-function login(test) {
- return test_login(test, 'http://127.0.0.1:8000',
- 'username1', 'password1', 'cookie1')
+function login(local, remote, test) {
nhiroki 2015/09/01 04:06:44 nit: can you move |test| to the first argument to
+ var suffix = (local.indexOf("https") != -1) ? "s": "";
+ return test_login(test, local, 'username1' + suffix, 'password1' + suffix,
+ 'cookie1')
.then(function() {
- return test_login(test, 'http://localhost:8000',
- 'username2', 'password2', 'cookie2');
- });
-}
-
-function login_https(test) {
- return test_login(test, 'https://127.0.0.1:8443',
- 'username1s', 'password1s', 'cookie1')
- .then(function() {
- return test_login(test, 'https://localhost:8443',
- 'username2s', 'password2s', 'cookie2');
+ return test_login(test, remote, 'username2' + suffix,
+ 'password2' + suffix, 'cookie2');
});
}

Powered by Google App Engine
This is Rietveld 408576698