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/aura/test/test_suite.h" | 5 #include "ui/aura/test/test_suite.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/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/compositor/compositor_setup.h" | 12 #include "ui/compositor/compositor_setup.h" |
13 #include "ui/compositor/test/compositor_test_support.h" | |
14 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
15 #include "ui/gl/gl_implementation.h" | 14 #include "ui/gl/gl_implementation.h" |
16 | 15 |
17 namespace aura { | 16 namespace aura { |
18 namespace test { | 17 namespace test { |
19 | 18 |
20 AuraTestSuite::AuraTestSuite(int argc, char** argv) | 19 AuraTestSuite::AuraTestSuite(int argc, char** argv) |
21 : TestSuite(argc, argv) {} | 20 : TestSuite(argc, argv) {} |
22 | 21 |
23 void AuraTestSuite::Initialize() { | 22 void AuraTestSuite::Initialize() { |
24 base::TestSuite::Initialize(); | 23 base::TestSuite::Initialize(); |
25 | 24 |
26 gfx::RegisterPathProvider(); | 25 gfx::RegisterPathProvider(); |
27 ui::RegisterPathProvider(); | 26 ui::RegisterPathProvider(); |
28 | 27 |
29 // Force unittests to run using en-US so if we test against string | 28 // Force unittests to run using en-US so if we test against string |
30 // output, it'll pass regardless of the system language. | 29 // output, it'll pass regardless of the system language. |
31 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 30 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
32 ui::CompositorTestSupport::Initialize(); | |
33 | 31 |
34 ui::SetupTestCompositor(); | 32 ui::SetupTestCompositor(); |
35 } | 33 } |
36 | 34 |
37 void AuraTestSuite::Shutdown() { | 35 void AuraTestSuite::Shutdown() { |
38 ui::CompositorTestSupport::Terminate(); | |
39 ui::ResourceBundle::CleanupSharedInstance(); | 36 ui::ResourceBundle::CleanupSharedInstance(); |
40 | 37 |
41 base::TestSuite::Shutdown(); | 38 base::TestSuite::Shutdown(); |
42 } | 39 } |
43 | 40 |
44 } // namespace test | 41 } // namespace test |
45 } // namespace aura | 42 } // namespace aura |
OLD | NEW |