| Index: chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| index 621519076261a713bb7a26c35626e9eecc9e9880..f72c730609138db3d29233ce7433f02f09427cc5 100644
|
| --- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| +++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| @@ -42,10 +42,10 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/test/test_browser_thread.h"
|
| -#include "content/public/test/test_url_fetcher_factory.h"
|
| #include "libxml/globals.h"
|
| #include "net/base/escape.h"
|
| #include "net/base/load_flags.h"
|
| +#include "net/url_request/test_url_fetcher_factory.h"
|
| #include "net/url_request/url_request_status.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -481,7 +481,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| }
|
|
|
| // Set up and start the updater.
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| ExtensionUpdater updater(
|
| &service, service.extension_prefs(), service.pref_service(),
|
| service.profile(), 60*60*24);
|
| @@ -494,7 +494,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| SimulateTimerFired(&updater);
|
|
|
| // Get the url our mock fetcher was asked to fetch.
|
| - TestURLFetcher* fetcher =
|
| + net::TestURLFetcher* fetcher =
|
| factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId);
|
| const GURL& url = fetcher->GetOriginalURL();
|
| EXPECT_FALSE(url.is_empty());
|
| @@ -528,7 +528,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| // Setup and start the updater.
|
| ServiceForManifestTests service;
|
|
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| ExtensionUpdater updater(
|
| &service, service.extension_prefs(), service.pref_service(),
|
| service.profile(), 60*60*24);
|
| @@ -538,7 +538,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| SimulateTimerFired(&updater);
|
|
|
| // Get the url our mock fetcher was asked to fetch.
|
| - TestURLFetcher* fetcher =
|
| + net::TestURLFetcher* fetcher =
|
| factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId);
|
| ASSERT_FALSE(fetcher == NULL);
|
| const GURL& url = fetcher->GetOriginalURL();
|
| @@ -606,7 +606,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| }
|
|
|
| void TestUpdateUrlDataFromGallery(const std::string& gallery_url) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
|
|
| MockService service;
|
| MockExtensionDownloaderDelegate delegate;
|
| @@ -621,7 +621,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
|
|
| downloader.AddExtension(*extensions[0]);
|
| downloader.StartAllPending();
|
| - TestURLFetcher* fetcher =
|
| + net::TestURLFetcher* fetcher =
|
| factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId);
|
| ASSERT_TRUE(fetcher);
|
| // Make sure that extensions that update from the gallery ignore any
|
| @@ -728,8 +728,8 @@ class ExtensionUpdaterTest : public testing::Test {
|
| }
|
|
|
| void TestMultipleManifestDownloading() {
|
| - TestURLFetcherFactory factory;
|
| - TestURLFetcher* fetcher = NULL;
|
| + net::TestURLFetcherFactory factory;
|
| + net::TestURLFetcher* fetcher = NULL;
|
| NotificationsObserver observer;
|
| MockService service;
|
| MockExtensionDownloaderDelegate delegate;
|
| @@ -841,8 +841,8 @@ class ExtensionUpdaterTest : public testing::Test {
|
| }
|
|
|
| void TestSingleExtensionDownloading(bool pending) {
|
| - TestURLFetcherFactory factory;
|
| - TestURLFetcher* fetcher = NULL;
|
| + net::TestURLFetcherFactory factory;
|
| + net::TestURLFetcher* fetcher = NULL;
|
| scoped_ptr<ServiceForDownloadTests> service(new ServiceForDownloadTests);
|
| ExtensionUpdater updater(service.get(), service->extension_prefs(),
|
| service->pref_service(),
|
| @@ -898,8 +898,8 @@ class ExtensionUpdaterTest : public testing::Test {
|
| }
|
|
|
| void TestBlacklistDownloading() {
|
| - TestURLFetcherFactory factory;
|
| - TestURLFetcher* fetcher = NULL;
|
| + net::TestURLFetcherFactory factory;
|
| + net::TestURLFetcher* fetcher = NULL;
|
| ServiceForBlacklistTests service;
|
| ExtensionUpdater updater(
|
| &service, service.extension_prefs(), service.pref_service(),
|
| @@ -946,8 +946,8 @@ class ExtensionUpdaterTest : public testing::Test {
|
| // the test is responsible for creating fake CrxInstallers. Otherwise,
|
| // UpdateExtension() returns false, signaling install failures.
|
| void TestMultipleExtensionDownloading(bool updates_start_running) {
|
| - TestURLFetcherFactory factory;
|
| - TestURLFetcher* fetcher = NULL;
|
| + net::TestURLFetcherFactory factory;
|
| + net::TestURLFetcher* fetcher = NULL;
|
| ServiceForDownloadTests service;
|
| ExtensionUpdater updater(
|
| &service, service.extension_prefs(), service.pref_service(),
|
| @@ -1113,7 +1113,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| int active_ping_days,
|
| bool active_bit,
|
| bool expect_brand_code) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
|
|
| // Set up 2 mock extensions, one with a google.com update url and one
|
| // without.
|
| @@ -1162,7 +1162,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| // Make the updater do manifest fetching, and note the urls it tries to
|
| // fetch.
|
| std::vector<GURL> fetched_urls;
|
| - TestURLFetcher* fetcher =
|
| + net::TestURLFetcher* fetcher =
|
| factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId);
|
| EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL);
|
| fetched_urls.push_back(fetcher->GetOriginalURL());
|
| @@ -1347,7 +1347,7 @@ TEST_F(ExtensionUpdaterTest, TestHandleManifestResults) {
|
| }
|
|
|
| TEST_F(ExtensionUpdaterTest, TestNonAutoUpdateableLocations) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| ServiceForManifestTests service;
|
| ExtensionUpdater updater(&service, service.extension_prefs(),
|
| service.pref_service(), service.profile(),
|
| @@ -1378,7 +1378,7 @@ TEST_F(ExtensionUpdaterTest, TestNonAutoUpdateableLocations) {
|
| }
|
|
|
| TEST_F(ExtensionUpdaterTest, TestUpdatingDisabledExtensions) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| ServiceForManifestTests service;
|
| ExtensionUpdater updater(&service, service.extension_prefs(),
|
| service.pref_service(), service.profile(),
|
| @@ -1416,7 +1416,7 @@ TEST_F(ExtensionUpdaterTest, TestUpdatingDisabledExtensions) {
|
| }
|
|
|
| TEST_F(ExtensionUpdaterTest, TestManifestFetchesBuilderAddExtension) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| MockService service;
|
| MockExtensionDownloaderDelegate delegate;
|
| scoped_ptr<ExtensionDownloader> downloader(
|
| @@ -1461,14 +1461,14 @@ TEST_F(ExtensionUpdaterTest, TestManifestFetchesBuilderAddExtension) {
|
| downloader->StartAllPending();
|
| EXPECT_EQ(1u, ManifestFetchersCount(downloader.get()));
|
|
|
| - TestURLFetcher* fetcher =
|
| + net::TestURLFetcher* fetcher =
|
| factory.GetFetcherByID(ExtensionDownloader::kManifestFetcherId);
|
| ASSERT_TRUE(fetcher);
|
| EXPECT_FALSE(fetcher->GetOriginalURL().is_empty());
|
| }
|
|
|
| TEST_F(ExtensionUpdaterTest, TestStartUpdateCheckMemory) {
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| MockService service;
|
| MockExtensionDownloaderDelegate delegate;
|
| ExtensionDownloader downloader(&delegate, service.request_context());
|
| @@ -1484,7 +1484,7 @@ TEST_F(ExtensionUpdaterTest, TestStartUpdateCheckMemory) {
|
|
|
| TEST_F(ExtensionUpdaterTest, TestCheckSoon) {
|
| ServiceForManifestTests service;
|
| - TestURLFetcherFactory factory;
|
| + net::TestURLFetcherFactory factory;
|
| ExtensionUpdater updater(
|
| &service, service.extension_prefs(), service.pref_service(),
|
| service.profile(), kUpdateFrequencySecs);
|
|
|