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

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

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Small code refactor for more appropriate names. Created 5 years, 5 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/PlaceHolderTest.java
diff --git a/javatests/org/chromium/distiller/webdocument/PlaceHolderTest.java b/javatests/org/chromium/distiller/webdocument/PlaceHolderTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..ec4cde38307898b9c3f924cbb76fe631004f2e98
--- /dev/null
+++ b/javatests/org/chromium/distiller/webdocument/PlaceHolderTest.java
@@ -0,0 +1,33 @@
+package org.chromium.distiller.webdocument;
+
+import org.chromium.distiller.DomDistillerJsTestCase;
+
+public class PlaceHolderTest extends DomDistillerJsTestCase {
+
+ public void testOLGenerateOutput() {
+ PlaceHolder olStartPlaceHolder = new PlaceHolder("OL", PlaceHolder.TagType.START);
+ PlaceHolder olEndPlaceHolder = new PlaceHolder("OL", PlaceHolder.TagType.END);
+ String startResult = olStartPlaceHolder.generateOutput(false);
+ String endResult = olEndPlaceHolder.generateOutput(false);
+ assertEquals(startResult, "<ol>");
+ assertEquals(endResult, "</ol>");
+ }
+
+ public void testULGenerateOutput() {
+ PlaceHolder olStartPlaceHolder = new PlaceHolder("UL", PlaceHolder.TagType.START);
+ PlaceHolder olEndPlaceHolder = new PlaceHolder("UL", PlaceHolder.TagType.END);
+ String startResult = olStartPlaceHolder.generateOutput(false);
+ String endResult = olEndPlaceHolder.generateOutput(false);
+ assertEquals(startResult, "<ul>");
+ assertEquals(endResult, "</ul>");
+ }
+
+ public void testLIGenerateOutput() {
+ PlaceHolder olStartPlaceHolder = new PlaceHolder("LI", PlaceHolder.TagType.START);
+ PlaceHolder olEndPlaceHolder = new PlaceHolder("LI", PlaceHolder.TagType.END);
+ String startResult = olStartPlaceHolder.generateOutput(false);
+ String endResult = olEndPlaceHolder.generateOutput(false);
+ assertEquals(startResult, "<li>");
+ assertEquals(endResult, "</li>");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698