| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/test/base/chrome_unit_test_suite.h" | 5 #include "chrome/test/base/chrome_unit_test_suite.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 void ChromeUnitTestSuite::InitializeProviders() { | 120 void ChromeUnitTestSuite::InitializeProviders() { |
| 121 { | 121 { |
| 122 ChromeContentClient content_client; | 122 ChromeContentClient content_client; |
| 123 RegisterContentSchemes(&content_client); | 123 RegisterContentSchemes(&content_client); |
| 124 } | 124 } |
| 125 | 125 |
| 126 chrome::RegisterPathProvider(); | 126 chrome::RegisterPathProvider(); |
| 127 content::RegisterPathProvider(); | 127 content::RegisterPathProvider(); |
| 128 ui::RegisterPathProvider(); | 128 ui::RegisterPathProvider(); |
| 129 component_updater::RegisterPathProvider(chrome::DIR_COMPONENTS, | 129 component_updater::RegisterPathProvider(chrome::DIR_COMPONENTS, |
| 130 chrome::DIR_INTERNAL_PLUGINS, |
| 130 chrome::DIR_USER_DATA); | 131 chrome::DIR_USER_DATA); |
| 131 | 132 |
| 132 #if defined(OS_CHROMEOS) | 133 #if defined(OS_CHROMEOS) |
| 133 chromeos::RegisterPathProvider(); | 134 chromeos::RegisterPathProvider(); |
| 134 #endif | 135 #endif |
| 135 | 136 |
| 136 #if defined(ENABLE_EXTENSIONS) | 137 #if defined(ENABLE_EXTENSIONS) |
| 137 extensions::RegisterPathProvider(); | 138 extensions::RegisterPathProvider(); |
| 138 | 139 |
| 139 extensions::ExtensionsClient::Set( | 140 extensions::ExtensionsClient::Set( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 152 void ChromeUnitTestSuite::InitializeResourceBundle() { | 153 void ChromeUnitTestSuite::InitializeResourceBundle() { |
| 153 // Force unittests to run using en-US so if we test against string | 154 // Force unittests to run using en-US so if we test against string |
| 154 // output, it'll pass regardless of the system language. | 155 // output, it'll pass regardless of the system language. |
| 155 ui::ResourceBundle::InitSharedInstanceWithLocale( | 156 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 156 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 157 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
| 157 base::FilePath resources_pack_path; | 158 base::FilePath resources_pack_path; |
| 158 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 159 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 159 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 160 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 160 resources_pack_path, ui::SCALE_FACTOR_NONE); | 161 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 161 } | 162 } |
| OLD | NEW |