| 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" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 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: |
| 40 WindowCycleControllerTest() {} | 40 WindowCycleControllerTest() {} |
| 41 virtual ~WindowCycleControllerTest() {} | 41 virtual ~WindowCycleControllerTest() {} |
| 42 | 42 |
| 43 virtual void SetUp() OVERRIDE { | 43 virtual void SetUp() override { |
| 44 test::AshTestBase::SetUp(); | 44 test::AshTestBase::SetUp(); |
| 45 ASSERT_TRUE(test::TestShelfDelegate::instance()); | 45 ASSERT_TRUE(test::TestShelfDelegate::instance()); |
| 46 | 46 |
| 47 shelf_view_test_.reset(new test::ShelfViewTestAPI( | 47 shelf_view_test_.reset(new test::ShelfViewTestAPI( |
| 48 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); | 48 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); |
| 49 shelf_view_test_->SetAnimationDuration(1); | 49 shelf_view_test_->SetAnimationDuration(1); |
| 50 } | 50 } |
| 51 | 51 |
| 52 aura::Window* CreatePanelWindow() { | 52 aura::Window* CreatePanelWindow() { |
| 53 gfx::Rect rect(100, 100); | 53 gfx::Rect rect(100, 100); |
| (...skipping 525 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 |