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

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

Issue 1951033003: [Mac][Material Design] Fix SelectedKeywordDecoration tests for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add documentation. Created 4 years, 7 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/selected_keyword_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
index 1a797fed4cfa758a111a96d6ec20f558ea27e49e..97522b5843d31bfd9fe36aec8d997e514be2857a 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
@@ -21,6 +21,14 @@ SelectedKeywordDecoration::SelectedKeywordDecoration() {
SetTextColor([NSColor blackColor]);
return;
}
+ // Note: the unit test
+ // SelectedKeywordDecorationTest.UsesPartialKeywordIfNarrow expects to work
+ // with a fully-initialized SelectedKeywordDecoration (i.e. one that has a
+ // text color and image). During ordinary operation,
+ // LocationBarViewMac::Layout() sets the image before the decoration is
+ // actually used, which the unit test does as well. If
+ // SelectedKeywordDecoration's initialization process changes, the unit test
+ // should also be updated.
SetTextColor(GetBackgroundBorderColor());
}

Powered by Google App Engine
This is Rietveld 408576698