| 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 "ui/aura_shell/stacking_controller.h" | 5 #include "ui/aura_shell/stacking_controller.h" |
| 6 | 6 |
| 7 #include "ui/aura/desktop.h" | 7 #include "ui/aura/desktop.h" |
| 8 #include "ui/aura/test/aura_test_base.h" | |
| 9 #include "ui/aura/test/test_windows.h" | 8 #include "ui/aura/test/test_windows.h" |
| 10 #include "ui/aura/test/test_window_delegate.h" | 9 #include "ui/aura/test/test_window_delegate.h" |
| 11 #include "ui/aura_shell/shell.h" | 10 #include "ui/aura_shell/test/aura_shell_test_base.h" |
| 12 | 11 |
| 13 namespace aura_shell { | 12 namespace aura_shell { |
| 14 namespace test { | 13 namespace test { |
| 15 | 14 |
| 16 typedef aura::test::AuraTestBase StackingControllerTest; | 15 typedef aura_shell::test::AuraShellTestBase StackingControllerTest; |
| 17 | 16 |
| 18 TEST_F(StackingControllerTest, GetTopmostWindowToActivate) { | 17 TEST_F(StackingControllerTest, GetTopmostWindowToActivate) { |
| 19 Shell::CreateInstance(NULL); | |
| 20 aura::test::ActivateWindowDelegate activate; | 18 aura::test::ActivateWindowDelegate activate; |
| 21 aura::test::ActivateWindowDelegate non_activate(false); | 19 aura::test::ActivateWindowDelegate non_activate(false); |
| 22 | 20 |
| 23 scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate( | 21 scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate( |
| 24 &non_activate, 1, gfx::Rect(), NULL)); | 22 &non_activate, 1, gfx::Rect(), NULL)); |
| 25 scoped_ptr<aura::Window> w2(aura::test::CreateTestWindowWithDelegate( | 23 scoped_ptr<aura::Window> w2(aura::test::CreateTestWindowWithDelegate( |
| 26 &activate, 2, gfx::Rect(), NULL)); | 24 &activate, 2, gfx::Rect(), NULL)); |
| 27 scoped_ptr<aura::Window> w3(aura::test::CreateTestWindowWithDelegate( | 25 scoped_ptr<aura::Window> w3(aura::test::CreateTestWindowWithDelegate( |
| 28 &non_activate, 3, gfx::Rect(), NULL)); | 26 &non_activate, 3, gfx::Rect(), NULL)); |
| 29 EXPECT_EQ(w2.get(), aura::Desktop::GetInstance()->stacking_client()-> | 27 EXPECT_EQ(w2.get(), aura::Desktop::GetInstance()->stacking_client()-> |
| 30 GetTopmostWindowToActivate(NULL)); | 28 GetTopmostWindowToActivate(NULL)); |
| 31 } | 29 } |
| 32 | 30 |
| 33 } // namespace test | 31 } // namespace test |
| 34 } // namespace aura_shell | 32 } // namespace aura_shell |
| OLD | NEW |