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

Side by Side Diff: ash/wm/overview/window_selector_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
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/accessibility_delegate.h" 8 #include "ash/accessibility_delegate.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_layout.h"
11 #include "ash/drag_drop/drag_drop_controller.h" 10 #include "ash/drag_drop/drag_drop_controller.h"
12 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
13 #include "ash/screen_util.h" 12 #include "ash/screen_util.h"
14 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
15 #include "ash/shelf/shelf_widget.h" 14 #include "ash/shelf/shelf_widget.h"
16 #include "ash/shell.h" 15 #include "ash/shell.h"
17 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
18 #include "ash/test/ash_test_base.h" 17 #include "ash/test/ash_test_base.h"
19 #include "ash/test/display_manager_test_api.h" 18 #include "ash/test/display_manager_test_api.h"
20 #include "ash/test/shelf_test_api.h" 19 #include "ash/test/shelf_test_api.h"
(...skipping 19 matching lines...) Expand all
40 #include "base/test/user_action_tester.h" 39 #include "base/test/user_action_tester.h"
41 #include "base/thread_task_runner_handle.h" 40 #include "base/thread_task_runner_handle.h"
42 #include "ui/aura/client/aura_constants.h" 41 #include "ui/aura/client/aura_constants.h"
43 #include "ui/aura/client/cursor_client.h" 42 #include "ui/aura/client/cursor_client.h"
44 #include "ui/aura/client/focus_client.h" 43 #include "ui/aura/client/focus_client.h"
45 #include "ui/aura/test/test_window_delegate.h" 44 #include "ui/aura/test/test_window_delegate.h"
46 #include "ui/aura/test/test_windows.h" 45 #include "ui/aura/test/test_windows.h"
47 #include "ui/aura/window.h" 46 #include "ui/aura/window.h"
48 #include "ui/aura/window_event_dispatcher.h" 47 #include "ui/aura/window_event_dispatcher.h"
49 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 48 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
49 #include "ui/display/manager/display_layout.h"
50 #include "ui/events/event_utils.h" 50 #include "ui/events/event_utils.h"
51 #include "ui/events/test/event_generator.h" 51 #include "ui/events/test/event_generator.h"
52 #include "ui/gfx/geometry/point_conversions.h" 52 #include "ui/gfx/geometry/point_conversions.h"
53 #include "ui/gfx/geometry/rect_conversions.h" 53 #include "ui/gfx/geometry/rect_conversions.h"
54 #include "ui/gfx/transform.h" 54 #include "ui/gfx/transform.h"
55 #include "ui/gfx/transform_util.h" 55 #include "ui/gfx/transform_util.h"
56 #include "ui/views/controls/button/label_button.h" 56 #include "ui/views/controls/button/label_button.h"
57 #include "ui/views/widget/native_widget_aura.h" 57 #include "ui/views/widget/native_widget_aura.h"
58 #include "ui/views/widget/widget_delegate.h" 58 #include "ui/views/widget/widget_delegate.h"
59 #include "ui/wm/core/window_util.h" 59 #include "ui/wm/core/window_util.h"
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1376 }
1377 1377
1378 // Tests first monitor when display order doesn't match left to right screen 1378 // Tests first monitor when display order doesn't match left to right screen
1379 // positions. 1379 // positions.
1380 TEST_F(WindowSelectorTest, MultiMonitorReversedOrder) { 1380 TEST_F(WindowSelectorTest, MultiMonitorReversedOrder) {
1381 if (!SupportsMultipleDisplays()) 1381 if (!SupportsMultipleDisplays())
1382 return; 1382 return;
1383 1383
1384 UpdateDisplay("400x400,400x400"); 1384 UpdateDisplay("400x400,400x400");
1385 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 1385 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
1386 test::CreateDisplayLayout(DisplayPlacement::LEFT, 0)); 1386 test::CreateDisplayLayout(display::DisplayPlacement::LEFT, 0));
1387 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 1387 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
1388 gfx::Rect bounds1(-350, 0, 100, 100); 1388 gfx::Rect bounds1(-350, 0, 100, 100);
1389 gfx::Rect bounds2(0, 0, 100, 100); 1389 gfx::Rect bounds2(0, 0, 100, 100);
1390 scoped_ptr<aura::Window> window2(CreateWindow(bounds2)); 1390 scoped_ptr<aura::Window> window2(CreateWindow(bounds2));
1391 scoped_ptr<aura::Window> window1(CreateWindow(bounds1)); 1391 scoped_ptr<aura::Window> window1(CreateWindow(bounds1));
1392 EXPECT_EQ(root_windows[1], window1->GetRootWindow()); 1392 EXPECT_EQ(root_windows[1], window1->GetRootWindow());
1393 EXPECT_EQ(root_windows[0], window2->GetRootWindow()); 1393 EXPECT_EQ(root_windows[0], window2->GetRootWindow());
1394 1394
1395 ToggleOverview(); 1395 ToggleOverview();
1396 1396
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 // Switch to overview mode. 1635 // Switch to overview mode.
1636 ToggleOverview(); 1636 ToggleOverview();
1637 ASSERT_TRUE(IsSelecting()); 1637 ASSERT_TRUE(IsSelecting());
1638 1638
1639 // Tap should now exit overview mode. 1639 // Tap should now exit overview mode.
1640 generator.GestureTapAt(point_in_background_page); 1640 generator.GestureTapAt(point_in_background_page);
1641 EXPECT_FALSE(IsSelecting()); 1641 EXPECT_FALSE(IsSelecting());
1642 } 1642 }
1643 1643
1644 } // namespace ash 1644 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/immersive_fullscreen_controller_unittest.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698