OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/signin/sync_confirmation_handler.h" | 5 #include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h" |
6 | 6 |
7 #include "base/test/user_action_tester.h" | 7 #include "base/test/user_action_tester.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
10 #include "chrome/browser/signin/account_fetcher_service_factory.h" | 10 #include "chrome/browser/signin/account_fetcher_service_factory.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 FakeAccountFetcherService* account_fetcher_service() { | 100 FakeAccountFetcherService* account_fetcher_service() { |
101 return static_cast<FakeAccountFetcherService*>( | 101 return static_cast<FakeAccountFetcherService*>( |
102 AccountFetcherServiceFactory::GetForProfile(profile())); | 102 AccountFetcherServiceFactory::GetForProfile(profile())); |
103 } | 103 } |
104 | 104 |
105 FakeSigninManager* signin_manager() { | 105 FakeSigninManager* signin_manager() { |
106 return static_cast<FakeSigninManager*>( | 106 return static_cast<FakeSigninManager*>( |
107 SigninManagerFactory::GetForProfile(profile())); | 107 SigninManagerFactory::GetForProfile(profile())); |
108 } | 108 } |
109 | 109 |
110 ProfileSyncService* sync() { | 110 browser_sync::ProfileSyncService* sync() { |
111 return ProfileSyncServiceFactory::GetForProfile(profile()); | 111 return ProfileSyncServiceFactory::GetForProfile(profile()); |
112 } | 112 } |
113 | 113 |
114 base::UserActionTester* user_action_tester() { | 114 base::UserActionTester* user_action_tester() { |
115 return &user_action_tester_; | 115 return &user_action_tester_; |
116 } | 116 } |
117 | 117 |
118 // BrowserWithTestWindowTest | 118 // BrowserWithTestWindowTest |
119 BrowserWindow* CreateBrowserWindow() override { | 119 BrowserWindow* CreateBrowserWindow() override { |
120 return new DialogTestBrowserWindow; | 120 return new DialogTestBrowserWindow; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 EXPECT_FALSE(sync()->IsFirstSetupInProgress()); | 247 EXPECT_FALSE(sync()->IsFirstSetupInProgress()); |
248 EXPECT_TRUE(sync()->IsFirstSetupComplete()); | 248 EXPECT_TRUE(sync()->IsFirstSetupComplete()); |
249 EXPECT_TRUE( | 249 EXPECT_TRUE( |
250 SigninManagerFactory::GetForProfile(profile())->IsAuthenticated()); | 250 SigninManagerFactory::GetForProfile(profile())->IsAuthenticated()); |
251 EXPECT_EQ(0, user_action_tester()->GetActionCount("Signin_Undo_Signin")); | 251 EXPECT_EQ(0, user_action_tester()->GetActionCount("Signin_Undo_Signin")); |
252 EXPECT_EQ(1, user_action_tester()->GetActionCount( | 252 EXPECT_EQ(1, user_action_tester()->GetActionCount( |
253 "Signin_Signin_WithDefaultSyncSettings")); | 253 "Signin_Signin_WithDefaultSyncSettings")); |
254 EXPECT_EQ(0, user_action_tester()->GetActionCount( | 254 EXPECT_EQ(0, user_action_tester()->GetActionCount( |
255 "Signin_Signin_WithAdvancedSyncSettings")); | 255 "Signin_Signin_WithAdvancedSyncSettings")); |
256 } | 256 } |
OLD | NEW |