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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc

Issue 2326703002: Do not show shelf or top chrome hints while in Ash immersive mode (Closed)
Patch Set: address comments Created 4 years, 3 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 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
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
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 }
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698