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

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

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Fixed imports order 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/WebTagTest.java
diff --git a/javatests/org/chromium/distiller/webdocument/WebTagTest.java b/javatests/org/chromium/distiller/webdocument/WebTagTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b250e5aca1a4bae2408064ae09cc9165f101544
--- /dev/null
+++ b/javatests/org/chromium/distiller/webdocument/WebTagTest.java
@@ -0,0 +1,33 @@
+package org.chromium.distiller.webdocument;
+
+import org.chromium.distiller.DomDistillerJsTestCase;
+
+public class WebTagTest extends DomDistillerJsTestCase {
+
+ public void testOLGenerateOutput() {
+ WebTag olStartWebTag = new WebTag("ol", WebTag.TagType.START);
+ WebTag olEndWebTag = new WebTag("ol", WebTag.TagType.END);
+ String startResult = olStartWebTag.generateOutput(false);
+ String endResult = olEndWebTag.generateOutput(false);
+ assertEquals(startResult, "<ol>");
+ assertEquals(endResult, "</ol>");
+ }
+
+ public void testULGenerateOutput() {
+ WebTag ulStartWebTag = new WebTag("ul", WebTag.TagType.START);
+ WebTag u = new WebTag("ul", WebTag.TagType.END);
+ String startResult = ulStartWebTag.generateOutput(false);
+ String endResult = u.generateOutput(false);
+ assertEquals(startResult, "<ul>");
+ assertEquals(endResult, "</ul>");
+ }
+
+ public void testLIGenerateOutput() {
+ WebTag liStartWebTag = new WebTag("li", WebTag.TagType.START);
+ WebTag liEndWebTag = new WebTag("li", WebTag.TagType.END);
+ String startResult = liStartWebTag.generateOutput(false);
+ String endResult = liEndWebTag.generateOutput(false);
+ assertEquals(startResult, "<li>");
+ assertEquals(endResult, "</li>");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698