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

Unified Diff: chrome/browser/ui/extensions/extension_message_bubble_browsertest.h

Issue 2105393002: [Extensions UI] Handle multiple warning bubbles racing to show (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/extensions/extension_message_bubble_browsertest.h
diff --git a/chrome/browser/ui/extensions/extension_message_bubble_browsertest.h b/chrome/browser/ui/extensions/extension_message_bubble_browsertest.h
index 3a2b87626fd2977e772ca7ac34dae998eef77e0e..2822a6ba21d10a3cf3a7247165bd2075841b2a2d 100644
--- a/chrome/browser/ui/extensions/extension_message_bubble_browsertest.h
+++ b/chrome/browser/ui/extensions/extension_message_bubble_browsertest.h
@@ -30,14 +30,32 @@ class ExtensionMessageBubbleBrowserTest
void TearDownOnMainThread() override;
// Checks the position of the bubble present in the given |browser|, when the
- // bubble should be anchored at the given |anchor|.
- virtual void CheckBubble(Browser* browser, AnchorPosition anchor) = 0;
+ // bubble should be anchored at the given |anchor| and that the toolbar model
+ // is correctly highlighting.
+ void CheckBubble(Browser* browser,
+ AnchorPosition anchor,
+ bool should_be_highlighting);
+ // Performs the platform-specific checks.
+ virtual void CheckBubbleNative(Browser* browser, AnchorPosition anchor) = 0;
// Closes the bubble present in the given |browser|.
- virtual void CloseBubble(Browser* browser) = 0;
+ void CloseBubble(Browser* browser);
+ // Performs the platform-specific close.
+ virtual void CloseBubbleNative(Browser* browser) = 0;
// Checks that there is no active bubble for the given |browser|.
- virtual void CheckBubbleIsNotPresent(Browser* browser) = 0;
+ // We specify whether or not the toolbar model should be highlighting or there
+ // is a bubble active since another browser window may have an active bubble.
+ void CheckBubbleIsNotPresent(Browser* browser,
+ bool should_profile_have_bubble,
+ bool should_be_highlighting);
+ // Performs the platform-specific checks.
+ virtual void CheckBubbleIsNotPresentNative(Browser* browser) = 0;
+
+ // Clicks on the corresponding button in the bubble.
+ virtual void ClickLearnMoreButton(Browser* browser) = 0;
+ virtual void ClickActionButton(Browser* browser) = 0;
+ virtual void ClickDismissButton(Browser* browser) = 0;
// Adds a new extension that uses the chrome_settings_overrides api to
// override a setting specified in |settings_override_value|.
@@ -88,6 +106,17 @@ class ExtensionMessageBubbleBrowserTest
// search engine is shown.
void TestControlledSearchBubbleShown();
+ // Tests that having multiple windows, all of which could be vying to show a
+ // warning bubble, behaves properly.
+ void TestBubbleWithMultipleWindows();
+
+ // Tests clicking on the corresponding button in the bubble view. The logic
+ // for these is tested more thoroughly in the unit tests, but this ensures
+ // that nothing goes wrong end-to-end.
+ void TestClickingLearnMoreButton();
+ void TestClickingActionButton();
+ void TestClickingDismissButton();
+
private:
std::unique_ptr<extensions::FeatureSwitch::ScopedOverride>
dev_mode_bubble_override_;

Powered by Google App Engine
This is Rietveld 408576698