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

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

Issue 2368653002: Remove pre-MD code from browser/ui/views/tabs/tab.cc (Closed)
Patch Set: fix compile 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
index 1ba3d0b7a4c7e7e9fcd457ce6f250407e88ddb3f..2591cfb5f061966a79c9ba8165541b4010470ccb 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
@@ -131,36 +131,19 @@ TEST_F(ImmersiveModeControllerAshTest, Layout) {
EXPECT_TRUE(controller()->IsEnabled());
EXPECT_FALSE(controller()->IsRevealed());
EXPECT_FALSE(toolbar->visible());
- // For MD, the browser's top chrome is completely hidden in immersive
- // fullscreen mode.
- bool is_using_material_design =
- ash::MaterialDesignController::IsImmersiveModeMaterial();
- if (is_using_material_design) {
- EXPECT_FALSE(tabstrip->visible());
- } else {
- EXPECT_TRUE(tabstrip->visible());
- EXPECT_TRUE(tabstrip->IsImmersiveStyle());
- }
+ EXPECT_FALSE(tabstrip->visible());
// The tab indicators should be flush with the top of the widget.
EXPECT_EQ(0, GetBoundsInWidget(tabstrip).y());
- // In MD, since the tab strip and tool bar are both hidden in immersive
- // fullscreen mode, the web contents should extend to the edge of screen. In
- // non-MD, the web contents should be immediately below the tab indicators.
- if (is_using_material_design) {
- EXPECT_EQ(0, GetBoundsInWidget(contents_web_view).y());
- } else {
- EXPECT_EQ(Tab::GetImmersiveHeight(),
- GetBoundsInWidget(contents_web_view).y());
- }
+ // The web contents should extend to the edge of screen.
+ EXPECT_EQ(0, GetBoundsInWidget(contents_web_view).y());
// Revealing the top-of-window views should set the tab strip back to the
// normal style and show the toolbar.
AttemptReveal();
EXPECT_TRUE(controller()->IsRevealed());
EXPECT_TRUE(tabstrip->visible());
- EXPECT_FALSE(tabstrip->IsImmersiveStyle());
EXPECT_TRUE(toolbar->visible());
// The TopContainerView should be flush with the top edge of the widget. If
@@ -170,12 +153,7 @@ TEST_F(ImmersiveModeControllerAshTest, Layout) {
// The web contents should be at the same y position as they were when the
// top-of-window views were hidden.
- if (is_using_material_design) {
- EXPECT_EQ(0, GetBoundsInWidget(contents_web_view).y());
- } else {
- EXPECT_EQ(Tab::GetImmersiveHeight(),
- GetBoundsInWidget(contents_web_view).y());
- }
+ EXPECT_EQ(0, GetBoundsInWidget(contents_web_view).y());
// Repeat the test for when in both immersive fullscreen and tab fullscreen.
SetTabFullscreen(true);
@@ -187,7 +165,6 @@ TEST_F(ImmersiveModeControllerAshTest, Layout) {
// should still be flush with the top edge of the widget.
EXPECT_TRUE(controller()->IsRevealed());
EXPECT_TRUE(tabstrip->visible());
- EXPECT_FALSE(tabstrip->IsImmersiveStyle());
EXPECT_TRUE(toolbar->visible());
EXPECT_EQ(0, GetBoundsInWidget(browser_view()->top_container()).y());
@@ -212,7 +189,6 @@ TEST_F(ImmersiveModeControllerAshTest, Layout) {
EXPECT_FALSE(controller()->IsEnabled());
EXPECT_FALSE(controller()->IsRevealed());
EXPECT_TRUE(tabstrip->visible());
- EXPECT_FALSE(tabstrip->IsImmersiveStyle());
EXPECT_TRUE(toolbar->visible());
}

Powered by Google App Engine
This is Rietveld 408576698