| 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 #import "chrome/browser/ui/cocoa/browser_window_layout.h" | 8 #import "chrome/browser/ui/cocoa/browser_window_layout.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 class BrowserWindowLayoutTest : public testing::Test { | 11 class BrowserWindowLayoutTest : public testing::Test { |
| 12 public: | 12 public: |
| 13 BrowserWindowLayoutTest() {} | 13 BrowserWindowLayoutTest() {} |
| 14 virtual void SetUp() OVERRIDE { | 14 virtual void SetUp() override { |
| 15 layout.reset([[BrowserWindowLayout alloc] init]); | 15 layout.reset([[BrowserWindowLayout alloc] init]); |
| 16 | 16 |
| 17 [layout setContentViewSize:NSMakeSize(600, 600)]; | 17 [layout setContentViewSize:NSMakeSize(600, 600)]; |
| 18 [layout setWindowSize:NSMakeSize(600, 622)]; | 18 [layout setWindowSize:NSMakeSize(600, 622)]; |
| 19 [layout setInAnyFullscreen:NO]; | 19 [layout setInAnyFullscreen:NO]; |
| 20 [layout setHasTabStrip:YES]; | 20 [layout setHasTabStrip:YES]; |
| 21 [layout setFullscreenButtonFrame:NSMakeRect(575, 596, 16, 17)]; | 21 [layout setFullscreenButtonFrame:NSMakeRect(575, 596, 16, 17)]; |
| 22 [layout setShouldShowAvatar:YES]; | 22 [layout setShouldShowAvatar:YES]; |
| 23 [layout setShouldUseNewAvatar:YES]; | 23 [layout setShouldUseNewAvatar:YES]; |
| 24 [layout setAvatarSize:NSMakeSize(63, 27)]; | 24 [layout setAvatarSize:NSMakeSize(63, 27)]; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 NSRect fullscreenButtonFrame = NSMakeRect(575, 596, 16, 17); | 164 NSRect fullscreenButtonFrame = NSMakeRect(575, 596, 16, 17); |
| 165 [layout setFullscreenButtonFrame:fullscreenButtonFrame]; | 165 [layout setFullscreenButtonFrame:fullscreenButtonFrame]; |
| 166 [layout setShouldUseNewAvatar:YES]; | 166 [layout setShouldUseNewAvatar:YES]; |
| 167 | 167 |
| 168 chrome::TabStripLayout tabStripLayout = [layout computeLayout].tabStripLayout; | 168 chrome::TabStripLayout tabStripLayout = [layout computeLayout].tabStripLayout; |
| 169 | 169 |
| 170 EXPECT_LE(NSMaxX(tabStripLayout.avatarFrame), NSMinX(fullscreenButtonFrame)); | 170 EXPECT_LE(NSMaxX(tabStripLayout.avatarFrame), NSMinX(fullscreenButtonFrame)); |
| 171 EXPECT_EQ(NSWidth(tabStripLayout.frame) - NSMinX(tabStripLayout.avatarFrame), | 171 EXPECT_EQ(NSWidth(tabStripLayout.frame) - NSMinX(tabStripLayout.avatarFrame), |
| 172 tabStripLayout.rightIndent); | 172 tabStripLayout.rightIndent); |
| 173 } | 173 } |
| OLD | NEW |