| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/test/test_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "ui/aura/test/event_generator_delegate_aura.h" | 31 #include "ui/aura/test/event_generator_delegate_aura.h" |
| 32 #include "ui/aura/test/test_window_delegate.h" | 32 #include "ui/aura/test/test_window_delegate.h" |
| 33 #include "ui/aura/window.h" | 33 #include "ui/aura/window.h" |
| 34 #include "ui/aura/window_delegate.h" | 34 #include "ui/aura/window_delegate.h" |
| 35 #include "ui/aura/window_tree_host.h" | 35 #include "ui/aura/window_tree_host.h" |
| 36 #include "ui/base/ime/input_method_initializer.h" | 36 #include "ui/base/ime/input_method_initializer.h" |
| 37 #include "ui/display/display.h" | 37 #include "ui/display/display.h" |
| 38 #include "ui/display/display_switches.h" | 38 #include "ui/display/display_switches.h" |
| 39 #include "ui/display/screen.h" | 39 #include "ui/display/screen.h" |
| 40 #include "ui/display/test/display_manager_test_api.h" | 40 #include "ui/display/test/display_manager_test_api.h" |
| 41 #include "ui/display/types/display_constants.h" |
| 41 #include "ui/events/gesture_detection/gesture_configuration.h" | 42 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 42 #include "ui/gfx/geometry/point.h" | 43 #include "ui/gfx/geometry/point.h" |
| 43 #include "ui/wm/core/coordinate_conversion.h" | 44 #include "ui/wm/core/coordinate_conversion.h" |
| 44 | 45 |
| 45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 46 #include "base/win/windows_version.h" | 47 #include "base/win/windows_version.h" |
| 47 #include "ui/platform_window/win/win_window.h" | 48 #include "ui/platform_window/win/win_window.h" |
| 48 #endif | 49 #endif |
| 49 | 50 |
| 50 #if defined(USE_X11) | 51 #if defined(USE_X11) |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 RunAllPendingInMessageLoop(); | 163 RunAllPendingInMessageLoop(); |
| 163 | 164 |
| 164 ash_test_helper_->TearDown(); | 165 ash_test_helper_->TearDown(); |
| 165 #if defined(OS_WIN) | 166 #if defined(OS_WIN) |
| 166 ui::test::SetUsePopupAsRootWindowForTest(false); | 167 ui::test::SetUsePopupAsRootWindowForTest(false); |
| 167 #endif | 168 #endif |
| 168 | 169 |
| 169 event_generator_.reset(); | 170 event_generator_.reset(); |
| 170 // Some tests set an internal display id, | 171 // Some tests set an internal display id, |
| 171 // reset it here, so other tests will continue in a clean environment. | 172 // reset it here, so other tests will continue in a clean environment. |
| 172 display::Display::SetInternalDisplayId(display::Display::kInvalidDisplayID); | 173 display::Display::SetInternalDisplayId(display::kInvalidDisplayId); |
| 173 } | 174 } |
| 174 | 175 |
| 175 // static | 176 // static |
| 176 WmShelf* AshTestBase::GetPrimaryShelf() { | 177 WmShelf* AshTestBase::GetPrimaryShelf() { |
| 177 return WmShell::Get() | 178 return WmShell::Get() |
| 178 ->GetPrimaryRootWindow() | 179 ->GetPrimaryRootWindow() |
| 179 ->GetRootWindowController() | 180 ->GetRootWindowController() |
| 180 ->GetShelf(); | 181 ->GetShelf(); |
| 181 } | 182 } |
| 182 | 183 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 398 |
| 398 void AshTestBase::SwapPrimaryDisplay() { | 399 void AshTestBase::SwapPrimaryDisplay() { |
| 399 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) | 400 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) |
| 400 return; | 401 return; |
| 401 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( | 402 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( |
| 402 display_manager()->GetSecondaryDisplay().id()); | 403 display_manager()->GetSecondaryDisplay().id()); |
| 403 } | 404 } |
| 404 | 405 |
| 405 } // namespace test | 406 } // namespace test |
| 406 } // namespace ash | 407 } // namespace ash |
| OLD | NEW |