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 "ui/views/test/views_test_helper_aura.h" | 5 #include "ui/views/test/views_test_helper_aura.h" |
6 | 6 |
7 #include "ui/aura/client/screen_position_client.h" | 7 #include "ui/aura/client/screen_position_client.h" |
8 #include "ui/aura/test/aura_test_helper.h" | 8 #include "ui/aura/test/aura_test_helper.h" |
9 #include "ui/views/test/platform_test_helper.h" | 9 #include "ui/views/test/platform_test_helper.h" |
10 #include "ui/wm/core/capture_controller.h" | 10 #include "ui/wm/core/capture_controller.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 aura::client::GetScreenPositionClient(GetContext())) | 72 aura::client::GetScreenPositionClient(GetContext())) |
73 aura::client::SetScreenPositionClient(GetContext(), nullptr); | 73 aura::client::SetScreenPositionClient(GetContext(), nullptr); |
74 } | 74 } |
75 | 75 |
76 aura_test_helper_->TearDown(); | 76 aura_test_helper_->TearDown(); |
77 CHECK(!wm::CaptureController::Get() || | 77 CHECK(!wm::CaptureController::Get() || |
78 !wm::CaptureController::Get()->is_active()); | 78 !wm::CaptureController::Get()->is_active()); |
79 } | 79 } |
80 | 80 |
81 gfx::NativeWindow ViewsTestHelperAura::GetContext() { | 81 gfx::NativeWindow ViewsTestHelperAura::GetContext() { |
82 if (PlatformTestHelper::IsAuraMusClient()) { | 82 if (PlatformTestHelper::IsMus()) { |
83 // GetContext() returns the root of a WindowTreeHost associated with a | 83 // GetContext() returns the root of a WindowTreeHost associated with a |
84 // single display that is intended for an ash like environment. Such a | 84 // single display that is intended for an ash like environment. Such a |
85 // configuration doesn't make sense for aura-mus-client, where it's testing | 85 // configuration doesn't make sense for aura-mus-client, where it's testing |
86 // DesktopNativeWidgetAura. | 86 // DesktopNativeWidgetAura. |
87 return nullptr; | 87 return nullptr; |
88 } | 88 } |
89 | 89 |
90 return aura_test_helper_->root_window(); | 90 return aura_test_helper_->root_window(); |
91 } | 91 } |
92 | 92 |
93 } // namespace views | 93 } // namespace views |
OLD | NEW |