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

Unified Diff: components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc

Issue 1248643004: Test distillability without JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@early
Patch Set: move tests, remove dbg msg Created 5 years, 3 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/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
diff --git a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
index 7723e67be4ba7562186e4a9ee7b123dc39a25629..644e342267e7d51da589d9fa56150c1aa3567f42 100644
--- a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
+++ b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
@@ -127,53 +127,4 @@ IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
ASSERT_FALSE(holder.GetResult());
}
-IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
- TestIsDistillablePage) {
- scoped_ptr<AdaBoostProto> proto(new AdaBoostProto);
- proto->set_num_features(kDerivedFeaturesCount);
- proto->set_num_stumps(1);
-
- StumpProto* stump = proto->add_stump();
- stump->set_feature_number(0);
- stump->set_weight(1);
- stump->set_split(-1);
- scoped_ptr<DistillablePageDetector> detector(
- new DistillablePageDetector(proto.Pass()));
- EXPECT_DOUBLE_EQ(0.5, detector->GetThreshold());
- // The first value of the first feature is either 0 or 1. Since the stump's
- // split is -1, the stump weight will be applied to any set of derived
- // features.
- LoadURL(kArticlePath);
- base::RunLoop run_loop_;
- ResultHolder holder(run_loop_.QuitClosure());
- IsDistillablePageForDetector(shell()->web_contents(), detector.get(),
- holder.GetCallback());
- run_loop_.Run();
- ASSERT_TRUE(holder.GetResult());
-}
-
-IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
- TestIsNotDistillablePage) {
- scoped_ptr<AdaBoostProto> proto(new AdaBoostProto);
- proto->set_num_features(kDerivedFeaturesCount);
- proto->set_num_stumps(1);
- StumpProto* stump = proto->add_stump();
- stump->set_feature_number(0);
- stump->set_weight(-1);
- stump->set_split(-1);
- scoped_ptr<DistillablePageDetector> detector(
- new DistillablePageDetector(proto.Pass()));
- EXPECT_DOUBLE_EQ(-0.5, detector->GetThreshold());
- // The first value of the first feature is either 0 or 1. Since the stump's
- // split is -1, the stump weight will be applied to any set of derived
- // features.
- LoadURL(kArticlePath);
- base::RunLoop run_loop_;
- ResultHolder holder(run_loop_.QuitClosure());
- IsDistillablePageForDetector(shell()->web_contents(), detector.get(),
- holder.GetCallback());
- run_loop_.Run();
- ASSERT_FALSE(holder.GetResult());
-}
-
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698