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 "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" | 6 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" |
7 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 7 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
8 #import "chrome/browser/ui/cocoa/fast_resize_view.h" | 8 #import "chrome/browser/ui/cocoa/fast_resize_view.h" |
9 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" | 9 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" |
10 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 10 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // Superclass override. | 110 // Superclass override. |
111 - (BOOL)placeBookmarkBarBelowInfoBar { | 111 - (BOOL)placeBookmarkBarBelowInfoBar { |
112 return NO; | 112 return NO; |
113 } | 113 } |
114 @end | 114 @end |
115 | 115 |
116 // -------------------PresentationModeControllerTest---------------------------- | 116 // -------------------PresentationModeControllerTest---------------------------- |
117 class PresentationModeControllerTest : public CocoaProfileTest { | 117 class PresentationModeControllerTest : public CocoaProfileTest { |
118 public: | 118 public: |
119 virtual void SetUp() OVERRIDE { | 119 virtual void SetUp() override { |
120 CocoaProfileTest::SetUp(); | 120 CocoaProfileTest::SetUp(); |
121 ASSERT_TRUE(browser()); | 121 ASSERT_TRUE(browser()); |
122 | 122 |
123 controller_ = [[MockBrowserWindowController alloc] initWithBrowser:browser() | 123 controller_ = [[MockBrowserWindowController alloc] initWithBrowser:browser() |
124 takeOwnership:NO]; | 124 takeOwnership:NO]; |
125 [[controller_ bookmarkBarController] | 125 [[controller_ bookmarkBarController] |
126 updateState:BookmarkBar::SHOW | 126 updateState:BookmarkBar::SHOW |
127 changeType:BookmarkBar::DONT_ANIMATE_STATE_CHANGE]; | 127 changeType:BookmarkBar::DONT_ANIMATE_STATE_CHANGE]; |
128 } | 128 } |
129 | 129 |
130 virtual void TearDown() OVERRIDE { | 130 virtual void TearDown() override { |
131 [controller_ close]; | 131 [controller_ close]; |
132 CocoaProfileTest::TearDown(); | 132 CocoaProfileTest::TearDown(); |
133 } | 133 } |
134 | 134 |
135 public: | 135 public: |
136 MockBrowserWindowController* controller_; | 136 MockBrowserWindowController* controller_; |
137 }; | 137 }; |
138 | 138 |
139 // Tests the layout of views in Canonical Fullscreen (emulating AppKit | 139 // Tests the layout of views in Canonical Fullscreen (emulating AppKit |
140 // Fullscreen API). | 140 // Fullscreen API). |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 EXPECT_EQ(contentHeight, MaxYInWindow(HighestViewInToolbarArea(controller_))); | 219 EXPECT_EQ(contentHeight, MaxYInWindow(HighestViewInToolbarArea(controller_))); |
220 EXPECT_EQ(windowHeight, MaxYInWindow([controller_ tabContentArea])); | 220 EXPECT_EQ(windowHeight, MaxYInWindow([controller_ tabContentArea])); |
221 | 221 |
222 // The menu bar has disappeared. All views should return to normal. | 222 // The menu bar has disappeared. All views should return to normal. |
223 [controller_->presentationController_ setMenuBarRevealProgress:0]; | 223 [controller_->presentationController_ setMenuBarRevealProgress:0]; |
224 [controller_->presentationController_ changeToolbarFraction:0]; | 224 [controller_->presentationController_ changeToolbarFraction:0]; |
225 CheckToolbarLayoutNoOverlap(controller_); | 225 CheckToolbarLayoutNoOverlap(controller_); |
226 EXPECT_EQ(windowHeight, MinYInWindow(LowestViewInToolbarArea(controller_))); | 226 EXPECT_EQ(windowHeight, MinYInWindow(LowestViewInToolbarArea(controller_))); |
227 EXPECT_EQ(windowHeight, MaxYInWindow([controller_ tabContentArea])); | 227 EXPECT_EQ(windowHeight, MaxYInWindow([controller_ tabContentArea])); |
228 } | 228 } |
OLD | NEW |