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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js

Issue 722603002: [ServiceWorker] Use the cookie which is differnt from the username in LayoutTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/fetch-access-control-util.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js
index 4b0d39bf956110509e192d8d8189a4d399e80c8a..bb07dcd19a2c4f73666a3a839b8037dd1c937b62 100644
--- a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js
@@ -85,7 +85,7 @@ var checkJsonpMethod = function(method, url, data) {
method,
'Method must match url:' + url);
};
-var checkJsonpAuth = function(username, password, url, data) {
+var checkJsonpAuth = function(username, password, cookie, url, data) {
assert_equals(data.jsonpResult,
'success',
url + ' jsonpResult must be success');
@@ -96,7 +96,7 @@ var checkJsonpAuth = function(username, password, url, data) {
password,
'Password must match. url: ' + url);
assert_equals(data.cookie,
- username,
+ cookie,
'Cookie must match. url: ' + url);
};
var checkJsonpError = checkJsonpResult.bind(this, 'error');
@@ -109,16 +109,19 @@ var methodIsGET = checkJsonpMethod.bind(this, 'GET');
var methodIsPOST = checkJsonpMethod.bind(this, 'POST');
var methodIsPUT = checkJsonpMethod.bind(this, 'PUT');
var methodIsXXX = checkJsonpMethod.bind(this, 'XXX');
-var authCheckNone = checkJsonpAuth.bind(this, 'undefined', 'undefined');
-var authCheck1 = checkJsonpAuth.bind(this, 'username1', 'password1');
-var authCheck2 = checkJsonpAuth.bind(this, 'username2', 'password2');
+var authCheckNone =
+ checkJsonpAuth.bind(this, 'undefined', 'undefined', 'undefined');
+var authCheck1 = checkJsonpAuth.bind(this, 'username1', 'password1', 'cookie1');
+var authCheck2 = checkJsonpAuth.bind(this, 'username2', 'password2', 'cookie2');
function executeTests(test, test_targets) {
test.step(function() {
var login1 =
- test_login(test, 'http://127.0.0.1:8000', 'username1', 'password1');
+ test_login(test, 'http://127.0.0.1:8000',
+ 'username1', 'password1', 'cookie1');
var login2 =
- test_login(test, 'http://localhost:8000', 'username2', 'password2');
+ test_login(test, 'http://localhost:8000',
+ 'username2', 'password2', 'cookie2');
var workerScript = 'resources/fetch-access-control-worker.js';
var worker = undefined;
var frameWindow = {};

Powered by Google App Engine
This is Rietveld 408576698