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

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

Issue 10533038: Switch back to the old method of launching the login flow while keeping some of the benefits of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nirnimesh's comments and fixed chromeos_login.py to work with these changes. Created 8 years, 6 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 | « chrome/browser/automation/testing_automation_provider.cc ('k') | 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 e67bf51e7dc113ee9fee888337788d9387e00678..7fc2dfdd6210997f399d4780fb1a8200c12fa5db 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -278,6 +278,35 @@ void TestingAutomationProvider::LoginAsGuest(DictionaryValue* args,
controller->LoginAsGuest();
}
+void TestingAutomationProvider::SubmitLoginForm(DictionaryValue* args,
+ IPC::Message* reply_message) {
+ AutomationJSONReply reply(this, reply_message);
+ VLOG(2) << "TestingAutomationProvider::StartLogin";
+
+ 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());
+ VLOG(2) << "TestingAutomationProvider::StartLogin ShowSigninScreenForCreds("
+ << username << ", " << password << ")";
+
+ webui_login_display->ShowSigninScreenForCreds(username, password);
+ reply.SendSuccess(NULL);
+}
+
void TestingAutomationProvider::AddLoginEventObserver(
DictionaryValue* args, IPC::Message* reply_message) {
chromeos::ExistingUserController* controller =
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698