| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, | 199 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, |
| 200 NoProfileChooserOnOutsideUserDataDirProfiles) { | 200 NoProfileChooserOnOutsideUserDataDirProfiles) { |
| 201 // Test that the profile chooser view does not show when avatar menu is not | 201 // Test that the profile chooser view does not show when avatar menu is not |
| 202 // available. This can be repro'ed with a profile path outside user_data_dir. | 202 // available. This can be repro'ed with a profile path outside user_data_dir. |
| 203 // crbug.com/527505 | 203 // crbug.com/527505 |
| 204 Profile* new_profile = CreateProfileOutsideUserDataDir(); | 204 Profile* new_profile = CreateProfileOutsideUserDataDir(); |
| 205 Browser* browser = CreateBrowser(new_profile); | 205 Browser* browser = CreateBrowser(new_profile); |
| 206 browser->window()->ShowAvatarBubbleFromAvatarButton( | 206 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 207 BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, | 207 BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN, |
| 208 signin::ManageAccountsParams()); | 208 signin::ManageAccountsParams(), |
| 209 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); |
| 209 ASSERT_FALSE(ProfileChooserView::IsShowing()); | 210 ASSERT_FALSE(ProfileChooserView::IsShowing()); |
| 210 CloseBrowserSynchronously(browser); | 211 CloseBrowserSynchronously(browser); |
| 211 } | 212 } |
| 212 | 213 |
| 213 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, SigninButtonHasFocus) { | 214 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, SigninButtonHasFocus) { |
| 214 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); | 215 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); |
| 215 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser())); | 216 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser())); |
| 216 | 217 |
| 217 EXPECT_TRUE(signin_current_profile_link()->HasFocus()); | 218 EXPECT_TRUE(signin_current_profile_link()->HasFocus()); |
| 218 } | 219 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 EXPECT_EQ(1U, BrowserList::GetInstance(chrome::GetActiveDesktop())->size()); | 315 EXPECT_EQ(1U, BrowserList::GetInstance(chrome::GetActiveDesktop())->size()); |
| 315 | 316 |
| 316 WaitForUserManager(); | 317 WaitForUserManager(); |
| 317 // Assert that the first profile's extensions are not blocked. | 318 // Assert that the first profile's extensions are not blocked. |
| 318 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); | 319 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); |
| 319 ASSERT_EQ(0U, registry->blocked_extensions().size()); | 320 ASSERT_EQ(0U, registry->blocked_extensions().size()); |
| 320 | 321 |
| 321 // We need to hide the User Manager or else the process can't die. | 322 // We need to hide the User Manager or else the process can't die. |
| 322 UserManager::Hide(); | 323 UserManager::Hide(); |
| 323 } | 324 } |
| OLD | NEW |