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

Unified Diff: chrome/browser/ui/views/sync/one_click_signin_bubble_view.h

Issue 22743002: Convert OneClickSigninBubbleViewTest to browser_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tabs Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698