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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 13542003: Add browser test for new user CrOS login flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_SIGNIN)); 1103 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_SIGNIN));
1104 localized_strings->SetString("stringEmptyEmail", 1104 localized_strings->SetString("stringEmptyEmail",
1105 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_EMPTY_EMAIL)); 1105 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_EMPTY_EMAIL));
1106 localized_strings->SetString("stringEmptyPassword", 1106 localized_strings->SetString("stringEmptyPassword",
1107 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_EMPTY_PASSWORD)); 1107 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_EMPTY_PASSWORD));
1108 localized_strings->SetString("stringError", 1108 localized_strings->SetString("stringError",
1109 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_ERROR)); 1109 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_ERROR));
1110 params.Set("localizedStrings", localized_strings); 1110 params.Set("localizedStrings", localized_strings);
1111 } 1111 }
1112 1112
1113 params.SetString("gaiaOrigin", GaiaUrls::GetInstance()->gaia_origin_url()); 1113 std::string gaia_origin = GaiaUrls::GetInstance()->gaia_origin_url();
1114 if (!gaia_origin_for_test_.empty())
1115 gaia_origin = gaia_origin_for_test_;
1116 params.SetString("gaiaOrigin", gaia_origin);
1114 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 1117 const CommandLine* command_line = CommandLine::ForCurrentProcess();
1115 if (command_line->HasSwitch(::switches::kGaiaUrlPath)) { 1118 if (command_line->HasSwitch(::switches::kGaiaUrlPath)) {
1116 params.SetString("gaiaUrlPath", 1119 params.SetString("gaiaUrlPath",
1117 command_line->GetSwitchValueASCII(::switches::kGaiaUrlPath)); 1120 command_line->GetSwitchValueASCII(::switches::kGaiaUrlPath));
1118 } 1121 }
1119 1122
1120 // Test automation data: 1123 // Test automation data:
1121 if (command_line->HasSwitch(::switches::kAuthExtensionPath)) { 1124 if (command_line->HasSwitch(::switches::kAuthExtensionPath)) {
1122 if (!test_user_.empty()) { 1125 if (!test_user_.empty()) {
1123 params.SetString("test_email", test_user_); 1126 params.SetString("test_email", test_user_);
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 if (!cros_settings) 1751 if (!cros_settings)
1749 return false; 1752 return false;
1750 1753
1751 // Offline login is allowed only when user pods are hidden. 1754 // Offline login is allowed only when user pods are hidden.
1752 bool show_pods; 1755 bool show_pods;
1753 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); 1756 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods);
1754 return !show_pods; 1757 return !show_pods;
1755 } 1758 }
1756 1759
1757 } // namespace chromeos 1760 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698