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

Unified Diff: chrome/browser/ui/views/avatar_menu_bubble_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/avatar_menu_bubble_view.h
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.h b/chrome/browser/ui/views/avatar_menu_bubble_view.h
index 29597b1e890716dc813f3ca8b58199c7e3b8a8b4..c49ae45e2d434b34e345ebb777503834c200f19b 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.h
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.h
@@ -79,6 +79,13 @@ class AvatarMenuBubbleView : public views::BubbleDelegateView,
virtual void OnAvatarMenuModelChanged(
AvatarMenuModel* avatar_menu_model) OVERRIDE;
+ // 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) {
+ close_on_deactivate_ = close;
+ }
+
private:
AvatarMenuBubbleView(views::View* anchor_view,
views::BubbleBorder::Arrow arrow,
@@ -118,6 +125,7 @@ class AvatarMenuBubbleView : public views::BubbleDelegateView,
views::Link* switch_profile_link_;
static AvatarMenuBubbleView* avatar_bubble_;
+ static bool close_on_deactivate_;
// Is set to true if the managed user has clicked on Switch Users.
bool expanded_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | chrome/browser/ui/views/profile_chooser_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698