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" |
11 #include "chrome/browser/signin/account_tracker_service_factory.h" | 11 #include "chrome/browser/signin/account_tracker_service_factory.h" |
12 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h" | 12 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h" |
13 #include "chrome/browser/signin/fake_signin_manager_builder.h" | 13 #include "chrome/browser/signin/fake_signin_manager_builder.h" |
14 #include "chrome/browser/signin/signin_manager_factory.h" | 14 #include "chrome/browser/signin/signin_manager_factory.h" |
15 #include "chrome/browser/sync/profile_sync_service_factory.h" | 15 #include "chrome/browser/sync/profile_sync_service_factory.h" |
16 #include "chrome/browser/ui/browser_commands.h" | 16 #include "chrome/browser/ui/browser_commands.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" | 18 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" |
19 #include "chrome/test/base/browser_with_test_window_test.h" | 19 #include "chrome/test/base/browser_with_test_window_test.h" |
20 #include "chrome/test/base/dialog_test_browser_window.h" | 20 #include "chrome/test/base/dialog_test_browser_window.h" |
21 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
22 #include "components/browser_sync/browser/profile_sync_service.h" | 22 #include "components/browser_sync/profile_sync_service.h" |
23 #include "components/signin/core/browser/account_fetcher_service.h" | 23 #include "components/signin/core/browser/account_fetcher_service.h" |
24 #include "components/signin/core/browser/fake_account_fetcher_service.h" | 24 #include "components/signin/core/browser/fake_account_fetcher_service.h" |
25 #include "components/signin/core/browser/fake_signin_manager.h" | 25 #include "components/signin/core/browser/fake_signin_manager.h" |
26 #include "content/public/test/test_browser_thread_bundle.h" | 26 #include "content/public/test/test_browser_thread_bundle.h" |
27 #include "content/public/test/test_web_ui.h" | 27 #include "content/public/test/test_web_ui.h" |
28 | 28 |
29 const int kExpectedProfileImageSize = 128; | 29 const int kExpectedProfileImageSize = 128; |
30 | 30 |
31 // The dialog needs to be initialized with a height but the actual value doesn't | 31 // The dialog needs to be initialized with a height but the actual value doesn't |
32 // really matter in unit tests. | 32 // really matter in unit tests. |
(...skipping 214 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 |