OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
11 #include "ash/shelf/shelf_widget.h" | 11 #include "ash/shelf/shelf_widget.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "ash/shell_window_ids.h" | 13 #include "ash/shell_window_ids.h" |
14 #include "ash/test/ash_test_base.h" | 14 #include "ash/test/ash_test_base.h" |
15 #include "ash/test/shelf_test_api.h" | 15 #include "ash/test/shelf_test_api.h" |
16 #include "ash/test/shelf_view_test_api.h" | 16 #include "ash/test/shelf_view_test_api.h" |
17 #include "ash/test/test_shelf_delegate.h" | 17 #include "ash/test/test_shelf_delegate.h" |
18 #include "ash/test/test_shell_delegate.h" | 18 #include "ash/test/test_shell_delegate.h" |
19 #include "ash/wm/window_cycle_list.h" | 19 #include "ash/wm/window_cycle_list.h" |
20 #include "ash/wm/window_state.h" | 20 #include "ash/wm/window_state.h" |
21 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
22 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
23 #include "ui/aura/client/aura_constants.h" | 23 #include "ui/aura/client/aura_constants.h" |
24 #include "ui/aura/client/screen_position_client.h" | 24 #include "ui/aura/client/screen_position_client.h" |
25 #include "ui/aura/env.h" | 25 #include "ui/aura/env.h" |
26 #include "ui/aura/test/test_windows.h" | 26 #include "ui/aura/test/test_windows.h" |
27 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
28 #include "ui/aura/window_event_dispatcher.h" | 28 #include "ui/aura/window_event_dispatcher.h" |
29 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
30 #include "ui/gfx/screen.h" | 30 #include "ui/gfx/screen.h" |
31 | 31 |
32 namespace ash { | 32 namespace ash { |
33 | 33 |
34 using aura::test::CreateTestWindowWithId; | 34 using aura::test::CreateTestWindowWithId; |
35 using aura::test::TestWindowDelegate; | 35 using aura::test::TestWindowDelegate; |
36 using aura::Window; | 36 using aura::Window; |
37 | 37 |
38 class WindowCycleControllerTest : public test::AshTestBase { | 38 class WindowCycleControllerTest : public test::AshTestBase { |
39 public: | 39 public: |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 // Panel 1 is the next item as the MRU panel, removing it should make panel 2 | 579 // Panel 1 is the next item as the MRU panel, removing it should make panel 2 |
580 // the next window to be selected. | 580 // the next window to be selected. |
581 panel0.reset(); | 581 panel0.reset(); |
582 // Cycling again should now select panel1. | 582 // Cycling again should now select panel1. |
583 controller->HandleCycleWindow(WindowCycleController::FORWARD); | 583 controller->HandleCycleWindow(WindowCycleController::FORWARD); |
584 controller->StopCycling(); | 584 controller->StopCycling(); |
585 EXPECT_TRUE(wm::IsActiveWindow(panel1.get())); | 585 EXPECT_TRUE(wm::IsActiveWindow(panel1.get())); |
586 } | 586 } |
587 | 587 |
588 } // namespace ash | 588 } // namespace ash |
OLD | NEW |