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

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 2445583002: Relocate display_manager from ash to ui (Closed)
Patch Set: fix windows build Created 4 years, 1 month 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/accessibility_delegate.h" 9 #include "ash/common/accessibility_delegate.h"
10 #include "ash/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 10 matching lines...) Expand all
21 #include "ash/common/wm/overview/window_selector.h" 21 #include "ash/common/wm/overview/window_selector.h"
22 #include "ash/common/wm/overview/window_selector_controller.h" 22 #include "ash/common/wm/overview/window_selector_controller.h"
23 #include "ash/common/wm/overview/window_selector_item.h" 23 #include "ash/common/wm/overview/window_selector_item.h"
24 #include "ash/common/wm/panels/panel_layout_manager.h" 24 #include "ash/common/wm/panels/panel_layout_manager.h"
25 #include "ash/common/wm/window_state.h" 25 #include "ash/common/wm/window_state.h"
26 #include "ash/common/wm/wm_event.h" 26 #include "ash/common/wm/wm_event.h"
27 #include "ash/common/wm/workspace/workspace_window_resizer.h" 27 #include "ash/common/wm/workspace/workspace_window_resizer.h"
28 #include "ash/common/wm_lookup.h" 28 #include "ash/common/wm_lookup.h"
29 #include "ash/common/wm_shell.h" 29 #include "ash/common/wm_shell.h"
30 #include "ash/common/wm_window_property.h" 30 #include "ash/common/wm_window_property.h"
31 #include "ash/display/display_manager.h"
32 #include "ash/drag_drop/drag_drop_controller.h" 31 #include "ash/drag_drop/drag_drop_controller.h"
33 #include "ash/public/cpp/shell_window_ids.h" 32 #include "ash/public/cpp/shell_window_ids.h"
34 #include "ash/root_window_controller.h" 33 #include "ash/root_window_controller.h"
35 #include "ash/screen_util.h" 34 #include "ash/screen_util.h"
36 #include "ash/shell.h" 35 #include "ash/shell.h"
37 #include "ash/test/ash_test_base.h" 36 #include "ash/test/ash_test_base.h"
38 #include "ash/test/display_manager_test_api.h"
39 #include "ash/test/shelf_view_test_api.h" 37 #include "ash/test/shelf_view_test_api.h"
40 #include "ash/test/shell_test_api.h" 38 #include "ash/test/shell_test_api.h"
41 #include "ash/wm/window_state_aura.h" 39 #include "ash/wm/window_state_aura.h"
42 #include "ash/wm/window_util.h" 40 #include "ash/wm/window_util.h"
43 #include "base/command_line.h" 41 #include "base/command_line.h"
44 #include "base/compiler_specific.h" 42 #include "base/compiler_specific.h"
45 #include "base/memory/scoped_vector.h" 43 #include "base/memory/scoped_vector.h"
46 #include "base/run_loop.h" 44 #include "base/run_loop.h"
47 #include "base/strings/string_piece.h" 45 #include "base/strings/string_piece.h"
48 #include "base/strings/utf_string_conversions.h" 46 #include "base/strings/utf_string_conversions.h"
49 #include "base/test/user_action_tester.h" 47 #include "base/test/user_action_tester.h"
50 #include "base/threading/thread_task_runner_handle.h" 48 #include "base/threading/thread_task_runner_handle.h"
51 #include "ui/aura/client/aura_constants.h" 49 #include "ui/aura/client/aura_constants.h"
52 #include "ui/aura/client/cursor_client.h" 50 #include "ui/aura/client/cursor_client.h"
53 #include "ui/aura/client/focus_client.h" 51 #include "ui/aura/client/focus_client.h"
54 #include "ui/aura/test/test_window_delegate.h" 52 #include "ui/aura/test/test_window_delegate.h"
55 #include "ui/aura/test/test_windows.h" 53 #include "ui/aura/test/test_windows.h"
56 #include "ui/aura/window.h" 54 #include "ui/aura/window.h"
57 #include "ui/aura/window_event_dispatcher.h" 55 #include "ui/aura/window_event_dispatcher.h"
58 #include "ui/base/hit_test.h" 56 #include "ui/base/hit_test.h"
59 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 57 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
60 #include "ui/display/manager/display_layout.h" 58 #include "ui/display/manager/display_layout.h"
59 #include "ui/display/manager/display_manager.h"
60 #include "ui/display/test/display_manager_test_api.h"
61 #include "ui/events/event_utils.h" 61 #include "ui/events/event_utils.h"
62 #include "ui/events/test/event_generator.h" 62 #include "ui/events/test/event_generator.h"
63 #include "ui/gfx/animation/slide_animation.h" 63 #include "ui/gfx/animation/slide_animation.h"
64 #include "ui/gfx/geometry/point_conversions.h" 64 #include "ui/gfx/geometry/point_conversions.h"
65 #include "ui/gfx/geometry/rect_conversions.h" 65 #include "ui/gfx/geometry/rect_conversions.h"
66 #include "ui/gfx/geometry/safe_integer_conversions.h" 66 #include "ui/gfx/geometry/safe_integer_conversions.h"
67 #include "ui/gfx/transform.h" 67 #include "ui/gfx/transform.h"
68 #include "ui/gfx/transform_util.h" 68 #include "ui/gfx/transform_util.h"
69 #include "ui/views/controls/button/image_button.h" 69 #include "ui/views/controls/button/image_button.h"
70 #include "ui/views/controls/button/label_button.h" 70 #include "ui/views/controls/button/label_button.h"
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 } 1624 }
1625 1625
1626 // Tests first monitor when display order doesn't match left to right screen 1626 // Tests first monitor when display order doesn't match left to right screen
1627 // positions. 1627 // positions.
1628 TEST_F(WindowSelectorTest, MultiMonitorReversedOrder) { 1628 TEST_F(WindowSelectorTest, MultiMonitorReversedOrder) {
1629 if (!SupportsMultipleDisplays()) 1629 if (!SupportsMultipleDisplays())
1630 return; 1630 return;
1631 1631
1632 UpdateDisplay("400x400,400x400"); 1632 UpdateDisplay("400x400,400x400");
1633 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 1633 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
1634 test::CreateDisplayLayout(display_manager(), 1634 display::test::CreateDisplayLayout(display_manager(),
1635 display::DisplayPlacement::LEFT, 0)); 1635 display::DisplayPlacement::LEFT, 0));
1636 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 1636 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
1637 gfx::Rect bounds1(-350, 0, 100, 100); 1637 gfx::Rect bounds1(-350, 0, 100, 100);
1638 gfx::Rect bounds2(0, 0, 100, 100); 1638 gfx::Rect bounds2(0, 0, 100, 100);
1639 std::unique_ptr<aura::Window> window2(CreateWindow(bounds2)); 1639 std::unique_ptr<aura::Window> window2(CreateWindow(bounds2));
1640 std::unique_ptr<aura::Window> window1(CreateWindow(bounds1)); 1640 std::unique_ptr<aura::Window> window1(CreateWindow(bounds1));
1641 EXPECT_EQ(root_windows[1], window1->GetRootWindow()); 1641 EXPECT_EQ(root_windows[1], window1->GetRootWindow());
1642 EXPECT_EQ(root_windows[0], window2->GetRootWindow()); 1642 EXPECT_EQ(root_windows[0], window2->GetRootWindow());
1643 1643
1644 ToggleOverview(); 1644 ToggleOverview();
1645 1645
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); 2029 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE));
2030 ASSERT_TRUE(resizer.get()); 2030 ASSERT_TRUE(resizer.get());
2031 gfx::Point location = resizer->GetInitialLocation(); 2031 gfx::Point location = resizer->GetInitialLocation();
2032 location.Offset(20, 20); 2032 location.Offset(20, 20);
2033 resizer->Drag(location, 0); 2033 resizer->Drag(location, 0);
2034 ToggleOverview(); 2034 ToggleOverview();
2035 resizer->RevertDrag(); 2035 resizer->RevertDrag();
2036 } 2036 }
2037 2037
2038 } // namespace ash 2038 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller_unittest.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698