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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc

Issue 2165693002: Fix tests in when MD is set to EXPERIMENTAL by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
index 26da1c48143f3633843c20cf35ebaa9d0f9087c1..850d6597221028f13afa1c0184746f99982ff7aa 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
@@ -6,6 +6,7 @@
#include "ash/common/ash_constants.h"
#include "ash/common/ash_switches.h"
+#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
@@ -189,14 +190,21 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
EXPECT_LT(Tab::GetImmersiveHeight(),
frame_view->header_painter_->GetHeaderHeightForPainting());
- // Ending the reveal should hide the caption buttons and the header should
- // be in the lightbar style.
+ // Ending the reveal. In MD, immersive browser should have the same behavior
+ // as full screen, i.e., no light bar and having an origin of (0,0). In
+ // non-MD, immersive browser will show a 3 dp light bar on the top.
revealed_lock.reset();
- EXPECT_TRUE(frame_view->ShouldPaint());
- EXPECT_FALSE(frame_view->caption_button_container_->visible());
- EXPECT_TRUE(frame_view->UseImmersiveLightbarHeaderStyle());
- EXPECT_EQ(Tab::GetImmersiveHeight(),
- frame_view->header_painter_->GetHeaderHeightForPainting());
+ if (ash::MaterialDesignController::IsShelfMaterial()) {
+ EXPECT_FALSE(frame_view->ShouldPaint());
+ EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle());
+ EXPECT_EQ(0, frame_view->header_painter_->GetHeaderHeightForPainting());
+ } else {
+ EXPECT_TRUE(frame_view->ShouldPaint());
+ EXPECT_FALSE(frame_view->caption_button_container_->visible());
+ EXPECT_TRUE(frame_view->UseImmersiveLightbarHeaderStyle());
+ EXPECT_EQ(Tab::GetImmersiveHeight(),
+ frame_view->header_painter_->GetHeaderHeightForPainting());
+ }
// Exiting immersive fullscreen should make the caption buttons and the frame
// visible again.

Powered by Google App Engine
This is Rietveld 408576698