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

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

Issue 59953005: Store prefs::kVariationsSeedDate on a variations server 304. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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') | no next file » | 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 232403)
+++ chrome/browser/metrics/variations/variations_service_unittest.cc (working copy)
@@ -383,4 +383,24 @@
}
}
+TEST_F(VariationsServiceTest, SeedDateUpdatedOn304Status) {
+ base::MessageLoop message_loop;
+ content::TestBrowserThread io_thread(content::BrowserThread::IO,
+ &message_loop);
+ TestingPrefServiceSimple prefs;
+ VariationsService::RegisterPrefs(prefs.registry());
+
+ VariationsService variations_service(new TestRequestAllowedNotifier, &prefs);
+ net::TestURLFetcherFactory factory;
+ variations_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);
+ EXPECT_FALSE(
+ prefs.FindPreference(prefs::kVariationsSeedDate)->IsDefaultValue());
+}
+
} // namespace chrome_variations
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698