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 "ash/test/test_suite.h" | 5 #include "ash/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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 : TestSuite(argc, argv) {} | 24 : TestSuite(argc, argv) {} |
25 | 25 |
26 void AuraShellTestSuite::Initialize() { | 26 void AuraShellTestSuite::Initialize() { |
27 base::TestSuite::Initialize(); | 27 base::TestSuite::Initialize(); |
28 | 28 |
29 gfx::RegisterPathProvider(); | 29 gfx::RegisterPathProvider(); |
30 ui::RegisterPathProvider(); | 30 ui::RegisterPathProvider(); |
31 | 31 |
32 #if defined(OS_MACOSX) | 32 #if defined(OS_MACOSX) |
33 ash::test::OverrideFrameworkBundle(); | 33 ash::test::OverrideFrameworkBundle(); |
34 #elif defined(OS_POSIX) | 34 #endif |
35 FilePath pak_dir; | |
36 PathService::Get(base::DIR_MODULE, &pak_dir); | |
37 pak_dir = pak_dir.AppendASCII("aura_shell_unittests_strings"); | |
38 PathService::Override(ui::DIR_LOCALES, pak_dir); | |
39 #endif // defined(OS_MACOSX) | |
40 | 35 |
41 // Force unittests to run using en-US so if we test against string | 36 // Force unittests to run using en-US so if we test against string |
42 // output, it'll pass regardless of the system language. | 37 // output, it'll pass regardless of the system language. |
43 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US"); | 38 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US"); |
44 ui::CompositorTestSupport::Initialize(); | 39 ui::CompositorTestSupport::Initialize(); |
45 ui::SetupTestCompositor(); | 40 ui::SetupTestCompositor(); |
46 } | 41 } |
47 | 42 |
48 void AuraShellTestSuite::Shutdown() { | 43 void AuraShellTestSuite::Shutdown() { |
49 ui::CompositorTestSupport::Terminate(); | 44 ui::CompositorTestSupport::Terminate(); |
50 ui::ResourceBundle::CleanupSharedInstance(); | 45 ui::ResourceBundle::CleanupSharedInstance(); |
51 base::TestSuite::Shutdown(); | 46 base::TestSuite::Shutdown(); |
52 } | 47 } |
53 | 48 |
54 } // namespace test | 49 } // namespace test |
55 } // namespace ash | 50 } // namespace ash |
OLD | NEW |