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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

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
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index b651ddc9385d8e47f4f5d619e558d8c028149f5b..a47001066e037bcbe10eb300892e07218bba574e 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -332,6 +332,19 @@ bool LocationBarViewMac::GetBookmarkStarVisibility() {
return star_decoration_->IsVisible();
}
+bool LocationBarViewMac::TestContentSettingImagePressed(size_t index) {
+ if (index >= content_setting_decorations_.size())
+ return false;
+
+ // TODO(tapted): Use OnAccessibilityViewAction() here. Currently it's broken.
+ ContentSettingDecoration* decoration =
+ content_setting_decorations_[index].get();
+ AutocompleteTextFieldCell* cell = [field_ cell];
+ NSRect frame = [cell frameForDecoration:decoration inFrame:[field_ bounds]];
+ decoration->OnMousePressed(frame, NSZeroPoint);
+ return true;
+}
+
void LocationBarViewMac::SetEditable(bool editable) {
[field_ setEditable:editable ? YES : NO];
UpdateBookmarkStarVisibility();

Powered by Google App Engine
This is Rietveld 408576698