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

Unified Diff: javatests/org/chromium/distiller/ContentExtractorTest.java

Issue 2401853004: Strip unwanted classNames from all nodes (Closed)
Patch Set: address comments Created 4 years, 2 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: javatests/org/chromium/distiller/ContentExtractorTest.java
diff --git a/javatests/org/chromium/distiller/ContentExtractorTest.java b/javatests/org/chromium/distiller/ContentExtractorTest.java
index 83a0a12e152a5ec4885688f8c2583a23792ea261..e4972885a3abafb51aa9059e0593ff55ced85f84 100644
--- a/javatests/org/chromium/distiller/ContentExtractorTest.java
+++ b/javatests/org/chromium/distiller/ContentExtractorTest.java
@@ -651,4 +651,16 @@ public class ContentExtractorTest extends DomDistillerJsTestCase {
assertExtractor(expected, html);
}
+
+ public void testStripUnwantedClassNames() {
+ final String html =
+ "<p class=\"test\">" + CONTENT_TEXT + "</p>" +
+ "<p class=\"iscaption\">" + CONTENT_TEXT + "</p>";
+
+ final String expected =
+ "<p>" + CONTENT_TEXT + "</p>" +
+ "<p class=\"caption\">" + CONTENT_TEXT + "</p>";
+
+ assertExtractor(expected, html);
+ }
}
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebText.java ('k') | javatests/org/chromium/distiller/DomUtilTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698