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

Side by Side Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase Created 3 years, 7 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 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/shared/immersive_fullscreen_controller.h" 5 #include "ash/shared/immersive_fullscreen_controller.h"
6 6
7 #include "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/public/cpp/shelf_types.h" 8 #include "ash/public/cpp/shelf_types.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shared/immersive_fullscreen_controller_delegate.h" 10 #include "ash/shared/immersive_fullscreen_controller_delegate.h"
11 #include "ash/shelf/wm_shelf.h" 11 #include "ash/shelf/shelf.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/test/ash_test_base.h" 13 #include "ash/test/ash_test_base.h"
14 #include "ash/test/immersive_fullscreen_controller_test_api.h" 14 #include "ash/test/immersive_fullscreen_controller_test_api.h"
15 #include "ash/wm/window_state.h" 15 #include "ash/wm/window_state.h"
16 #include "ui/aura/client/aura_constants.h" 16 #include "ui/aura/client/aura_constants.h"
17 #include "ui/aura/client/cursor_client.h" 17 #include "ui/aura/client/cursor_client.h"
18 #include "ui/aura/env.h" 18 #include "ui/aura/env.h"
19 #include "ui/aura/test/test_window_delegate.h" 19 #include "ui/aura/test/test_window_delegate.h"
20 #include "ui/aura/window.h" 20 #include "ui/aura/window.h"
21 #include "ui/aura/window_event_dispatcher.h" 21 #include "ui/aura/window_event_dispatcher.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 bubble_widget8->Show(); 1044 bubble_widget8->Show();
1045 SetHovered(false); 1045 SetHovered(false);
1046 EXPECT_FALSE(controller()->IsRevealed()); 1046 EXPECT_FALSE(controller()->IsRevealed());
1047 bubble_widget8->Close(); 1047 bubble_widget8->Close();
1048 } 1048 }
1049 1049
1050 // Test that the shelf is set to auto hide as long as the window is in 1050 // Test that the shelf is set to auto hide as long as the window is in
1051 // immersive fullscreen and that the shelf's state before entering immersive 1051 // immersive fullscreen and that the shelf's state before entering immersive
1052 // fullscreen is restored upon exiting immersive fullscreen. 1052 // fullscreen is restored upon exiting immersive fullscreen.
1053 TEST_F(ImmersiveFullscreenControllerTest, Shelf) { 1053 TEST_F(ImmersiveFullscreenControllerTest, Shelf) {
1054 WmShelf* shelf = GetPrimaryShelf(); 1054 Shelf* shelf = GetPrimaryShelf();
1055 1055
1056 // Shelf is visible by default. 1056 // Shelf is visible by default.
1057 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 1057 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
1058 ASSERT_FALSE(controller()->IsEnabled()); 1058 ASSERT_FALSE(controller()->IsEnabled());
1059 ASSERT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); 1059 ASSERT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
1060 1060
1061 // Entering immersive fullscreen sets the shelf to auto hide. 1061 // Entering immersive fullscreen sets the shelf to auto hide.
1062 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); 1062 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
1063 SetEnabled(true); 1063 SetEnabled(true);
1064 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1064 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
(...skipping 13 matching lines...) Expand all
1078 SetEnabled(true); 1078 SetEnabled(true);
1079 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1079 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1080 1080
1081 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1081 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1082 SetEnabled(false); 1082 SetEnabled(false);
1083 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 1083 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
1084 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1084 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1085 } 1085 }
1086 1086
1087 } // namespase ash 1087 } // namespase ash
OLDNEW
« no previous file with comments | « ash/wm/immersive_context_ash.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698