OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
6 | 6 |
7 #include "ash/common/ash_constants.h" | 7 #include "ash/common/ash_constants.h" |
8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
9 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" | 9 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" |
10 #include "ash/common/frame/header_painter.h" | 10 #include "ash/common/frame/header_painter.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 EXPECT_TRUE(frame_view->ShouldPaint()); | 194 EXPECT_TRUE(frame_view->ShouldPaint()); |
195 EXPECT_TRUE(frame_view->caption_button_container_->visible()); | 195 EXPECT_TRUE(frame_view->caption_button_container_->visible()); |
196 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); | 196 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); |
197 EXPECT_LT(Tab::GetImmersiveHeight(), | 197 EXPECT_LT(Tab::GetImmersiveHeight(), |
198 frame_view->header_painter_->GetHeaderHeightForPainting()); | 198 frame_view->header_painter_->GetHeaderHeightForPainting()); |
199 | 199 |
200 // Ending the reveal. In MD, immersive browser should have the same behavior | 200 // Ending the reveal. In MD, immersive browser should have the same behavior |
201 // as full screen, i.e., no light bar and having an origin of (0,0). In | 201 // as full screen, i.e., no light bar and having an origin of (0,0). In |
202 // non-MD, immersive browser will show a 3 dp light bar on the top. | 202 // non-MD, immersive browser will show a 3 dp light bar on the top. |
203 revealed_lock.reset(); | 203 revealed_lock.reset(); |
204 if (ash::MaterialDesignController::IsShelfMaterial()) { | 204 if (ash::MaterialDesignController::IsImmersiveModeMaterial()) { |
205 EXPECT_FALSE(frame_view->ShouldPaint()); | 205 EXPECT_FALSE(frame_view->ShouldPaint()); |
206 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); | 206 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); |
207 EXPECT_EQ(0, frame_view->header_painter_->GetHeaderHeightForPainting()); | 207 EXPECT_EQ(0, frame_view->header_painter_->GetHeaderHeightForPainting()); |
208 } else { | 208 } else { |
209 EXPECT_TRUE(frame_view->ShouldPaint()); | 209 EXPECT_TRUE(frame_view->ShouldPaint()); |
210 EXPECT_FALSE(frame_view->caption_button_container_->visible()); | 210 EXPECT_FALSE(frame_view->caption_button_container_->visible()); |
211 EXPECT_TRUE(frame_view->UseImmersiveLightbarHeaderStyle()); | 211 EXPECT_TRUE(frame_view->UseImmersiveLightbarHeaderStyle()); |
212 EXPECT_EQ(Tab::GetImmersiveHeight(), | 212 EXPECT_EQ(Tab::GetImmersiveHeight(), |
213 frame_view->header_painter_->GetHeaderHeightForPainting()); | 213 frame_view->header_painter_->GetHeaderHeightForPainting()); |
214 } | 214 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 bounds(); | 310 bounds(); |
311 EXPECT_GT(initial.width(), during_maximize.width()); | 311 EXPECT_GT(initial.width(), during_maximize.width()); |
312 ash::WmShell::Get() | 312 ash::WmShell::Get() |
313 ->maximize_mode_controller() | 313 ->maximize_mode_controller() |
314 ->EnableMaximizeModeWindowManager(false); | 314 ->EnableMaximizeModeWindowManager(false); |
315 test.EndAnimations(); | 315 test.EndAnimations(); |
316 const gfx::Rect after_restore = frame_view->caption_button_container_-> | 316 const gfx::Rect after_restore = frame_view->caption_button_container_-> |
317 bounds(); | 317 bounds(); |
318 EXPECT_EQ(initial, after_restore); | 318 EXPECT_EQ(initial, after_restore); |
319 } | 319 } |
OLD | NEW |