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/test/test_suite.h" | 5 #include "ui/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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 PathService::Override(ui::DIR_LOCALES, pak_dir); | 49 PathService::Override(ui::DIR_LOCALES, pak_dir); |
50 #endif // defined(OS_MACOSX) | 50 #endif // defined(OS_MACOSX) |
51 | 51 |
52 // Force unittests to run using en-US so if we test against string | 52 // Force unittests to run using en-US so if we test against string |
53 // output, it'll pass regardless of the system language. | 53 // output, it'll pass regardless of the system language. |
54 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 54 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
55 | 55 |
56 #if !defined(OS_MACOSX) && defined(OS_POSIX) | 56 #if !defined(OS_MACOSX) && defined(OS_POSIX) |
57 ui::ResourceBundle::GetSharedInstance().AddDataPack( | 57 ui::ResourceBundle::GetSharedInstance().AddDataPack( |
58 pak_dir.AppendASCII("ui_resources.pak"), | 58 pak_dir.AppendASCII("ui_resources.pak"), |
59 ResourceHandle::kScaleFactor100x); | 59 ui::SCALE_FACTOR_100P); |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 void UITestSuite::Shutdown() { | 63 void UITestSuite::Shutdown() { |
64 ui::ResourceBundle::CleanupSharedInstance(); | 64 ui::ResourceBundle::CleanupSharedInstance(); |
65 | 65 |
66 #if defined(OS_MACOSX) | 66 #if defined(OS_MACOSX) |
67 base::mac::SetOverrideFrameworkBundle(NULL); | 67 base::mac::SetOverrideFrameworkBundle(NULL); |
68 #endif | 68 #endif |
69 base::TestSuite::Shutdown(); | 69 base::TestSuite::Shutdown(); |
70 } | 70 } |
71 | 71 |
72 } // namespace test | 72 } // namespace test |
73 } // namespace ui | 73 } // namespace ui |
OLD | NEW |