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

Unified Diff: chrome/browser/ui/cocoa/location_bar/selected_keyword_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/selected_keyword_decoration_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
index 91122724306c34345c04c6206b2a1c6e2ae07819..0335f58f58d7d3e7884b19e8dbda75c9884b9645 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
@@ -40,26 +40,26 @@ TEST_F(SelectedKeywordDecorationTest, UsesPartialKeywordIfNarrow) {
decoration_.SetKeyword(kKeyword, false);
// Wide width chooses the full string and image.
- const CGFloat all_width = decoration_.GetWidthForSpace(kWidth);
+ const CGFloat all_width = decoration_.GetWidthForSpace(kWidth, 0);
EXPECT_TRUE(decoration_.image_);
EXPECT_NSEQ(kFullString, decoration_.label_);
// If not enough space to include the image, uses exactly the full
// string.
- const CGFloat full_width = decoration_.GetWidthForSpace(all_width - 5.0);
+ const CGFloat full_width = decoration_.GetWidthForSpace(all_width - 5.0, 0);
EXPECT_LT(full_width, all_width);
EXPECT_FALSE(decoration_.image_);
EXPECT_NSEQ(kFullString, decoration_.label_);
// Narrow width chooses the partial string.
- const CGFloat partial_width = decoration_.GetWidthForSpace(kNarrowWidth);
+ const CGFloat partial_width = decoration_.GetWidthForSpace(kNarrowWidth, 0);
EXPECT_LT(partial_width, full_width);
EXPECT_FALSE(decoration_.image_);
EXPECT_NSEQ(kPartialString, decoration_.label_);
// Narrow doesn't choose partial string if there is not one.
decoration_.partial_string_.reset();
- decoration_.GetWidthForSpace(kNarrowWidth);
+ decoration_.GetWidthForSpace(kNarrowWidth, 0);
EXPECT_FALSE(decoration_.image_);
EXPECT_NSEQ(kFullString, decoration_.label_);
}

Powered by Google App Engine
This is Rietveld 408576698