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

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: Login with Cached Credentials hooks 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
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..8390f39881e387f10e999aa1461da2b876335707 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -356,6 +356,33 @@ void TestingAutomationProvider::LoginAsGuest(DictionaryValue* args,
controller->LoginAsGuest();
}
+void TestingAutomationProvider::LoginWithCachedCredentials(
+ DictionaryValue* args,
+ IPC::Message* reply_message) {
+ AutomationJSONReply reply(this, reply_message);
+
+ std::string username, password;
+ if (!args->GetString("username", &username) ||
+ !args->GetString("password", &password)) {
+ reply.SendError("Invalid or missing args.");
+ return;
+ }
+
+ chromeos::ExistingUserController* controller =
+ chromeos::ExistingUserController::current_controller();
+ if (!controller) {
+ reply.SendError("Unable to access ExistingUserController");
+ return;
+ }
+
+ // WebUI login.
+ chromeos::WebUILoginDisplay* webui_login_display =
+ static_cast<chromeos::WebUILoginDisplay*>(controller->login_display());
+
+ webui_login_display->Login(username, password);
craigdh 2012/09/18 18:16:35 This looks identical to SubmitLoginForm except for
beeps 2012/09/19 16:29:02 Done.
+ reply.SendSuccess(NULL);
+}
+
void TestingAutomationProvider::SubmitLoginForm(DictionaryValue* args,
IPC::Message* reply_message) {
AutomationJSONReply reply(this, reply_message);

Powered by Google App Engine
This is Rietveld 408576698