| 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 "ui/compositor/compositor.h" | 9 #include "ui/compositor/compositor.h" |
| 10 #include "ui/compositor/compositor_switches.h" | 10 #include "ui/compositor/compositor_switches.h" |
| 11 #include "ui/gfx/gfx_paths.h" | 11 #include "ui/gfx/gfx_paths.h" |
| 12 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include "ui/gfx/win/dpi.h" | 15 #include "ui/gfx/win/dpi.h" |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 namespace test { | 19 namespace test { |
| 20 | 20 |
| 21 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) | 21 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) |
| 22 : TestSuite(argc, argv) {} | 22 : TestSuite(argc, argv) {} |
| 23 | 23 |
| 24 CompositorTestSuite::~CompositorTestSuite() {} | 24 CompositorTestSuite::~CompositorTestSuite() {} |
| 25 | 25 |
| 26 void CompositorTestSuite::Initialize() { | 26 void CompositorTestSuite::Initialize() { |
| 27 base::TestSuite::Initialize(); | 27 base::TestSuite::Initialize(); |
| 28 gfx::GLSurface::InitializeOneOffForTests(true); | 28 gfx::GLSurface::InitializeOneOffForTests(); |
| 29 | 29 |
| 30 gfx::RegisterPathProvider(); | 30 gfx::RegisterPathProvider(); |
| 31 | 31 |
| 32 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
| 33 gfx::InitDeviceScaleFactor(1.0f); | 33 gfx::InitDeviceScaleFactor(1.0f); |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 message_loop_.reset(new base::MessageLoopForUI); | 36 message_loop_.reset(new base::MessageLoopForUI); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void CompositorTestSuite::Shutdown() { | 39 void CompositorTestSuite::Shutdown() { |
| 40 message_loop_.reset(); | 40 message_loop_.reset(); |
| 41 | 41 |
| 42 base::TestSuite::Shutdown(); | 42 base::TestSuite::Shutdown(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace test | 45 } // namespace test |
| 46 } // namespace ui | 46 } // namespace ui |
| OLD | NEW |