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

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

Issue 2471583002: [Mac] Change the omnibox decoration padding (Closed)
Patch Set: Fixed tests Created 4 years, 1 month 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/image_decoration_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
index 2362f79007195a6c115296f4e2974ba59b45a5f3..fb6c537b2a02c49dfa6f08980092de9c8fed1a6c 100644
--- a/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
@@ -33,6 +33,7 @@ TEST_F(ImageDecorationTest, SetGetImage) {
TEST_F(ImageDecorationTest, GetWidthForSpace) {
const CGFloat kWide = 100.0;
const CGFloat kNarrow = 10.0;
+ const CGFloat kImageHorizontalPadding = 9.0;
// Decoration with no image is omitted.
EXPECT_EQ(decoration_.GetWidthForSpace(kWide),
@@ -42,9 +43,10 @@ TEST_F(ImageDecorationTest, GetWidthForSpace) {
base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithSize:kImageSize]);
- // Decoration takes up the space of the image.
+ // Decoration takes up the space of the image and the horizontal padding.
decoration_.SetImage(image);
- EXPECT_EQ(decoration_.GetWidthForSpace(kWide), kImageSize.width);
+ EXPECT_EQ(decoration_.GetWidthForSpace(kWide),
+ kImageSize.width + kImageHorizontalPadding);
// If the image doesn't fit, decoration is omitted.
EXPECT_EQ(decoration_.GetWidthForSpace(kNarrow),

Powered by Google App Engine
This is Rietveld 408576698