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

Unified Diff: components/dom_distiller/core/page_features_unittest.cc

Issue 1680103003: Match the derived features to the training data set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style Created 4 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
« no previous file with comments | « components/dom_distiller/core/page_features.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/page_features_unittest.cc
diff --git a/components/dom_distiller/core/page_features_unittest.cc b/components/dom_distiller/core/page_features_unittest.cc
index 50db3d9ef536bef25da316298e02653cfdd64563..eaea31e110732002ff692caeffccb9e2e8c6d58a 100644
--- a/components/dom_distiller/core/page_features_unittest.cc
+++ b/components/dom_distiller/core/page_features_unittest.cc
@@ -169,6 +169,26 @@ TEST(DomDistillerPageFeaturesTest, TestPath3) {
EXPECT_EQ(0, lround(derived[11]));
EXPECT_EQ(0, lround(derived[12]));
EXPECT_EQ(0, lround(derived[13]));
- EXPECT_EQ(0, lround(derived[14]));
+ EXPECT_EQ(1, lround(derived[14]));
+}
+
+TEST(DomDistillerPageFeaturesTest, TestPath4) {
+ GURL url("https://example.com/trailing/");
+
+ std::vector<double> derived(DeriveFromPath(url));
+ EXPECT_EQ(0, lround(derived[1]));
+ EXPECT_EQ(0, lround(derived[2]));
+ EXPECT_EQ(0, lround(derived[3]));
+ EXPECT_EQ(0, lround(derived[4]));
+ EXPECT_EQ(0, lround(derived[5]));
+ EXPECT_EQ(0, lround(derived[6]));
+ EXPECT_EQ(0, lround(derived[7]));
+ EXPECT_EQ(0, lround(derived[8]));
+ EXPECT_EQ(10, lround(derived[9]));
+ EXPECT_EQ(0, lround(derived[10]));
+ EXPECT_EQ(1, lround(derived[11]));
+ EXPECT_EQ(0, lround(derived[12]));
+ EXPECT_EQ(0, lround(derived[13]));
+ EXPECT_EQ(9, lround(derived[14]));
}
}
« no previous file with comments | « components/dom_distiller/core/page_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698