Index: chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
diff --git a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
index 78b58f8fd98c5b5b2cca7cd9b7ba7e5ede9f0917..c0ab47a972adf15c519f740cfd39fb2d75c5041e 100644 |
--- a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
+++ b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
@@ -53,6 +53,14 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
// method is meant to be called only from tests. |
static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } |
+ // 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. |
+ // (crbug.com/266972) |
+ static void set_close_on_deactivate_for_testing(bool close) { |
+ close_on_deactivate_for_testing_ = close; |
+ } |
+ |
protected: |
// Creates a OneClickSigninBubbleView. |
OneClickSigninBubbleView( |
@@ -148,6 +156,8 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
// The bubble, if we're showing one. |
static OneClickSigninBubbleView* bubble_view_; |
+ static bool close_on_deactivate_for_testing_; |
+ |
DISALLOW_COPY_AND_ASSIGN(OneClickSigninBubbleView); |
}; |