Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h

Issue 338723002: Add probe to warm data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
index eae8bae018e4d2e0bf16678b97cd3f613bb3dcd7..fbe4d4547463a7566a99044b99c1a950057afa2d 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
@@ -61,7 +61,8 @@ class MockDataReductionProxySettings : public C {
DataReductionProxyParams::kPromoAllowed)) {}
MockDataReductionProxySettings<C>(int flags)
: C(new DataReductionProxyParams(flags)) {}
- MOCK_METHOD0(GetURLFetcher, net::URLFetcher*());
+ MOCK_METHOD0(GetURLFetcherForAvailabilityCheck, net::URLFetcher*());
+ MOCK_METHOD0(GetURLFetcherForWarmup, net::URLFetcher*());
MOCK_METHOD0(GetOriginalProfilePrefs, PrefService*());
MOCK_METHOD0(GetLocalStatePrefs, PrefService*());
MOCK_METHOD3(LogProxyState, void(
@@ -107,11 +108,13 @@ class DataReductionProxySettingsTestBase : public testing::Test {
template <class C> void SetProbeResult(
const std::string& test_url,
+ const std::string& warmup_test_url,
const std::string& response,
ProbeURLFetchResult state,
bool success,
int expected_calls);
virtual void SetProbeResult(const std::string& test_url,
+ const std::string& warmup_test_url,
const std::string& response,
ProbeURLFetchResult result,
bool success,
@@ -122,12 +125,14 @@ class DataReductionProxySettingsTestBase : public testing::Test {
bool expected_fallback_restricted);
void CheckProbe(bool initially_enabled,
const std::string& probe_url,
+ const std::string& warmup_url,
const std::string& response,
bool request_success,
bool expected_enabled,
bool expected_restricted,
bool expected_fallback_restricted);
void CheckProbeOnIPChange(const std::string& probe_url,
+ const std::string& warmup_url,
const std::string& response,
bool request_success,
bool expected_enabled,
@@ -157,12 +162,18 @@ class ConcreteDataReductionProxySettingsTest
}
virtual void SetProbeResult(const std::string& test_url,
+ const std::string& warmup_test_url,
const std::string& response,
ProbeURLFetchResult result,
bool success,
int expected_calls) OVERRIDE {
return DataReductionProxySettingsTestBase::SetProbeResult<C>(
- test_url, response, result, success, expected_calls);
+ test_url,
+ warmup_test_url,
+ response,
+ result,
+ success,
+ expected_calls);
}
};

Powered by Google App Engine
This is Rietveld 408576698