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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include "base/stats_table.h" | 10 #include "base/stats_table.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/scoped_nsautorelease_pool.h" | 13 #include "base/scoped_nsautorelease_pool.h" |
14 #include "base/test_suite.h" | 14 #include "base/test_suite.h" |
| 15 #include "chrome/app/scoped_ole_initializer.h" |
15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
16 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
17 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
18 #if defined(OS_WIN) || defined(OS_LINUX) | 19 #if defined(OS_WIN) || defined(OS_LINUX) |
19 // TODO(port): Remove the #ifdef when ResourceBundle is ported. | 20 // TODO(port): Remove the #ifdef when ResourceBundle is ported. |
20 #include "chrome/common/resource_bundle.h" | 21 #include "chrome/common/resource_bundle.h" |
21 #endif | 22 #endif |
22 #include "chrome/test/testing_browser_process.h" | 23 #include "chrome/test/testing_browser_process.h" |
23 | 24 |
24 class ChromeTestSuite : public TestSuite { | 25 class ChromeTestSuite : public TestSuite { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // TODO(port): Remove the #ifdef when ResourceBundle is ported. | 72 // TODO(port): Remove the #ifdef when ResourceBundle is ported. |
72 ResourceBundle::CleanupSharedInstance(); | 73 ResourceBundle::CleanupSharedInstance(); |
73 #endif | 74 #endif |
74 | 75 |
75 delete g_browser_process; | 76 delete g_browser_process; |
76 g_browser_process = NULL; | 77 g_browser_process = NULL; |
77 | 78 |
78 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 79 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
79 StatsTable::set_current(NULL); | 80 StatsTable::set_current(NULL); |
80 delete stats_table_; | 81 delete stats_table_; |
81 | 82 |
82 TestSuite::Shutdown(); | 83 TestSuite::Shutdown(); |
83 } | 84 } |
84 | 85 |
85 StatsTable* stats_table_; | 86 StatsTable* stats_table_; |
| 87 ScopedOleInitializer ole_initializer_; |
86 }; | 88 }; |
87 | 89 |
88 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 90 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
OLD | NEW |