| Index: chrome/browser/component_updater/test/component_updater_service_unittest.cc
|
| diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.cc b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
|
| index 90bb0de7f8d2eb58164bee0d690e47855b70d1d6..f36b90b9e96cb8fff9d618a1f45af3625b115bf8 100644
|
| --- a/chrome/browser/component_updater/test/component_updater_service_unittest.cc
|
| +++ b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
|
| @@ -14,10 +14,10 @@
|
| #include "base/strings/stringprintf.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/component_updater/component_updater_resource_throttle.h"
|
| -#include "chrome/browser/component_updater/test/test_configurator.h"
|
| -#include "chrome/browser/component_updater/test/test_installer.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "components/component_updater/component_updater_utils.h"
|
| +#include "components/component_updater/test/test_configurator.h"
|
| +#include "components/component_updater/test/test_installer.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/resource_controller.h"
|
| #include "content/public/browser/resource_request_info.h"
|
| @@ -43,23 +43,6 @@ MockServiceObserver::MockServiceObserver() {
|
| MockServiceObserver::~MockServiceObserver() {
|
| }
|
|
|
| -bool PartialMatch::Match(const std::string& actual) const {
|
| - return actual.find(expected_) != std::string::npos;
|
| -}
|
| -
|
| -InterceptorFactory::InterceptorFactory()
|
| - : URLRequestPostInterceptorFactory(POST_INTERCEPT_SCHEME,
|
| - POST_INTERCEPT_HOSTNAME) {
|
| -}
|
| -
|
| -InterceptorFactory::~InterceptorFactory() {
|
| -}
|
| -
|
| -URLRequestPostInterceptor* InterceptorFactory::CreateInterceptor() {
|
| - return URLRequestPostInterceptorFactory::CreateInterceptor(
|
| - base::FilePath::FromUTF8Unsafe(POST_INTERCEPT_PATH));
|
| -}
|
| -
|
| ComponentUpdaterTest::ComponentUpdaterTest()
|
| : test_config_(NULL),
|
| thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
|
| @@ -67,10 +50,6 @@ ComponentUpdaterTest::ComponentUpdaterTest()
|
| test_config_ = new TestConfigurator;
|
| component_updater_.reset(ComponentUpdateServiceFactory(test_config_));
|
|
|
| - // The test directory is chrome/test/data/components.
|
| - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
|
| - test_data_dir_ = test_data_dir_.AppendASCII("components");
|
| -
|
| net::URLFetcher::SetEnableInterceptionForTests(true);
|
| }
|
|
|
| @@ -97,7 +76,10 @@ ComponentUpdateService* ComponentUpdaterTest::component_updater() {
|
|
|
| // Makes the full path to a component updater test file.
|
| const base::FilePath ComponentUpdaterTest::test_file(const char* file) {
|
| - return test_data_dir_.AppendASCII(file);
|
| + base::FilePath path;
|
| + PathService::Get(base::DIR_SOURCE_ROOT, &path);
|
| + return path.AppendASCII("components").AppendASCII("test").AppendASCII("data")
|
| + .AppendASCII("component_updater").AppendASCII(file);
|
| }
|
|
|
| TestConfigurator* ComponentUpdaterTest::test_configurator() {
|
|
|