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

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: Fix order of init 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 #endif 231 #endif
231 IN_PROC_BROWSER_TEST_F(LoginTest, MAYBE_GaiaAuthOffline) { 232 IN_PROC_BROWSER_TEST_F(LoginTest, MAYBE_GaiaAuthOffline) {
232 bool show_user; 233 bool show_user;
233 ASSERT_TRUE(chromeos::CrosSettings::Get()->GetBoolean( 234 ASSERT_TRUE(chromeos::CrosSettings::Get()->GetBoolean(
234 chromeos::kAccountsPrefShowUserNamesOnSignIn, &show_user)); 235 chromeos::kAccountsPrefShowUserNamesOnSignIn, &show_user));
235 ASSERT_FALSE(show_user); 236 ASSERT_FALSE(show_user);
236 237
237 StartGaiaAuthOffline(); 238 StartGaiaAuthOffline();
238 239
239 chromeos::UserContext user_context(kTestUser); 240 chromeos::UserContext user_context(kTestUser);
241 user_context.SetGaiaID(kGaiaId);
240 user_context.SetKey(chromeos::Key(kPassword)); 242 user_context.SetKey(chromeos::Key(kPassword));
241 SetExpectedCredentials(user_context); 243 SetExpectedCredentials(user_context);
242 244
243 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); 245 SubmitGaiaAuthOfflineForm(kTestUser, kPassword);
244 246
245 content::WindowedNotificationObserver( 247 content::WindowedNotificationObserver(
246 chrome::NOTIFICATION_SESSION_STARTED, 248 chrome::NOTIFICATION_SESSION_STARTED,
247 content::NotificationService::AllSources()).Wait(); 249 content::NotificationService::AllSources()).Wait();
248 250
249 TestSystemTrayIsVisible(); 251 TestSystemTrayIsVisible();
250 } 252 }
251 253
252 } // namespace 254 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698