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

Unified Diff: chrome/browser/ui/views/profile_chooser_view.h

Issue 19537006: Disable close-on-deactivate during tests so suprious UI events don't cause flakes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed method to set_close_on_deactivate Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/profile_chooser_view.h
diff --git a/chrome/browser/ui/views/profile_chooser_view.h b/chrome/browser/ui/views/profile_chooser_view.h
index 54dcb43af4782878df1979d8dd2bfdb43385b3f9..eb3373915e2233bf73b925ef6c4b7176aa271297 100644
--- a/chrome/browser/ui/views/profile_chooser_view.h
+++ b/chrome/browser/ui/views/profile_chooser_view.h
@@ -43,6 +43,13 @@ class ProfileChooserView : public views::BubbleDelegateView,
static bool IsShowing();
static void Hide();
+ // We normally close the bubble any time it becomes inactive but this can lead
+ // to flaky tests where unexpected UI events are triggering this behavior.
+ // Tests should call this with "false" for more consistent operation.
+ static void set_close_on_deactiavte(bool close) {
noms 2013/07/25 19:22:42 Blurg. Typo! :(
+ close_on_deactivate_ = close;
+ }
+
private:
friend class AvatarMenuButtonTest;
FRIEND_TEST_ALL_PREFIXES(AvatarMenuButtonTest, NewSignOut);
@@ -72,6 +79,7 @@ class ProfileChooserView : public views::BubbleDelegateView,
AvatarMenuModel* avatar_menu_model) OVERRIDE;
static ProfileChooserView* profile_bubble_;
+ static bool close_on_deactivate_;
views::View* CreateProfileImageView(const gfx::Image& icon, int side);
views::View* CreateProfileCardView(size_t avatar_to_show);
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button_browsertest.cc ('k') | chrome/browser/ui/views/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698