| 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 "ash/wm/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 EXPECT_FALSE(controller()->IsRevealed()); | 1011 EXPECT_FALSE(controller()->IsRevealed()); |
| 1012 bubble_widget8->Close(); | 1012 bubble_widget8->Close(); |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 #endif // defined(OS_WIN) | 1015 #endif // defined(OS_WIN) |
| 1016 | 1016 |
| 1017 // Test that the shelf is set to auto hide as long as the window is in | 1017 // Test that the shelf is set to auto hide as long as the window is in |
| 1018 // immersive fullscreen and that the shelf's state before entering immersive | 1018 // immersive fullscreen and that the shelf's state before entering immersive |
| 1019 // fullscreen is restored upon exiting immersive fullscreen. | 1019 // fullscreen is restored upon exiting immersive fullscreen. |
| 1020 TEST_F(ImmersiveFullscreenControllerTest, Shelf) { | 1020 TEST_F(ImmersiveFullscreenControllerTest, Shelf) { |
| 1021 ash::internal::ShelfLayoutManager* shelf = | 1021 ash::ShelfLayoutManager* shelf = |
| 1022 ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 1022 ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); |
| 1023 | 1023 |
| 1024 // Shelf is visible by default. | 1024 // Shelf is visible by default. |
| 1025 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 1025 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 1026 ASSERT_FALSE(controller()->IsEnabled()); | 1026 ASSERT_FALSE(controller()->IsEnabled()); |
| 1027 ASSERT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state()); | 1027 ASSERT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state()); |
| 1028 | 1028 |
| 1029 // Entering immersive fullscreen sets the shelf to auto hide. | 1029 // Entering immersive fullscreen sets the shelf to auto hide. |
| 1030 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); | 1030 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
| 1031 SetEnabled(true); | 1031 SetEnabled(true); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1049 // Disabling immersive fullscreen maintains the user's auto-hide selection. | 1049 // Disabling immersive fullscreen maintains the user's auto-hide selection. |
| 1050 SetEnabled(false); | 1050 SetEnabled(false); |
| 1051 window()->SetProperty(aura::client::kShowStateKey, | 1051 window()->SetProperty(aura::client::kShowStateKey, |
| 1052 ui::SHOW_STATE_NORMAL); | 1052 ui::SHOW_STATE_NORMAL); |
| 1053 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); | 1053 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 } // namespase ash | 1056 } // namespase ash |
| 1057 | 1057 |
| 1058 #endif // defined(OS_CHROMEOS) | 1058 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |