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

Unified Diff: javatests/org/chromium/distiller/webdocument/WebTagTest.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
« no previous file with comments | « javatests/org/chromium/distiller/ContentExtractorTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index be51ae438c19ade7dd2b39090bdb3b90af2c360f..579820054c08819894ebefed4b77b165a8518038 100644
--- a/javatests/org/chromium/distiller/webdocument/WebTagTest.java
+++ b/javatests/org/chromium/distiller/webdocument/WebTagTest.java
@@ -13,33 +13,13 @@ public class WebTagTest extends DomDistillerJsTestCase {
assertEquals(endResult, "</ol>");
}
- public void testULGenerateOutput() {
- WebTag ulStartWebTag = new WebTag("ul", WebTag.TagType.START);
- WebTag ulEndWebTag = new WebTag("ul", WebTag.TagType.END);
- String startResult = ulStartWebTag.generateOutput(false);
- String endResult = ulEndWebTag.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>");
- }
-
- public void testBlockquoteGenerateOutput() {
- WebTag blockquoteStartWebTag = new WebTag("blockquote",
- WebTag.TagType.START);
- WebTag blockquoteEndWebTag = new WebTag("blockquote",
- WebTag.TagType.END);
- String startResult = blockquoteStartWebTag.generateOutput(false);
- String endResult = blockquoteEndWebTag.generateOutput(false);
- assertEquals(startResult, "<blockquote>");
- assertEquals(endResult, "</blockquote>");
+ public void testGenerateOutput() {
+ WebTag startWebTag = new WebTag("anytext", WebTag.TagType.START);
+ WebTag endWebTag = new WebTag("anytext", WebTag.TagType.END);
+ String startResult = startWebTag.generateOutput(false);
+ String endResult = endWebTag.generateOutput(false);
+ assertEquals(startResult, "<anytext>");
+ assertEquals(endResult, "</anytext>");
}
public void testCanBeNested() {
@@ -47,6 +27,7 @@ public class WebTagTest extends DomDistillerJsTestCase {
assertTrue(WebTag.canBeNested("UL"));
assertTrue(WebTag.canBeNested("OL"));
assertTrue(WebTag.canBeNested("BLOCKQUOTE"));
+ assertTrue(WebTag.canBeNested("PRE"));
assertFalse(WebTag.canBeNested("SPAN"));
}
}
« no previous file with comments | « javatests/org/chromium/distiller/ContentExtractorTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698