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

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

Issue 1543393002: Switch to standard integer types in chrome/browser/ui/cocoa/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 "base/macros.h"
10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 11 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 13 #include "testing/platform_test.h"
13 #import "ui/gfx/test/ui_cocoa_test_helper.h" 14 #import "ui/gfx/test/ui_cocoa_test_helper.h"
14 15
15 namespace { 16 namespace {
16 17
17 class DownArrowPopupMenuCellTest : public ui::CocoaTest { 18 class DownArrowPopupMenuCellTest : public ui::CocoaTest {
18 public: 19 public:
19 DownArrowPopupMenuCellTest() { 20 DownArrowPopupMenuCellTest() {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 EXPECT_EQ(NSWidth(rect), [cell imageSize].width); 59 EXPECT_EQ(NSWidth(rect), [cell imageSize].width);
59 EXPECT_EQ(NSHeight(rect), [cell imageSize].height); 60 EXPECT_EQ(NSHeight(rect), [cell imageSize].height);
60 61
61 NSAttributedString* title = [cell attributedTitle]; 62 NSAttributedString* title = [cell attributedTitle];
62 NSSize titleSize = [title size]; 63 NSSize titleSize = [title size];
63 EXPECT_LE(titleSize.width + [image size].width + autofill::kButtonGap, 64 EXPECT_LE(titleSize.width + [image size].width + autofill::kButtonGap,
64 [cell cellSize].width); 65 [cell cellSize].width);
65 EXPECT_LE(std::max(titleSize.height, [image size].height), 66 EXPECT_LE(std::max(titleSize.height, [image size].height),
66 [cell cellSize].height); 67 [cell cellSize].height);
67 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698