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

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 10944014: Fix to enable the cached credentials login test (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Confirmed cached login fails with bad password, reparented User Pod class to PyUI Created 8 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
« no previous file with comments | « no previous file | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider_chromeos.cc
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc
index f256a037360051355401675ca0fa3ae6a424255b..b69947e6bd0e83ced813b5b11708b905cb097e8e 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -361,8 +361,10 @@ void TestingAutomationProvider::SubmitLoginForm(DictionaryValue* args,
AutomationJSONReply reply(this, reply_message);
std::string username, password;
+ bool use_cached_credentials;
if (!args->GetString("username", &username) ||
- !args->GetString("password", &password)) {
+ !args->GetString("password", &password) ||
+ !args->GetBoolean("use_cached_credentials", &use_cached_credentials)) {
reply.SendError("Invalid or missing args.");
return;
}
@@ -380,7 +382,11 @@ void TestingAutomationProvider::SubmitLoginForm(DictionaryValue* args,
VLOG(2) << "TestingAutomationProvider::SubmitLoginForm "
<< "ShowSigninScreenForCreds(" << username << ", " << password << ")";
- webui_login_display->ShowSigninScreenForCreds(username, password);
+ if (use_cached_credentials) {
+ webui_login_display->Login(username, password);
+ } else {
+ webui_login_display->ShowSigninScreenForCreds(username, password);
+ }
reply.SendSuccess(NULL);
}
« no previous file with comments | « no previous file | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698