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

Unified Diff: chrome/browser/metrics/variations/variations_service_unittest.cc

Issue 238443008: Make VariationsService simulate received seeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/variations/variations_service_unittest.cc
===================================================================
--- chrome/browser/metrics/variations/variations_service_unittest.cc (revision 269404)
+++ chrome/browser/metrics/variations/variations_service_unittest.cc (working copy)
@@ -39,7 +39,7 @@
public:
TestVariationsService(TestRequestAllowedNotifier* test_notifier,
PrefService* local_state)
- : VariationsService(test_notifier, local_state),
+ : VariationsService(test_notifier, local_state, NULL),
intercepts_fetch_(true),
fetch_attempted_(false),
seed_stored_(false) {
@@ -296,15 +296,15 @@
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
- VariationsService variations_service(new TestRequestAllowedNotifier, &prefs);
+ VariationsService service(new TestRequestAllowedNotifier, &prefs, NULL);
for (size_t i = 0; i < arraysize(non_ok_status_codes); ++i) {
net::TestURLFetcherFactory factory;
- variations_service.DoActualFetch();
+ service.DoActualFetch();
EXPECT_TRUE(prefs.FindPreference(prefs::kVariationsSeed)->IsDefaultValue());
net::TestURLFetcher* fetcher = factory.GetFetcherByID(0);
SimulateServerResponse(non_ok_status_codes[i], fetcher);
- variations_service.OnURLFetchComplete(fetcher);
+ service.OnURLFetchComplete(fetcher);
EXPECT_TRUE(prefs.FindPreference(prefs::kVariationsSeed)->IsDefaultValue());
}
@@ -317,15 +317,15 @@
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
- VariationsService variations_service(new TestRequestAllowedNotifier, &prefs);
+ VariationsService service(new TestRequestAllowedNotifier, &prefs, NULL);
net::TestURLFetcherFactory factory;
- variations_service.DoActualFetch();
+ service.DoActualFetch();
EXPECT_TRUE(
prefs.FindPreference(prefs::kVariationsSeedDate)->IsDefaultValue());
net::TestURLFetcher* fetcher = factory.GetFetcherByID(0);
SimulateServerResponse(net::HTTP_NOT_MODIFIED, fetcher);
- variations_service.OnURLFetchComplete(fetcher);
+ service.OnURLFetchComplete(fetcher);
EXPECT_FALSE(
prefs.FindPreference(prefs::kVariationsSeedDate)->IsDefaultValue());
}
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698