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 #endif | 34 #elif defined(OS_POSIX) |
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); | |
tony
2012/02/06 18:37:25
As I mentioned in https://chromiumcodereview.appsp
| |
39 #endif // defined(OS_MACOSX) | |
35 | 40 |
36 // Force unittests to run using en-US so if we test against string | 41 // Force unittests to run using en-US so if we test against string |
37 // output, it'll pass regardless of the system language. | 42 // output, it'll pass regardless of the system language. |
38 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US"); | 43 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US"); |
39 ui::CompositorTestSupport::Initialize(); | 44 ui::CompositorTestSupport::Initialize(); |
40 ui::SetupTestCompositor(); | 45 ui::SetupTestCompositor(); |
41 } | 46 } |
42 | 47 |
43 void AuraShellTestSuite::Shutdown() { | 48 void AuraShellTestSuite::Shutdown() { |
44 ui::CompositorTestSupport::Terminate(); | 49 ui::CompositorTestSupport::Terminate(); |
45 ui::ResourceBundle::CleanupSharedInstance(); | 50 ui::ResourceBundle::CleanupSharedInstance(); |
46 base::TestSuite::Shutdown(); | 51 base::TestSuite::Shutdown(); |
47 } | 52 } |
48 | 53 |
49 } // namespace test | 54 } // namespace test |
50 } // namespace ash | 55 } // namespace ash |
OLD | NEW |