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_shell/test_suite.h" | 5 #include "ui/aura_shell/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/compositor_test_support.h" |
12 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
13 #include "ui/gfx/gl/gl_implementation.h" | 14 #include "ui/gfx/gl/gl_implementation.h" |
14 | 15 |
15 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) | 16 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) |
16 : TestSuite(argc, argv) {} | 17 : TestSuite(argc, argv) {} |
17 | 18 |
18 void AuraShellTestSuite::Initialize() { | 19 void AuraShellTestSuite::Initialize() { |
19 #if defined(OS_LINUX) | 20 #if defined(OS_LINUX) |
20 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); | 21 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); |
21 #endif | 22 #endif |
22 base::TestSuite::Initialize(); | 23 base::TestSuite::Initialize(); |
23 | 24 |
24 gfx::RegisterPathProvider(); | 25 gfx::RegisterPathProvider(); |
25 ui::RegisterPathProvider(); | 26 ui::RegisterPathProvider(); |
26 | 27 |
27 // 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 |
28 // output, it'll pass regardless of the system language. | 29 // output, it'll pass regardless of the system language. |
29 ui::ResourceBundle::InitSharedInstance("en-US"); | 30 ui::ResourceBundle::InitSharedInstance("en-US"); |
| 31 ui::CompositorTestSupport::Initialize(); |
30 } | 32 } |
31 | 33 |
32 void AuraShellTestSuite::Shutdown() { | 34 void AuraShellTestSuite::Shutdown() { |
| 35 ui::CompositorTestSupport::Terminate(); |
33 ui::ResourceBundle::CleanupSharedInstance(); | 36 ui::ResourceBundle::CleanupSharedInstance(); |
34 | 37 |
35 base::TestSuite::Shutdown(); | 38 base::TestSuite::Shutdown(); |
36 } | 39 } |
OLD | NEW |