| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/immersive_mode_controller_ash.h" | 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 browser_view()->GetWidget()->Restore(); | 222 browser_view()->GetWidget()->Restore(); |
| 223 EXPECT_FALSE(controller()->IsEnabled()); | 223 EXPECT_FALSE(controller()->IsEnabled()); |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Test how being simultaneously in tab fullscreen and immersive fullscreen | 226 // Test how being simultaneously in tab fullscreen and immersive fullscreen |
| 227 // affects the shelf visibility and whether the tab indicators are hidden. | 227 // affects the shelf visibility and whether the tab indicators are hidden. |
| 228 TEST_F(ImmersiveModeControllerAshTest, TabAndBrowserFullscreen) { | 228 TEST_F(ImmersiveModeControllerAshTest, TabAndBrowserFullscreen) { |
| 229 AddTab(browser(), GURL("about:blank")); | 229 AddTab(browser(), GURL("about:blank")); |
| 230 | 230 |
| 231 // The shelf should start out as visible. | 231 // The shelf should start out as visible. |
| 232 ash::internal::ShelfLayoutManager* shelf = | 232 ash::ShelfLayoutManager* shelf = |
| 233 ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 233 ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); |
| 234 ASSERT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state()); | 234 ASSERT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state()); |
| 235 | 235 |
| 236 // 1) Test that entering tab fullscreen from immersive fullscreen hides the | 236 // 1) Test that entering tab fullscreen from immersive fullscreen hides the |
| 237 // tab indicators and the shelf. | 237 // tab indicators and the shelf. |
| 238 ToggleFullscreen(); | 238 ToggleFullscreen(); |
| 239 ASSERT_TRUE(controller()->IsEnabled()); | 239 ASSERT_TRUE(controller()->IsEnabled()); |
| 240 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); | 240 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); |
| 241 EXPECT_FALSE(controller()->ShouldHideTabIndicators()); | 241 EXPECT_FALSE(controller()->ShouldHideTabIndicators()); |
| 242 | 242 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 // Exit immersive fullscreen. The web contents should be back below the window | 330 // Exit immersive fullscreen. The web contents should be back below the window |
| 331 // header. | 331 // header. |
| 332 ToggleFullscreen(); | 332 ToggleFullscreen(); |
| 333 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen()); | 333 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen()); |
| 334 EXPECT_FALSE(controller()->IsEnabled()); | 334 EXPECT_FALSE(controller()->IsEnabled()); |
| 335 EXPECT_FALSE(tabstrip->visible()); | 335 EXPECT_FALSE(tabstrip->visible()); |
| 336 EXPECT_FALSE(toolbar->visible()); | 336 EXPECT_FALSE(toolbar->visible()); |
| 337 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y()); | 337 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y()); |
| 338 } | 338 } |
| OLD | NEW |