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

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

Issue 1513143006: Add <pre> to nesting tags (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: add test Created 5 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/ContentExtractorTest.java
diff --git a/javatests/org/chromium/distiller/ContentExtractorTest.java b/javatests/org/chromium/distiller/ContentExtractorTest.java
index 0b03d6a9dd95b2177f5233aaa61e93beb6229ef7..36ecc5042dabf1e9ac3f773e2c81f4db27c9089c 100644
--- a/javatests/org/chromium/distiller/ContentExtractorTest.java
+++ b/javatests/org/chromium/distiller/ContentExtractorTest.java
@@ -485,6 +485,17 @@ public class ContentExtractorTest extends DomDistillerJsTestCase {
TestUtil.removeAllDirAttributes(extractedContent));
}
+ public void testDiscardBlockquoteWithoutContent() {
+ assertExtractor("", "<BLOCKQUOTE></BLOCKQUOTE>");
+ }
+
+ public void testPreservePre() {
+ final String article = CONTENT_TEXT + CONTENT_TEXT + CONTENT_TEXT;
+ final String html = "<h1>" + CONTENT_TEXT + "</h1><PRE><kbd>" + article + "</kbd></PRE>";
+
+ assertExtractor(html, html);
+ }
+
private void assertExtractor(String expected, String html) {
mBody.setInnerHTML("");
Element div = TestUtil.createDiv(0);
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebTag.java ('k') | javatests/org/chromium/distiller/webdocument/WebTagTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698