OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/activation_controller.h" | 5 #include "ash/wm/activation_controller.h" |
6 | 6 |
7 #include "ash/test/aura_shell_test_base.h" | 7 #include "ash/test/aura_shell_test_base.h" |
8 #include "ash/test/test_activation_delegate.h" | 8 #include "ash/test/test_activation_delegate.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "ui/aura/focus_manager.h" | 10 #include "ui/aura/focus_manager.h" |
11 #include "ui/aura/root_window.h" | 11 #include "ui/aura/root_window.h" |
12 #include "ui/aura/test/event_generator.h" | 12 #include "ui/aura/test/event_generator.h" |
13 #include "ui/aura/test/test_windows.h" | 13 #include "ui/aura/test/test_windows.h" |
14 #include "ui/aura/test/test_window_delegate.h" | 14 #include "ui/aura/test/test_window_delegate.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 // Windows headers define macros for these function names which screw with us. | 17 // Windows headers define macros for these function names which screw with us. |
18 #if defined(CreateWindow) | 18 #if defined(CreateWindow) |
19 #undef CreateWindow | 19 #undef CreateWindow |
20 #endif | 20 #endif |
21 #endif | 21 #endif |
22 | 22 |
23 namespace aura_shell { | 23 namespace ash { |
24 namespace test { | 24 namespace test { |
25 | 25 |
26 typedef test::AuraShellTestBase ActivationControllerTest; | 26 typedef test::AuraShellTestBase ActivationControllerTest; |
27 | 27 |
28 // Utilities for a set of tests that test | 28 // Utilities for a set of tests that test |
29 // ActivationController::GetTopmostWindowToActivate(). | 29 // ActivationController::GetTopmostWindowToActivate(). |
30 class GetTopmostWindowToActivateTest : public ActivationControllerTest { | 30 class GetTopmostWindowToActivateTest : public ActivationControllerTest { |
31 public: | 31 public: |
32 GetTopmostWindowToActivateTest() : ad_1_(false), ad_3_(false) {} | 32 GetTopmostWindowToActivateTest() : ad_1_(false), ad_3_(false) {} |
33 virtual ~GetTopmostWindowToActivateTest() {} | 33 virtual ~GetTopmostWindowToActivateTest() {} |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 EXPECT_TRUE(w1->HasFocus()); | 270 EXPECT_TRUE(w1->HasFocus()); |
271 | 271 |
272 // Try focusing |w21|. Same rules apply. | 272 // Try focusing |w21|. Same rules apply. |
273 EXPECT_FALSE(IsActiveWindow(w2.get())); | 273 EXPECT_FALSE(IsActiveWindow(w2.get())); |
274 EXPECT_FALSE(w21->HasFocus()); | 274 EXPECT_FALSE(w21->HasFocus()); |
275 EXPECT_TRUE(IsActiveWindow(w1.get())); | 275 EXPECT_TRUE(IsActiveWindow(w1.get())); |
276 EXPECT_TRUE(w1->HasFocus()); | 276 EXPECT_TRUE(w1->HasFocus()); |
277 } | 277 } |
278 | 278 |
279 } // namespace test | 279 } // namespace test |
280 } // namespace aura_shell | 280 } // namespace ash |
OLD | NEW |