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

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

Issue 2355063002: Separate ash::test::DisplayManagerTestApi from ash (Closed)
Patch Set: review comment Created 4 years, 2 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/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/display/mouse_cursor_event_filter.h" 10 #include "ash/display/mouse_cursor_event_filter.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // Test mouse event processing for top-of-screen reveal triggering when the user 495 // Test mouse event processing for top-of-screen reveal triggering when the user
496 // has a vertical display layout (primary display above/below secondary display) 496 // has a vertical display layout (primary display above/below secondary display)
497 // and the immersive fullscreen window is on the bottom display. 497 // and the immersive fullscreen window is on the bottom display.
498 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) { 498 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) {
499 if (!SupportsMultipleDisplays()) 499 if (!SupportsMultipleDisplays())
500 return; 500 return;
501 501
502 // Set up initial state. 502 // Set up initial state.
503 UpdateDisplay("800x600,800x600"); 503 UpdateDisplay("800x600,800x600");
504 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 504 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
505 test::CreateDisplayLayout(display::DisplayPlacement::TOP, 0)); 505 test::CreateDisplayLayout(display_manager(),
506 display::DisplayPlacement::TOP, 0));
506 507
507 SetEnabled(true); 508 SetEnabled(true);
508 ASSERT_TRUE(controller()->IsEnabled()); 509 ASSERT_TRUE(controller()->IsEnabled());
509 ASSERT_FALSE(controller()->IsRevealed()); 510 ASSERT_FALSE(controller()->IsRevealed());
510 511
511 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); 512 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
512 ASSERT_EQ(root_windows[0], 513 ASSERT_EQ(root_windows[0],
513 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow()); 514 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow());
514 515
515 gfx::Rect primary_root_window_bounds_in_screen = 516 gfx::Rect primary_root_window_bounds_in_screen =
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 SetEnabled(true); 1049 SetEnabled(true);
1049 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1050 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1050 1051
1051 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1052 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1052 SetEnabled(false); 1053 SetEnabled(false);
1053 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 1054 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
1054 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1055 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1055 } 1056 }
1056 1057
1057 } // namespase ash 1058 } // namespase ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698