#ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_TEST_HELPER_H_
#define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_TEST_HELPER_H_
#include <memory>
#include <set>
#include <string>
#include "extensions/browser/updater/extension_cache.h"
#include "extensions/browser/updater/extension_downloader.h"
#include "extensions/browser/updater/extension_downloader_delegate.h"
#include "extensions/browser/updater/extension_downloader_types.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace extensions {
const extern net::BackoffEntry::Policy kZeroBackoffPolicy;
class MockExtensionDownloaderDelegate
: public ::testing::NiceMock<ExtensionDownloaderDelegate> { … };
class MockExtensionCache : public ExtensionCache { … };
class ExtensionDownloaderTestHelper { … };
ExtensionDownloaderTask CreateDownloaderTask(const ExtensionId& id,
const GURL& update_url = { … };
void AddExtensionToFetchDataForTesting(ManifestFetchData* fetch_data,
const ExtensionId& id,
const std::string& version,
const GURL& update_url,
DownloadPingData ping_data);
void AddExtensionToFetchDataForTesting(ManifestFetchData* fetch_data,
const ExtensionId& id,
const std::string& version,
const GURL& update_url);
struct UpdateManifestItem { … };
std::string CreateUpdateManifest(
const std::vector<UpdateManifestItem>& extensions);
}
#endif