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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.h

Issue 2668833003: DialogBrowserTest implementation to invoke Content settings bubble dialogs. (Closed)
Patch Set: Merge fix from https://codereview.chromium.org/2663163004. This is temporary Created 3 years, 10 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/location_bar/content_setting_image_view.h
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
index d2b7de509ee17537b0bc4857ed66346d2077fcf7..ebb36daf382f8789d7af65f112443d2a52c2a450 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -47,7 +47,14 @@ class ContentSettingImageView : public IconLabelBubbleView,
// Updates the decoration from the shown WebContents.
void Update(content::WebContents* web_contents);
+ // For testing. Return this view's ContentSettingImageModel.
Peter Kasting 2017/02/06 21:14:25 Nit: Returns (2 places) "For testing" sounds like
+ ContentSettingImageModel* content_setting_image_model() {
+ return content_setting_image_model_.get();
+ }
+
private:
+ friend class ContentSettingBubbleDialogTest;
+
// The total animation time, including open and close as well as an
// intervening "stay open" period.
static const int kAnimationDurationMS;
@@ -80,6 +87,11 @@ class ContentSettingImageView : public IconLabelBubbleView,
// Updates the image and tooltip to match the current model state.
void UpdateImage();
+ // Return the currently active bubble dialog. Used for testing.
+ views::BubbleDialogDelegateView* bubble_view() {
+ return bubble_view_;
+ }
+
LocationBarView* parent_; // Weak, owns us.
std::unique_ptr<ContentSettingImageModel> content_setting_image_model_;
gfx::SlideAnimation slide_animator_;

Powered by Google App Engine
This is Rietveld 408576698