| 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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) | 27 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) |
| 28 : TestSuite(argc, argv) {} | 28 : TestSuite(argc, argv) {} |
| 29 | 29 |
| 30 CompositorTestSuite::~CompositorTestSuite() {} | 30 CompositorTestSuite::~CompositorTestSuite() {} |
| 31 | 31 |
| 32 void CompositorTestSuite::Initialize() { | 32 void CompositorTestSuite::Initialize() { |
| 33 base::TestSuite::Initialize(); | 33 base::TestSuite::Initialize(); |
| 34 gl::GLSurfaceTestSupport::InitializeOneOff(); | 34 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 35 | 35 |
| 36 #if defined(USE_OZONE) | 36 #if defined(USE_OZONE) |
| 37 ui::OzonePlatform::InitializeForUI(); | 37 ui::OzonePlatform::InitParams params; |
| 38 params.single_process = true; |
| 39 ui::OzonePlatform::InitializeForUI(params); |
| 38 #endif | 40 #endif |
| 39 | 41 |
| 40 gfx::RegisterPathProvider(); | 42 gfx::RegisterPathProvider(); |
| 41 | 43 |
| 42 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 43 display::win::SetDefaultDeviceScaleFactor(1.0f); | 45 display::win::SetDefaultDeviceScaleFactor(1.0f); |
| 44 #endif | 46 #endif |
| 45 | 47 |
| 46 message_loop_.reset(new base::MessageLoopForUI); | 48 message_loop_.reset(new base::MessageLoopForUI); |
| 47 } | 49 } |
| 48 | 50 |
| 49 void CompositorTestSuite::Shutdown() { | 51 void CompositorTestSuite::Shutdown() { |
| 50 message_loop_.reset(); | 52 message_loop_.reset(); |
| 51 | 53 |
| 52 base::TestSuite::Shutdown(); | 54 base::TestSuite::Shutdown(); |
| 53 } | 55 } |
| 54 | 56 |
| 55 } // namespace test | 57 } // namespace test |
| 56 } // namespace ui | 58 } // namespace ui |
| OLD | NEW |