| 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 <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "app/app_paths.h" |
| 12 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 13 #include "base/stats_table.h" | 14 #include "base/stats_table.h" |
| 14 #include "base/file_util.h" | 15 #include "base/file_util.h" |
| 15 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
| 16 #include "base/mac_util.h" | 17 #include "base/mac_util.h" |
| 17 #endif | 18 #endif |
| 18 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 19 #include "base/ref_counted.h" | 20 #include "base/ref_counted.h" |
| 20 #include "base/scoped_nsautorelease_pool.h" | 21 #include "base/scoped_nsautorelease_pool.h" |
| 21 #include "base/test_suite.h" | 22 #include "base/test_suite.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 68 |
| 68 virtual void Initialize() { | 69 virtual void Initialize() { |
| 69 base::ScopedNSAutoreleasePool autorelease_pool; | 70 base::ScopedNSAutoreleasePool autorelease_pool; |
| 70 | 71 |
| 71 TestSuite::Initialize(); | 72 TestSuite::Initialize(); |
| 72 | 73 |
| 73 host_mapper_ = new WarningHostMapper(); | 74 host_mapper_ = new WarningHostMapper(); |
| 74 scoped_host_mapper_.Init(host_mapper_.get()); | 75 scoped_host_mapper_.Init(host_mapper_.get()); |
| 75 | 76 |
| 76 chrome::RegisterPathProvider(); | 77 chrome::RegisterPathProvider(); |
| 78 app::RegisterPathProvider(); |
| 77 g_browser_process = new TestingBrowserProcess; | 79 g_browser_process = new TestingBrowserProcess; |
| 78 | 80 |
| 79 // Notice a user data override, and otherwise default to using a custom | 81 // Notice a user data override, and otherwise default to using a custom |
| 80 // user data directory that lives alongside the current app. | 82 // user data directory that lives alongside the current app. |
| 81 // NOTE: The user data directory will be erased before each UI test that | 83 // NOTE: The user data directory will be erased before each UI test that |
| 82 // uses it, in order to ensure consistency. | 84 // uses it, in order to ensure consistency. |
| 83 FilePath user_data_dir = FilePath::FromWStringHack( | 85 FilePath user_data_dir = FilePath::FromWStringHack( |
| 84 CommandLine::ForCurrentProcess()->GetSwitchValue( | 86 CommandLine::ForCurrentProcess()->GetSwitchValue( |
| 85 switches::kUserDataDir)); | 87 switches::kUserDataDir)); |
| 86 if (user_data_dir.empty() && | 88 if (user_data_dir.empty() && |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 TestSuite::Shutdown(); | 138 TestSuite::Shutdown(); |
| 137 } | 139 } |
| 138 | 140 |
| 139 StatsTable* stats_table_; | 141 StatsTable* stats_table_; |
| 140 ScopedOleInitializer ole_initializer_; | 142 ScopedOleInitializer ole_initializer_; |
| 141 scoped_refptr<WarningHostMapper> host_mapper_; | 143 scoped_refptr<WarningHostMapper> host_mapper_; |
| 142 net::ScopedHostMapper scoped_host_mapper_; | 144 net::ScopedHostMapper scoped_host_mapper_; |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ | 147 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ |
| OLD | NEW |