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

Unified Diff: chrome/browser/net/predictor_unittest.cc

Issue 2084093002: Use lossy prefs in the net predictor, and update them more frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@predictor_lru
Patch Set: kill waitable event references Created 4 years, 5 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/net/predictor_tab_helper.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_unittest.cc
diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc
index 465f949011e26d84026c1493f76737845dbef3ee..9a6939e09deb16d99878169c326900be9da31fe8 100644
--- a/chrome/browser/net/predictor_unittest.cc
+++ b/chrome/browser/net/predictor_unittest.cc
@@ -153,7 +153,7 @@ TEST_F(PredictorTest, StartupShutdownTest) {
TEST_F(PredictorTest, ReferrerSerializationNilTest) {
Predictor predictor(true, true);
- std::unique_ptr<base::ListValue> referral_list(NewEmptySerializationList());
+ std::unique_ptr<base::ListValue> referral_list(new base::ListValue);
predictor.SerializeReferrers(referral_list.get());
EXPECT_EQ(1U, referral_list->GetSize());
EXPECT_FALSE(GetDataFromSerialization(
@@ -385,10 +385,12 @@ TEST_F(PredictorTest, DiscardPredictorResults) {
GURL host_2("http://test_2");
predictor.LearnFromNavigation(host_1, host_2);
+ referral_list.Clear();
predictor.SerializeReferrers(&referral_list);
EXPECT_EQ(2U, referral_list.GetSize());
predictor.DiscardAllResults();
+ referral_list.Clear();
predictor.SerializeReferrers(&referral_list);
EXPECT_EQ(1U, referral_list.GetSize());
« no previous file with comments | « chrome/browser/net/predictor_tab_helper.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698