| 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 "ui/compositor/test/test_suite.h" | 5 #include "ui/compositor/test/test_suite.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/test/scoped_task_environment.h" | |
| 10 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 11 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
| 12 #include "ui/compositor/compositor_switches.h" | 11 #include "ui/compositor/compositor_switches.h" |
| 13 #include "ui/compositor/layer.h" | 12 #include "ui/compositor/layer.h" |
| 14 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
| 15 #include "ui/gl/test/gl_surface_test_support.h" | 14 #include "ui/gl/test/gl_surface_test_support.h" |
| 16 | 15 |
| 17 #if defined(USE_OZONE) | 16 #if defined(USE_OZONE) |
| 18 #include "ui/ozone/public/ozone_platform.h" | 17 #include "ui/ozone/public/ozone_platform.h" |
| 19 #endif | 18 #endif |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 #if defined(USE_OZONE) | 36 #if defined(USE_OZONE) |
| 38 ui::OzonePlatform::InitializeForUI(); | 37 ui::OzonePlatform::InitializeForUI(); |
| 39 #endif | 38 #endif |
| 40 | 39 |
| 41 gfx::RegisterPathProvider(); | 40 gfx::RegisterPathProvider(); |
| 42 | 41 |
| 43 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 44 display::win::SetDefaultDeviceScaleFactor(1.0f); | 43 display::win::SetDefaultDeviceScaleFactor(1.0f); |
| 45 #endif | 44 #endif |
| 46 | 45 |
| 47 scoped_task_environment_ = | 46 message_loop_.reset(new base::MessageLoopForUI); |
| 48 base::MakeUnique<base::test::ScopedTaskEnvironment>( | |
| 49 base::test::ScopedTaskEnvironment::MainThreadType::UI); | |
| 50 } | 47 } |
| 51 | 48 |
| 52 void CompositorTestSuite::Shutdown() { | 49 void CompositorTestSuite::Shutdown() { |
| 53 scoped_task_environment_.reset(); | 50 message_loop_.reset(); |
| 54 | 51 |
| 55 base::TestSuite::Shutdown(); | 52 base::TestSuite::Shutdown(); |
| 56 } | 53 } |
| 57 | 54 |
| 58 } // namespace test | 55 } // namespace test |
| 59 } // namespace ui | 56 } // namespace ui |
| OLD | NEW |