| 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" |
| 11 | 11 |
| 12 #include "app/app_paths.h" | 12 #include "app/app_paths.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/stats_table.h" | 14 #include "base/stats_table.h" |
| 15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/ref_counted.h" | 17 #include "base/ref_counted.h" |
| 18 #include "base/scoped_nsautorelease_pool.h" | 18 #include "base/scoped_nsautorelease_pool.h" |
| 19 #include "base/test/test_suite.h" | 19 #include "base/test/test_suite.h" |
| 20 #include "chrome/app/scoped_ole_initializer.h" | 20 #include "chrome/app/scoped_ole_initializer.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
| 23 #include "chrome/common/chrome_paths.h" | 23 #include "chrome/common/chrome_paths.h" |
| 24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 25 #include "chrome/common/url_constants.h" |
| 25 #include "chrome/test/testing_browser_process.h" | 26 #include "chrome/test/testing_browser_process.h" |
| 26 #include "net/base/mock_host_resolver.h" | 27 #include "net/base/mock_host_resolver.h" |
| 27 #include "net/base/net_util.h" | 28 #include "net/base/net_util.h" |
| 28 | 29 |
| 29 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
| 30 #include "base/mac_util.h" | 31 #include "base/mac_util.h" |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 #if defined(OS_POSIX) | 34 #if defined(OS_POSIX) |
| 34 #include "base/shared_memory.h" | 35 #include "base/shared_memory.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 stats_table_(NULL) { | 88 stats_table_(NULL) { |
| 88 } | 89 } |
| 89 | 90 |
| 90 protected: | 91 protected: |
| 91 | 92 |
| 92 virtual void Initialize() { | 93 virtual void Initialize() { |
| 93 base::ScopedNSAutoreleasePool autorelease_pool; | 94 base::ScopedNSAutoreleasePool autorelease_pool; |
| 94 | 95 |
| 95 TestSuite::Initialize(); | 96 TestSuite::Initialize(); |
| 96 | 97 |
| 98 chrome::RegisterChromeSchemes(); |
| 97 host_resolver_proc_ = new WarningHostResolverProc(); | 99 host_resolver_proc_ = new WarningHostResolverProc(); |
| 98 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); | 100 scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); |
| 99 | 101 |
| 100 chrome::RegisterPathProvider(); | 102 chrome::RegisterPathProvider(); |
| 101 app::RegisterPathProvider(); | 103 app::RegisterPathProvider(); |
| 102 g_browser_process = new TestingBrowserProcess; | 104 g_browser_process = new TestingBrowserProcess; |
| 103 | 105 |
| 104 // Notice a user data override, and otherwise default to using a custom | 106 // Notice a user data override, and otherwise default to using a custom |
| 105 // user data directory that lives alongside the current app. | 107 // user data directory that lives alongside the current app. |
| 106 // NOTE: The user data directory will be erased before each UI test that | 108 // NOTE: The user data directory will be erased before each UI test that |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // The name used for the stats file so it can be cleaned up on posix during | 169 // The name used for the stats file so it can be cleaned up on posix during |
| 168 // test shutdown. | 170 // test shutdown. |
| 169 std::string stats_filename_; | 171 std::string stats_filename_; |
| 170 | 172 |
| 171 ScopedOleInitializer ole_initializer_; | 173 ScopedOleInitializer ole_initializer_; |
| 172 scoped_refptr<WarningHostResolverProc> host_resolver_proc_; | 174 scoped_refptr<WarningHostResolverProc> host_resolver_proc_; |
| 173 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; | 175 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 178 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
| OLD | NEW |