OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/macros.h" |
8 #import "chrome/browser/ui/cocoa/browser_window_layout.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 #import "testing/gtest_mac.h" | 11 #import "testing/gtest_mac.h" |
11 | 12 |
12 class BrowserWindowLayoutTest : public testing::Test { | 13 class BrowserWindowLayoutTest : public testing::Test { |
13 public: | 14 public: |
14 BrowserWindowLayoutTest() {} | 15 BrowserWindowLayoutTest() {} |
15 void SetUp() override { | 16 void SetUp() override { |
16 layout.reset([[BrowserWindowLayout alloc] init]); | 17 layout.reset([[BrowserWindowLayout alloc] init]); |
17 | 18 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 206 } |
206 | 207 |
207 // Tests that the avatar button is not aligned on the half pixel. | 208 // Tests that the avatar button is not aligned on the half pixel. |
208 TEST_F(BrowserWindowLayoutTest, TestAvatarButtonPixelAlignment) { | 209 TEST_F(BrowserWindowLayoutTest, TestAvatarButtonPixelAlignment) { |
209 [layout setAvatarSize:NSMakeSize(28, 28)]; | 210 [layout setAvatarSize:NSMakeSize(28, 28)]; |
210 | 211 |
211 chrome::LayoutOutput output = [layout computeLayout]; | 212 chrome::LayoutOutput output = [layout computeLayout]; |
212 | 213 |
213 EXPECT_NSEQ(NSMakeRect(537, 589, 28, 28), output.tabStripLayout.avatarFrame); | 214 EXPECT_NSEQ(NSMakeRect(537, 589, 28, 28), output.tabStripLayout.avatarFrame); |
214 } | 215 } |
OLD | NEW |