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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm

Issue 140353002: [rAC, OSX] Fix focus ring drawing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix broken test. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h" 5 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::scoped_nsobject<NSImage> image( 53 base::scoped_nsobject<NSImage> image(
54 [[NSImage alloc] initWithSize:rect.size]); 54 [[NSImage alloc] initWithSize:rect.size]);
55 [cell setImage:image forButtonState:image_button_cell::kDefaultState]; 55 [cell setImage:image forButtonState:image_button_cell::kDefaultState];
56 [view_ setTitle:@"Testing"]; 56 [view_ setTitle:@"Testing"];
57 57
58 EXPECT_EQ(NSWidth(rect), [cell imageSize].width); 58 EXPECT_EQ(NSWidth(rect), [cell imageSize].width);
59 EXPECT_EQ(NSHeight(rect), [cell imageSize].height); 59 EXPECT_EQ(NSHeight(rect), [cell imageSize].height);
60 60
61 NSAttributedString* title = [cell attributedTitle]; 61 NSAttributedString* title = [cell attributedTitle];
62 NSSize titleSize = [title size]; 62 NSSize titleSize = [title size];
63 EXPECT_EQ(titleSize.width + [image size].width + autofill::kButtonGap, 63 EXPECT_LE(titleSize.width + [image size].width + autofill::kButtonGap,
64 [cell cellSize].width); 64 [cell cellSize].width);
65 EXPECT_EQ(std::max(titleSize.height, [image size].height), 65 EXPECT_LE(std::max(titleSize.height, [image size].height),
66 [cell cellSize].height); 66 [cell cellSize].height);
67 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.mm ('k') | chrome/browser/ui/cocoa/image_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698