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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 package org.chromium.distiller.webdocument;
2
3 import org.chromium.distiller.DomDistillerJsTestCase;
4
5 public class WebTagTest extends DomDistillerJsTestCase {
6
7 public void testOLGenerateOutput() {
8 WebTag olStartWebTag = new WebTag("ol", WebTag.TagType.START);
9 WebTag olEndWebTag = new WebTag("ol", WebTag.TagType.END);
10 String startResult = olStartWebTag.generateOutput(false);
11 String endResult = olEndWebTag.generateOutput(false);
12 assertEquals(startResult, "<ol>");
13 assertEquals(endResult, "</ol>");
14 }
15
16 public void testULGenerateOutput() {
17 WebTag ulStartWebTag = new WebTag("ul", WebTag.TagType.START);
18 WebTag u = new WebTag("ul", WebTag.TagType.END);
19 String startResult = ulStartWebTag.generateOutput(false);
20 String endResult = u.generateOutput(false);
21 assertEquals(startResult, "<ul>");
22 assertEquals(endResult, "</ul>");
23 }
24
25 public void testLIGenerateOutput() {
26 WebTag liStartWebTag = new WebTag("li", WebTag.TagType.START);
27 WebTag liEndWebTag = new WebTag("li", WebTag.TagType.END);
28 String startResult = liStartWebTag.generateOutput(false);
29 String endResult = liEndWebTag.generateOutput(false);
30 assertEquals(startResult, "<li>");
31 assertEquals(endResult, "</li>");
32 }
33
34 public void testShouldGetInnerHTML() {
35 assertTrue(WebTag.canBeNested("LI"));
36 assertTrue(WebTag.canBeNested("UL"));
37 assertTrue(WebTag.canBeNested("OL"));
38 assertFalse(WebTag.canBeNested("SPAN"));
39 }
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698