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

Unified Diff: net/sdch/sdch_owner_unittest.cc

Issue 1051353003: SDCH: add TimeWeightedMemoryUse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: net/sdch/sdch_owner_unittest.cc
diff --git a/net/sdch/sdch_owner_unittest.cc b/net/sdch/sdch_owner_unittest.cc
index ebcbd02b3d358dddfa4206ea4655ada12c69c7d4..1dcbc756f2219d5bfe24f3a7df2425d2f688c1d4 100644
--- a/net/sdch/sdch_owner_unittest.cc
+++ b/net/sdch/sdch_owner_unittest.cc
@@ -6,6 +6,7 @@
#include "base/prefs/testing_pref_store.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
+#include "base/test/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/values.h"
#include "net/base/net_log.h"
@@ -417,11 +418,15 @@ TEST_F(SdchOwnerTest, ConfirmAutoEviction) {
EXPECT_TRUE(DictionaryPresentInManager(server_hash_d1));
EXPECT_TRUE(DictionaryPresentInManager(server_hash_d2));
+ base::HistogramTester tester;
+
EXPECT_TRUE(
CreateAndAddDictionary(kMaxSizeForTesting / 2, &server_hash_d3, fresh));
EXPECT_TRUE(DictionaryPresentInManager(server_hash_d1));
EXPECT_FALSE(DictionaryPresentInManager(server_hash_d2));
EXPECT_TRUE(DictionaryPresentInManager(server_hash_d3));
+
+ tester.ExpectTotalCount("Sdch3.TimeWeightedMemoryUse", 1);
}
// Confirm auto-eviction happens if space is needed, with a more complicated

Powered by Google App Engine
This is Rietveld 408576698