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

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

Issue 888713002: DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Webview fix Created 5 years, 10 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/core/browser/data_reduction_proxy_metrics_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
index 64b0ed12d67ddc786613a378f069fa1496a7962f..4584d6c605524220360b98bd7d570a75fe5314a5 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
@@ -91,42 +91,6 @@ class ChromeNetworkDataSavingMetricsTest : public testing::Test {
scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs_;
};
-TEST_F(ChromeNetworkDataSavingMetricsTest, TotalLengths) {
- const int64 kOriginalLength = 200;
- const int64 kReceivedLength = 100;
-
- UpdateContentLengthPrefs(
- kReceivedLength, kOriginalLength,
- pref_service_.GetBoolean(
- data_reduction_proxy::prefs::kDataReductionProxyEnabled),
- UNKNOWN_TYPE, statistics_prefs_.get());
-
- EXPECT_EQ(kReceivedLength,
- statistics_prefs_->GetInt64(
- data_reduction_proxy::prefs::kHttpReceivedContentLength));
- EXPECT_FALSE(pref_service_.GetBoolean(
- data_reduction_proxy::prefs::kDataReductionProxyEnabled));
- EXPECT_EQ(kOriginalLength,
- statistics_prefs_->GetInt64(
- data_reduction_proxy::prefs::kHttpOriginalContentLength));
-
- // Record the same numbers again, and total lengths should be doubled.
- UpdateContentLengthPrefs(
- kReceivedLength, kOriginalLength,
- pref_service_.GetBoolean(
- data_reduction_proxy::prefs::kDataReductionProxyEnabled),
- UNKNOWN_TYPE, statistics_prefs_.get());
-
- EXPECT_EQ(kReceivedLength * 2,
- statistics_prefs_->GetInt64(
- data_reduction_proxy::prefs::kHttpReceivedContentLength));
- EXPECT_FALSE(pref_service_.GetBoolean(
- data_reduction_proxy::prefs::kDataReductionProxyEnabled));
- EXPECT_EQ(kOriginalLength * 2,
- statistics_prefs_->GetInt64(
- data_reduction_proxy::prefs::kHttpOriginalContentLength));
-}
-
// The initial last update time used in test. There is no leap second a few
// days around this time used in the test.
// Note: No time zone is specified. Local time will be assumed by

Powered by Google App Engine
This is Rietveld 408576698