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

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

Issue 1793583002: Handle drop cap letters (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: add comments Created 4 years, 9 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 | « java/org/chromium/distiller/webdocument/ElementAction.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: javatests/org/chromium/distiller/ContentExtractorTest.java
diff --git a/javatests/org/chromium/distiller/ContentExtractorTest.java b/javatests/org/chromium/distiller/ContentExtractorTest.java
index a30c468fdf13e6353eeaed2d1c74a8312a1c5af3..9429fc110b73ac26f116bb29af88b713948e9a70 100644
--- a/javatests/org/chromium/distiller/ContentExtractorTest.java
+++ b/javatests/org/chromium/distiller/ContentExtractorTest.java
@@ -604,4 +604,31 @@ public class ContentExtractorTest extends DomDistillerJsTestCase {
// Non-article schema.org types should not use the fast path.
assertExtractor(expected, htmlArticle);
}
+
+ public void testDropCap() {
+ String html =
+ "<h1>" +
+ CONTENT_TEXT +
+ "</h1>" +
+ "<p>" +
+ "<strong><span style=\"float: left\">T</span>est</strong>" +
+ CONTENT_TEXT +
+ "</p>";
+
+ final String expected =
+ "<h1>" +
+ CONTENT_TEXT +
+ "</h1>" +
+ "<p>" +
+ "<strong><span>T</span>est</strong>" +
+ CONTENT_TEXT +
+ "</p>";
+
+ mBody.setInnerHTML(html);
+
+ ContentExtractor extractor = new ContentExtractor(mRoot);
+ String extractedContent = extractor.extractContent();
+ assertEquals(expected,
+ TestUtil.removeAllDirAttributes(extractedContent));
+ }
}
« no previous file with comments | « java/org/chromium/distiller/webdocument/ElementAction.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698