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

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/system/tray/system_tray.h" 6 #include "ash/system/tray/system_tray.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/login_manager_test.h" 10 #include "chrome/browser/chromeos/login/login_manager_test.h"
(...skipping 20 matching lines...) Expand all
31 #include "extensions/browser/extension_system.h" 31 #include "extensions/browser/extension_system.h"
32 #include "testing/gmock/include/gmock/gmock.h" 32 #include "testing/gmock/include/gmock/gmock.h"
33 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
34 34
35 using ::testing::_; 35 using ::testing::_;
36 using ::testing::AnyNumber; 36 using ::testing::AnyNumber;
37 using ::testing::Return; 37 using ::testing::Return;
38 38
39 namespace { 39 namespace {
40 40
41 const char kGaiaId[] = "12345";
41 const char kTestUser[] = "test-user@gmail.com"; 42 const char kTestUser[] = "test-user@gmail.com";
42 const char kPassword[] = "password"; 43 const char kPassword[] = "password";
43 44
44 void FilterFrameByName(std::set<content::RenderFrameHost*>* frame_set, 45 void FilterFrameByName(std::set<content::RenderFrameHost*>* frame_set,
45 const std::string& frame_name, 46 const std::string& frame_name,
46 content::RenderFrameHost* frame) { 47 content::RenderFrameHost* frame) {
47 if (frame->GetFrameName() == frame_name) 48 if (frame->GetFrameName() == frame_name)
48 frame_set->insert(frame); 49 frame_set->insert(frame);
49 } 50 }
50 51
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 225
225 IN_PROC_BROWSER_TEST_F(LoginTest, GaiaAuthOffline) { 226 IN_PROC_BROWSER_TEST_F(LoginTest, GaiaAuthOffline) {
226 bool show_user; 227 bool show_user;
227 ASSERT_TRUE(chromeos::CrosSettings::Get()->GetBoolean( 228 ASSERT_TRUE(chromeos::CrosSettings::Get()->GetBoolean(
228 chromeos::kAccountsPrefShowUserNamesOnSignIn, &show_user)); 229 chromeos::kAccountsPrefShowUserNamesOnSignIn, &show_user));
229 ASSERT_FALSE(show_user); 230 ASSERT_FALSE(show_user);
230 231
231 StartGaiaAuthOffline(); 232 StartGaiaAuthOffline();
232 233
233 chromeos::UserContext user_context(kTestUser); 234 chromeos::UserContext user_context(kTestUser);
235 user_context.SetGaiaID(kGaiaId);
234 user_context.SetKey(chromeos::Key(kPassword)); 236 user_context.SetKey(chromeos::Key(kPassword));
235 SetExpectedCredentials(user_context); 237 SetExpectedCredentials(user_context);
236 238
237 content::WindowedNotificationObserver session_start_waiter( 239 content::WindowedNotificationObserver session_start_waiter(
238 chrome::NOTIFICATION_SESSION_STARTED, 240 chrome::NOTIFICATION_SESSION_STARTED,
239 content::NotificationService::AllSources()); 241 content::NotificationService::AllSources());
240 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); 242 SubmitGaiaAuthOfflineForm(kTestUser, kPassword);
241 session_start_waiter.Wait(); 243 session_start_waiter.Wait();
242 244
243 TestSystemTrayIsVisible(); 245 TestSystemTrayIsVisible();
244 } 246 }
245 247
246 } // namespace 248 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698