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

Side by Side Diff: chrome/browser/ui/views/new_avatar_menu_button_browsertest.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/profiles/profiles_state.h" 10 #include "chrome/browser/profiles/profiles_state.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void NewAvatarMenuButtonTest::StartAvatarMenu() { 76 void NewAvatarMenuButtonTest::StartAvatarMenu() {
77 BrowserView* browser_view = reinterpret_cast<BrowserView*>( 77 BrowserView* browser_view = reinterpret_cast<BrowserView*>(
78 browser()->window()); 78 browser()->window());
79 79
80 // Ensure that the avatar icon button is not also showing. 80 // Ensure that the avatar icon button is not also showing.
81 NewAvatarButton* button = browser_view->frame()->GetNewAvatarMenuButton(); 81 NewAvatarButton* button = browser_view->frame()->GetNewAvatarMenuButton();
82 ASSERT_TRUE(button); 82 ASSERT_TRUE(button);
83 ASSERT_FALSE(browser_view->frame()->GetAvatarMenuButton()); 83 ASSERT_FALSE(browser_view->frame()->GetAvatarMenuButton());
84 84
85 ProfileChooserView::clear_close_on_deactivate_for_testing(); 85 ProfileChooserView::clear_close_on_deactivate_for_testing();
86 ui::MouseEvent mouse_ev(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0); 86 ui::MouseEvent mouse_ev(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(), 0,
87 0);
87 button->NotifyClick(mouse_ev); 88 button->NotifyClick(mouse_ev);
88 base::MessageLoop::current()->RunUntilIdle(); 89 base::MessageLoop::current()->RunUntilIdle();
89 EXPECT_TRUE(ProfileChooserView::IsShowing()); 90 EXPECT_TRUE(ProfileChooserView::IsShowing());
90 } 91 }
91 92
92 IN_PROC_BROWSER_TEST_F(NewAvatarMenuButtonTest, SignOut) { 93 IN_PROC_BROWSER_TEST_F(NewAvatarMenuButtonTest, SignOut) {
93 // If multiprofile mode is not enabled, you can't switch between profiles. 94 // If multiprofile mode is not enabled, you can't switch between profiles.
94 if (!profiles::IsMultipleProfilesEnabled()) 95 if (!profiles::IsMultipleProfilesEnabled())
95 return; 96 return;
96 97
(...skipping 23 matching lines...) Expand all
120 window_close_observer.Wait(); // Rely on test timeout for failure indication. 121 window_close_observer.Wait(); // Rely on test timeout for failure indication.
121 EXPECT_TRUE(browser_list->empty()); 122 EXPECT_TRUE(browser_list->empty());
122 123
123 // If the User Manager hasn't shown yet, wait for it to show up. 124 // If the User Manager hasn't shown yet, wait for it to show up.
124 if (!UserManagerView::IsShowing()) 125 if (!UserManagerView::IsShowing())
125 base::MessageLoop::current()->RunUntilIdle(); 126 base::MessageLoop::current()->RunUntilIdle();
126 127
127 // We need to hide the User Manager or else the process can't die. 128 // We need to hide the User Manager or else the process can't die.
128 chrome::HideUserManager(); 129 chrome::HideUserManager();
129 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698