OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/aura/test/test_suite.h" | 5 #include "ui/aura/test/test_suite.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/base/ui_base_paths.h" | 11 #include "ui/base/ui_base_paths.h" |
12 #include "ui/gfx/compositor/test/compositor_test_support.h" | 12 #include "ui/gfx/compositor/test/compositor_test_support.h" |
13 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
14 #include "ui/gfx/gl/gl_implementation.h" | 14 #include "ui/gfx/gl/gl_implementation.h" |
| 15 |
| 16 #if defined(USE_WEBKIT_COMPOSITOR) |
| 17 #include "ui/gfx/compositor/compositor_setup.h" |
| 18 #else |
15 #include "ui/gfx/test/gfx_test_utils.h" | 19 #include "ui/gfx/test/gfx_test_utils.h" |
| 20 #endif |
16 | 21 |
17 namespace aura { | 22 namespace aura { |
18 namespace test { | 23 namespace test { |
19 | 24 |
20 AuraTestSuite::AuraTestSuite(int argc, char** argv) | 25 AuraTestSuite::AuraTestSuite(int argc, char** argv) |
21 : TestSuite(argc, argv) {} | 26 : TestSuite(argc, argv) {} |
22 | 27 |
23 void AuraTestSuite::Initialize() { | 28 void AuraTestSuite::Initialize() { |
24 base::TestSuite::Initialize(); | 29 base::TestSuite::Initialize(); |
25 | 30 |
26 gfx::RegisterPathProvider(); | 31 gfx::RegisterPathProvider(); |
27 ui::RegisterPathProvider(); | 32 ui::RegisterPathProvider(); |
28 | 33 |
29 // Force unittests to run using en-US so if we test against string | 34 // Force unittests to run using en-US so if we test against string |
30 // output, it'll pass regardless of the system language. | 35 // output, it'll pass regardless of the system language. |
31 ui::ResourceBundle::InitSharedInstance("en-US"); | 36 ui::ResourceBundle::InitSharedInstance("en-US"); |
32 ui::CompositorTestSupport::Initialize(); | 37 ui::CompositorTestSupport::Initialize(); |
| 38 |
| 39 #if defined(USE_WEBKIT_COMPOSITOR) |
| 40 ui::SetupTestCompositor(); |
| 41 #else |
33 ui::gfx_test_utils::SetupTestCompositor(); | 42 ui::gfx_test_utils::SetupTestCompositor(); |
| 43 #endif |
34 } | 44 } |
35 | 45 |
36 void AuraTestSuite::Shutdown() { | 46 void AuraTestSuite::Shutdown() { |
37 ui::CompositorTestSupport::Terminate(); | 47 ui::CompositorTestSupport::Terminate(); |
38 ui::ResourceBundle::CleanupSharedInstance(); | 48 ui::ResourceBundle::CleanupSharedInstance(); |
39 | 49 |
40 base::TestSuite::Shutdown(); | 50 base::TestSuite::Shutdown(); |
41 } | 51 } |
42 | 52 |
43 } // namespace test | 53 } // namespace test |
44 } // namespace aura | 54 } // namespace aura |
OLD | NEW |