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

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

Issue 12042002: Alternate NTP: Add search token to omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 7 years, 11 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/keyword_hint_decoration_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration_unittest.mm
index 12ac5d85fdcda7c6adfc45af3749c20955c30fbc..79fe3a3040aea4b8f1563b06e703b53e6d08d35a 100644
--- a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration_unittest.mm
@@ -30,28 +30,28 @@ TEST_F(KeywordHintDecorationTest, GetWidthForSpace) {
const CGFloat kEditingSpace = 50.0;
// Wider than the [tab] image when we have lots of space.
- EXPECT_NE(decoration_.GetWidthForSpace(kVeryWide),
+ EXPECT_NE(decoration_.GetWidthForSpace(kVeryWide, 0),
LocationBarDecoration::kOmittedWidth);
- EXPECT_GE(decoration_.GetWidthForSpace(kVeryWide), kFairlyWide);
+ EXPECT_GE(decoration_.GetWidthForSpace(kVeryWide, 0), kFairlyWide);
// When there's not enough space for the text, trims to something
// narrower.
- const CGFloat full_width = decoration_.GetWidthForSpace(kVeryWide);
+ const CGFloat full_width = decoration_.GetWidthForSpace(kVeryWide, 0);
const CGFloat not_wide_enough = full_width - 10.0;
- EXPECT_NE(decoration_.GetWidthForSpace(not_wide_enough),
+ EXPECT_NE(decoration_.GetWidthForSpace(not_wide_enough, 0),
LocationBarDecoration::kOmittedWidth);
- EXPECT_LT(decoration_.GetWidthForSpace(not_wide_enough), full_width);
+ EXPECT_LT(decoration_.GetWidthForSpace(not_wide_enough, 0), full_width);
// Even trims when there's enough space for everything, but it would
// eat "too much".
- EXPECT_NE(decoration_.GetWidthForSpace(full_width + kEditingSpace),
+ EXPECT_NE(decoration_.GetWidthForSpace(full_width + kEditingSpace, 0),
LocationBarDecoration::kOmittedWidth);
- EXPECT_LT(decoration_.GetWidthForSpace(full_width + kEditingSpace),
+ EXPECT_LT(decoration_.GetWidthForSpace(full_width + kEditingSpace, 0),
full_width);
// Omitted when not wide enough to fit even the image.
- const CGFloat image_width = decoration_.GetWidthForSpace(not_wide_enough);
- EXPECT_EQ(decoration_.GetWidthForSpace(image_width - 1.0),
+ const CGFloat image_width = decoration_.GetWidthForSpace(not_wide_enough, 0);
+ EXPECT_EQ(decoration_.GetWidthForSpace(image_width - 1.0, 0),
LocationBarDecoration::kOmittedWidth);
}

Powered by Google App Engine
This is Rietveld 408576698