OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 #include "ash/display/multi_display_manager.h" | 6 #include "ash/display/multi_display_manager.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/wm/property_util.h" |
9 #include "ash/wm/window_cycle_controller.h" | 10 #include "ash/wm/window_cycle_controller.h" |
10 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
11 #include "ui/aura/client/activation_client.h" | 12 #include "ui/aura/client/activation_client.h" |
12 #include "ui/aura/client/capture_client.h" | 13 #include "ui/aura/client/capture_client.h" |
13 #include "ui/aura/env.h" | 14 #include "ui/aura/env.h" |
14 #include "ui/aura/focus_manager.h" | 15 #include "ui/aura/focus_manager.h" |
15 #include "ui/aura/root_window.h" | 16 #include "ui/aura/root_window.h" |
16 #include "ui/aura/test/event_generator.h" | 17 #include "ui/aura/test/event_generator.h" |
17 #include "ui/aura/test/test_windows.h" | 18 #include "ui/aura/test/test_windows.h" |
18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Test conditions that root windows in extended desktop mode | 72 // Test conditions that root windows in extended desktop mode |
72 // must satisfy. | 73 // must satisfy. |
73 TEST_F(ExtendedDesktopTest, Basic) { | 74 TEST_F(ExtendedDesktopTest, Basic) { |
74 UpdateDisplay("1000x600,600x400"); | 75 UpdateDisplay("1000x600,600x400"); |
75 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 76 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
76 | 77 |
77 // All root windows must have the root window controller. | 78 // All root windows must have the root window controller. |
78 ASSERT_EQ(2U, root_windows.size()); | 79 ASSERT_EQ(2U, root_windows.size()); |
79 for (Shell::RootWindowList::const_iterator iter = root_windows.begin(); | 80 for (Shell::RootWindowList::const_iterator iter = root_windows.begin(); |
80 iter != root_windows.end(); ++iter) { | 81 iter != root_windows.end(); ++iter) { |
81 EXPECT_TRUE(wm::GetRootWindowController(*iter) != NULL); | 82 EXPECT_TRUE(GetRootWindowController(*iter) != NULL); |
82 } | 83 } |
83 // Make sure root windows share the same controllers. | 84 // Make sure root windows share the same controllers. |
84 EXPECT_EQ(root_windows[0]->GetFocusManager(), | 85 EXPECT_EQ(root_windows[0]->GetFocusManager(), |
85 root_windows[1]->GetFocusManager()); | 86 root_windows[1]->GetFocusManager()); |
86 EXPECT_EQ(aura::client::GetActivationClient(root_windows[0]), | 87 EXPECT_EQ(aura::client::GetActivationClient(root_windows[0]), |
87 aura::client::GetActivationClient(root_windows[1])); | 88 aura::client::GetActivationClient(root_windows[1])); |
88 EXPECT_EQ(aura::client::GetCaptureClient(root_windows[0]), | 89 EXPECT_EQ(aura::client::GetCaptureClient(root_windows[0]), |
89 aura::client::GetCaptureClient(root_windows[1])); | 90 aura::client::GetCaptureClient(root_windows[1])); |
90 } | 91 } |
91 | 92 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 p.SetPoint(0, 0); | 492 p.SetPoint(0, 0); |
492 aura::Window::ConvertPointToWindow(root_windows[0], root_windows[1], &p); | 493 aura::Window::ConvertPointToWindow(root_windows[0], root_windows[1], &p); |
493 EXPECT_EQ("0,-600", p.ToString()); | 494 EXPECT_EQ("0,-600", p.ToString()); |
494 p.SetPoint(0, 0); | 495 p.SetPoint(0, 0); |
495 aura::Window::ConvertPointToWindow(d1, d2, &p); | 496 aura::Window::ConvertPointToWindow(d1, d2, &p); |
496 EXPECT_EQ("-10,-610", p.ToString()); | 497 EXPECT_EQ("-10,-610", p.ToString()); |
497 } | 498 } |
498 | 499 |
499 } // namespace internal | 500 } // namespace internal |
500 } // namespace ash | 501 } // namespace ash |
OLD | NEW |