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

Unified Diff: javatests/org/chromium/distiller/webdocument/ElementActionTest.java

Issue 2596283004: Use stricter comment-detecting heuristics (Closed)
Patch Set: Created 4 years 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: javatests/org/chromium/distiller/webdocument/ElementActionTest.java
diff --git a/javatests/org/chromium/distiller/webdocument/ElementActionTest.java b/javatests/org/chromium/distiller/webdocument/ElementActionTest.java
index 5d4bfbe9e44d2769d40211ec5dfa022cbd3c4ac9..5b941e7c872854a61a339ee5ec397e9d7bd9ef6e 100644
--- a/javatests/org/chromium/distiller/webdocument/ElementActionTest.java
+++ b/javatests/org/chromium/distiller/webdocument/ElementActionTest.java
@@ -108,10 +108,12 @@ public class ElementActionTest extends DomDistillerJsTestCase {
DefaultLabels.STRICTLY_NOT_CONTENT));
assertTrue(hasLabel(getForHtml("<div id=\"comments\"></div>"),
DefaultLabels.STRICTLY_NOT_CONTENT));
-
assertTrue(hasLabel(getForHtml("<div class=\"user-comments\"></div>"),
DefaultLabels.STRICTLY_NOT_CONTENT));
+ assertFalse(hasLabel(getForHtml("<article class=\"user-comments\"></div>"),
+ DefaultLabels.STRICTLY_NOT_CONTENT));
+
/**
* Element.getClassName() returns SVGAnimatedString for SvgElement
* https://code.google.com/p/google-web-toolkit/issues/detail?id=9195
@@ -123,7 +125,7 @@ public class ElementActionTest extends DomDistillerJsTestCase {
"class1 class2 class3 class4 class5 class6 class7 class8\"></div>"),
DefaultLabels.STRICTLY_NOT_CONTENT));
assertTrue(hasLabel(getForHtml(
- "<div class=\" user-comments a b \"></div>"),
+ "<div class=\" user-comments a \"></div>"),
DefaultLabels.STRICTLY_NOT_CONTENT));
}
}

Powered by Google App Engine
This is Rietveld 408576698