OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 5 #ifndef CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
6 #define CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 6 #define CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Look in the framework bundle for resources. | 101 // Look in the framework bundle for resources. |
102 FilePath path; | 102 FilePath path; |
103 PathService::Get(base::DIR_EXE, &path); | 103 PathService::Get(base::DIR_EXE, &path); |
104 path = path.Append(chrome::kFrameworkName); | 104 path = path.Append(chrome::kFrameworkName); |
105 mac_util::SetOverrideAppBundlePath(path); | 105 mac_util::SetOverrideAppBundlePath(path); |
106 #endif | 106 #endif |
107 | 107 |
108 // Force unittests to run using en-US so if we test against string | 108 // Force unittests to run using en-US so if we test against string |
109 // output, it'll pass regardless of the system language. | 109 // output, it'll pass regardless of the system language. |
110 ResourceBundle::InitSharedInstance(L"en-US"); | 110 ResourceBundle::InitSharedInstance(L"en-US"); |
111 ResourceBundle::GetSharedInstance().LoadThemeResources(); | |
112 | 111 |
113 // initialize the global StatsTable for unit_tests | 112 // initialize the global StatsTable for unit_tests |
114 std::string statsfile = "unit_tests"; | 113 std::string statsfile = "unit_tests"; |
115 std::string pid_string = StringPrintf("-%d", base::GetCurrentProcId()); | 114 std::string pid_string = StringPrintf("-%d", base::GetCurrentProcId()); |
116 statsfile += pid_string; | 115 statsfile += pid_string; |
117 stats_table_ = new StatsTable(statsfile, 20, 200); | 116 stats_table_ = new StatsTable(statsfile, 20, 200); |
118 StatsTable::set_current(stats_table_); | 117 StatsTable::set_current(stats_table_); |
119 } | 118 } |
120 | 119 |
121 virtual void Shutdown() { | 120 virtual void Shutdown() { |
(...skipping 20 matching lines...) Expand all Loading... |
142 TestSuite::Shutdown(); | 141 TestSuite::Shutdown(); |
143 } | 142 } |
144 | 143 |
145 StatsTable* stats_table_; | 144 StatsTable* stats_table_; |
146 ScopedOleInitializer ole_initializer_; | 145 ScopedOleInitializer ole_initializer_; |
147 scoped_refptr<WarningHostResolverProc> host_resolver_proc_; | 146 scoped_refptr<WarningHostResolverProc> host_resolver_proc_; |
148 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; | 147 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; |
149 }; | 148 }; |
150 | 149 |
151 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 150 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
OLD | NEW |