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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc

Issue 2546273002: Record DRP histogram on how long back savings were cleared (Closed)
Patch Set: asvitkine comments Created 4 years 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/core/browser/data_reduction_proxy_compression_stats_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc
index 31a62cc287de196682e27d5291cf28bbb43e2feb..533156d478b4ca3a6882eeca65d44f56f28e715d 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc
@@ -999,6 +999,7 @@ TEST_F(DataReductionProxyCompressionStatsTest, BackwardAndForwardOneDay) {
}
TEST_F(DataReductionProxyCompressionStatsTest, BackwardTwoDays) {
+ base::HistogramTester histogram_tester;
const int64_t kOriginalLength = 200;
const int64_t kReceivedLength = 100;
int64_t original[] = {kOriginalLength};
@@ -1016,6 +1017,10 @@ TEST_F(DataReductionProxyCompressionStatsTest, BackwardTwoDays) {
original, 1, received, 1,
original, 1, received, 1,
original, 1, received, 1);
+ histogram_tester.ExpectUniqueSample(
+ "DataReductionProxy.CountSavingsCleared.NegativeSystemClock", 1, 1);
+ VerifyPrefInt64(prefs::kDataReductionProxySavingsClearedNegativeSystemClock,
+ FakeNow().ToInternalValue());
}
TEST_F(DataReductionProxyCompressionStatsTest, NormalizeHostname) {

Powered by Google App Engine
This is Rietveld 408576698