summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/chromeos/login/screen_gaia_signin.js4
-rw-r--r--chrome/browser/resources/gaia_auth/manifest_test.json4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc14
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
5 files changed, 26 insertions, 2 deletions
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index ecfa51e..4ee3d61 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -97,6 +97,10 @@ cr.define('login', function() {
params.push('hl=' + encodeURIComponent(data.hl));
if (data.email)
params.push('email=' + encodeURIComponent(data.email));
+ if (data.test_email)
+ params.push('test_email=' + encodeURIComponent(data.test_email));
+ if (data.test_password)
+ params.push('test_password=' + encodeURIComponent(data.test_password));
var url = data.startUrl;
if (params.length)
diff --git a/chrome/browser/resources/gaia_auth/manifest_test.json b/chrome/browser/resources/gaia_auth/manifest_test.json
index d370b28..4726336 100644
--- a/chrome/browser/resources/gaia_auth/manifest_test.json
+++ b/chrome/browser/resources/gaia_auth/manifest_test.json
@@ -6,8 +6,8 @@
"description": "GAIA Test Component Extension",
"content_scripts": [
{
- "matches": ["https://www.google.com/accounts/*"],
- "js": ["content.js"],
+ "matches": ["https://www.google.com/accounts/*", "https://accounts.google.com/*"],
+ "js": ["test/content.js"],
"all_frames": true
}
],
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 37b9313..eb8d9a4 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -285,6 +285,20 @@ void SigninScreenHandler::ShowSigninScreenIfReady() {
params.SetBoolean("guestSignin",
UserCrosSettingsProvider::cached_allow_guest());
email_.clear();
+ // Test automation data:
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kAuthExtensionPath)) {
+ if (command_line->HasSwitch(switches::kTestAuthEmail)) {
+ params.SetString("test_email",
+ command_line->GetSwitchValueASCII(
+ switches::kTestAuthEmail));
+ }
+ if (command_line->HasSwitch(switches::kTestAuthPassword)) {
+ params.SetString("test_password",
+ command_line->GetSwitchValueASCII(
+ switches::kTestAuthPassword));
+ }
+ }
ShowScreen(kGaiaSigninScreen, &params);
}
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 519577d..77a1942 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1122,6 +1122,10 @@ const char kCompressSystemFeedback[] = "compress-sys-feedback";
// Enables overriding the path for the default authentication extension.
const char kAuthExtensionPath[] = "auth-ext-path";
+// Enables overriding user credential for GAIA login.
+const char kTestAuthEmail[] = "test-auth-email";
+const char kTestAuthPassword[] = "test-auth-password";
+
// Enables archive file (zip) handling in file manager.
const char kEnableArchives[] = "enable-archives";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 42db10e..c484cc2 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -308,6 +308,8 @@ extern const char kStubCros[];
extern const char kScreenSaverUrl[];
extern const char kCompressSystemFeedback[];
extern const char kAuthExtensionPath[];
+extern const char kTestAuthEmail[];
+extern const char kTestAuthPassword[];
extern const char kEnableArchives[];
#ifndef NDEBUG
extern const char kOobeSkipPostLogin[];