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

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

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Fix comment Created 4 years, 8 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
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/display/mouse_cursor_event_filter.h" 8 #include "ash/display/mouse_cursor_event_filter.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
11 #include "ash/shelf/shelf_types.h" 11 #include "ash/shelf/shelf_types.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/display_manager_test_api.h" 14 #include "ash/test/display_manager_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"
22 #include "ui/display/manager/display_layout.h"
22 #include "ui/events/event_utils.h" 23 #include "ui/events/event_utils.h"
23 #include "ui/events/test/event_generator.h" 24 #include "ui/events/test/event_generator.h"
24 #include "ui/events/test/test_event_handler.h" 25 #include "ui/events/test/test_event_handler.h"
25 #include "ui/gfx/animation/slide_animation.h" 26 #include "ui/gfx/animation/slide_animation.h"
26 #include "ui/views/bubble/bubble_delegate.h" 27 #include "ui/views/bubble/bubble_delegate.h"
27 #include "ui/views/controls/native/native_view_host.h" 28 #include "ui/views/controls/native/native_view_host.h"
28 #include "ui/views/view.h" 29 #include "ui/views/view.h"
29 #include "ui/views/widget/widget.h" 30 #include "ui/views/widget/widget.h"
30 31
31 namespace ash { 32 namespace ash {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // Test mouse event processing for top-of-screen reveal triggering when the user 498 // Test mouse event processing for top-of-screen reveal triggering when the user
498 // has a vertical display layout (primary display above/below secondary display) 499 // has a vertical display layout (primary display above/below secondary display)
499 // and the immersive fullscreen window is on the bottom display. 500 // and the immersive fullscreen window is on the bottom display.
500 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) { 501 TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) {
501 if (!SupportsMultipleDisplays()) 502 if (!SupportsMultipleDisplays())
502 return; 503 return;
503 504
504 // Set up initial state. 505 // Set up initial state.
505 UpdateDisplay("800x600,800x600"); 506 UpdateDisplay("800x600,800x600");
506 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 507 ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
507 test::CreateDisplayLayout(ash::DisplayPlacement::TOP, 0)); 508 test::CreateDisplayLayout(display::DisplayPlacement::TOP, 0));
508 509
509 SetEnabled(true); 510 SetEnabled(true);
510 ASSERT_TRUE(controller()->IsEnabled()); 511 ASSERT_TRUE(controller()->IsEnabled());
511 ASSERT_FALSE(controller()->IsRevealed()); 512 ASSERT_FALSE(controller()->IsRevealed());
512 513
513 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); 514 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
514 ASSERT_EQ(root_windows[0], 515 ASSERT_EQ(root_windows[0],
515 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow()); 516 top_container()->GetWidget()->GetNativeWindow()->GetRootWindow());
516 517
517 gfx::Rect primary_root_window_bounds_in_screen = 518 gfx::Rect primary_root_window_bounds_in_screen =
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1055 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1055 1056
1056 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1057 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1057 SetEnabled(false); 1058 SetEnabled(false);
1058 window()->SetProperty(aura::client::kShowStateKey, 1059 window()->SetProperty(aura::client::kShowStateKey,
1059 ui::SHOW_STATE_NORMAL); 1060 ui::SHOW_STATE_NORMAL);
1060 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1061 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1061 } 1062 }
1062 1063
1063 } // namespase ash 1064 } // namespase ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698