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

Unified Diff: javatests/org/chromium/distiller/EmbedExtractorTest.java

Issue 2285133003: Use .innerText in text-only mode (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: Created 4 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/EmbedExtractorTest.java
diff --git a/javatests/org/chromium/distiller/EmbedExtractorTest.java b/javatests/org/chromium/distiller/EmbedExtractorTest.java
index 1072146bfe19a24410d15a1a35a2408712745070..5022a5acb3561c9ba621f31ab510a3527f3a1d54 100644
--- a/javatests/org/chromium/distiller/EmbedExtractorTest.java
+++ b/javatests/org/chromium/distiller/EmbedExtractorTest.java
@@ -518,7 +518,7 @@ public class EmbedExtractorTest extends DomDistillerJsTestCase {
Element figcaption = Document.get().createElement("FIGCAPTION");
AnchorElement anchor = Document.get().createAnchorElement();
anchor.setHref("link_page.html");
- anchor.setInnerHTML("caption link");
+ anchor.setInnerHTML("caption<br>link");
figcaption.appendChild(TestUtil.createText("This is a "));
figcaption.appendChild(anchor);
figure.appendChild(figcaption);
@@ -528,13 +528,14 @@ public class EmbedExtractorTest extends DomDistillerJsTestCase {
"<img src=\"http://wwww.example.com/image.jpeg\"" +
" width=\"100\" height=\"100\">" +
"<figcaption>This is a " +
- "<a href=\"http://example.com/link_page.html\">caption link</a>" +
+ "<a href=\"http://example.com/link_page.html\">caption<br>link</a>" +
"</figcaption>" +
"</figure>";
EmbedExtractor extractor = new ImageExtractor();
WebElement result = extractor.extract(figure);
assertEquals(expected, TestUtil.removeAllDirAttributes(
result.generateOutput(false)));
+ assertEquals("This is a caption\nlink", result.generateOutput(true));
}
public void testFigureWithCaptionWithoutAnchor() {
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebText.java ('k') | javatests/org/chromium/distiller/webdocument/WebTextTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698