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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc

Issue 2023093002: Reflow of the profile items in desktop user menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-profile-icon
Patch Set: Test fix Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 176
177 content::WindowedNotificationObserver* window_close_observer() { 177 content::WindowedNotificationObserver* window_close_observer() {
178 return window_close_observer_.get(); 178 return window_close_observer_.get();
179 } 179 }
180 180
181 ProfileChooserView* current_profile_bubble() { 181 ProfileChooserView* current_profile_bubble() {
182 return ProfileChooserView::profile_bubble_; 182 return ProfileChooserView::profile_bubble_;
183 } 183 }
184 184
185 views::View* signin_current_profile_link() { 185 views::View* signin_current_profile_button() {
186 return ProfileChooserView::profile_bubble_->signin_current_profile_link_; 186 return ProfileChooserView::profile_bubble_->signin_current_profile_button_;
187 } 187 }
188 188
189 void ShowSigninView() { 189 void ShowSigninView() {
190 DCHECK(!switches::UsePasswordSeparatedSigninFlow()); 190 DCHECK(!switches::UsePasswordSeparatedSigninFlow());
191 DCHECK(current_profile_bubble()); 191 DCHECK(current_profile_bubble());
192 DCHECK(current_profile_bubble()->avatar_menu_); 192 DCHECK(current_profile_bubble()->avatar_menu_);
193 current_profile_bubble()->ShowView( 193 current_profile_bubble()->ShowView(
194 profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN, 194 profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN,
195 current_profile_bubble()->avatar_menu_.get()); 195 current_profile_bubble()->avatar_menu_.get());
196 base::RunLoop().RunUntilIdle(); 196 base::RunLoop().RunUntilIdle();
(...skipping 17 matching lines...) Expand all
214 signin::ManageAccountsParams(), 214 signin::ManageAccountsParams(),
215 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); 215 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN);
216 ASSERT_FALSE(ProfileChooserView::IsShowing()); 216 ASSERT_FALSE(ProfileChooserView::IsShowing());
217 CloseBrowserSynchronously(browser); 217 CloseBrowserSynchronously(browser);
218 } 218 }
219 219
220 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, SigninButtonHasFocus) { 220 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, SigninButtonHasFocus) {
221 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); 221 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled());
222 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser())); 222 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser()));
223 223
224 EXPECT_TRUE(signin_current_profile_link()->HasFocus()); 224 EXPECT_TRUE(signin_current_profile_button()->HasFocus());
225 } 225 }
226 226
227 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, ContentAreaHasFocus) { 227 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, ContentAreaHasFocus) {
228 // The ProfileChooserView doesn't handle sign in under the new password 228 // The ProfileChooserView doesn't handle sign in under the new password
229 // separated signin flow. 229 // separated signin flow.
230 if (switches::UsePasswordSeparatedSigninFlow()) 230 if (switches::UsePasswordSeparatedSigninFlow())
231 return; 231 return;
232 232
233 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); 233 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled());
234 234
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // Wait until the user manager is shown. 339 // Wait until the user manager is shown.
340 runner->Run(); 340 runner->Run();
341 341
342 // Assert that the first profile's extensions are not blocked. 342 // Assert that the first profile's extensions are not blocked.
343 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); 343 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size());
344 ASSERT_EQ(0U, registry->blocked_extensions().size()); 344 ASSERT_EQ(0U, registry->blocked_extensions().size());
345 345
346 // We need to hide the User Manager or else the process can't die. 346 // We need to hide the User Manager or else the process can't die.
347 UserManager::Hide(); 347 UserManager::Hide();
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698