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

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

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: canBeNested move out of the switch. Created 5 years, 4 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/webdocument/WebTextTest.java
diff --git a/javatests/org/chromium/distiller/webdocument/WebTextTest.java b/javatests/org/chromium/distiller/webdocument/WebTextTest.java
index e5064911ac219a441b7070f415fa8ccb658d82a8..d0b7f6c24a8cd11d7c0e7b6a12961bed72120665 100644
--- a/javatests/org/chromium/distiller/webdocument/WebTextTest.java
+++ b/javatests/org/chromium/distiller/webdocument/WebTextTest.java
@@ -91,4 +91,19 @@ public class WebTextTest extends DomDistillerJsTestCase {
String want = "<p>Words<br>split<br>with<br>lines</p>";
assertEquals(want, TestUtil.removeAllDirAttributes(got));
}
+
+ public void testGenerateOutputLIElements() {
+ Element container = Document.get().createLIElement();
+ mBody.appendChild(container);
+
+ container.appendChild(TestUtil.createText("Some text content 1."));
+
+ WebTextBuilder builder = new WebTextBuilder();
+ builder.textNode(Text.as(container.getChild(0)), 0);
+
+ WebText text = builder.build(0);
+ String got = text.generateOutput(false);
+ String want = "Some text content 1.";
+ assertEquals(want, TestUtil.removeAllDirAttributes(got));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698