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

Unified Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm

Issue 2973006: Use the extension icon for extension omnibox results instead of the generic (Closed)
Patch Set: fixed mac Created 10 years, 5 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/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
diff --git a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
index da01dbbd2526278371e7ca82220d68d639000ddc..c76eb973fe8f3c286c7db7be8622c077362c6551 100644
--- a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
+++ b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
@@ -223,6 +223,7 @@ TEST_F(AutocompleteTextFieldCellTest, TextFrame) {
EXPECT_LT(NSMaxX(textFrame), searchHintMaxX);
EXPECT_TRUE(NSContainsRect(cursorFrame, textFrame));
+
// Text frame should take everything over again on reset.
[cell clearHint];
textFrame = [cell textFrameForFrame:bounds];
@@ -281,6 +282,7 @@ TEST_F(AutocompleteTextFieldCellTest, DrawingRectForBounds) {
EXPECT_TRUE(NSContainsRect(NSInsetRect(textFrame, 1, 1), drawingRect));
[cell clearHint];
+
textFrame = [cell textFrameForFrame:bounds];
drawingRect = [cell drawingRectForBounds:bounds];
EXPECT_FALSE(NSIsEmptyRect(drawingRect));
@@ -407,6 +409,8 @@ TEST_F(AutocompleteTextFieldCellTest, PageActionImageFrame) {
EXPECT_LE(NSMaxX(labelRect), NSMinX(iconRect0));
}
+ NSImage* image = [NSImage imageNamed:@"NSApplicationIcon"];
+
// Test that the cell drops the search hint if there is no room for
// it.
TEST_F(AutocompleteTextFieldCellTest, OmitsSearchHintIfNarrow) {

Powered by Google App Engine
This is Rietveld 408576698