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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2668833003: DialogBrowserTest implementation to invoke Content settings bubble dialogs. (Closed)
Patch Set: More nits addressed 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index c05e17d1005671e6b577b98b74c0150bd115546e..8915e6158935223e3accffdadf32e685146d5e0f 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1081,6 +1081,18 @@ bool LocationBarView::GetBookmarkStarVisibility() {
return star_view_->visible();
}
+bool LocationBarView::TestContentSettingImagePressed(size_t index) {
+ if (index >= content_setting_views_.size())
+ return false;
+
+ // This up-cast is necessary since the descendant class moved OnKeyPressed
+ // to the protected section.
+ views::View* image_view = content_setting_views_[index];
+ image_view->OnKeyReleased(
+ ui::KeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_SPACE, ui::EF_NONE));
+ return true;
+}
+
////////////////////////////////////////////////////////////////////////////////
// LocationBarView, private views::View implementation:
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698