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

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

Issue 2750973002: Make sure lazily-loaded images have absolute URL (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebImage.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/EmbedExtractorTest.java
diff --git a/javatests/org/chromium/distiller/EmbedExtractorTest.java b/javatests/org/chromium/distiller/EmbedExtractorTest.java
index fac80777b79d0dc558166617cabef12534c234e2..e7051fe0dd4ef073c909bc3f470071b02fb78b1b 100644
--- a/javatests/org/chromium/distiller/EmbedExtractorTest.java
+++ b/javatests/org/chromium/distiller/EmbedExtractorTest.java
@@ -6,6 +6,8 @@ package org.chromium.distiller;
import com.google.gwt.dom.client.AnchorElement;
import com.google.gwt.dom.client.Style;
+import java.util.ArrayList;
+import java.util.List;
import org.chromium.distiller.webdocument.WebElement;
import org.chromium.distiller.webdocument.WebEmbed;
import org.chromium.distiller.webdocument.WebFigure;
@@ -395,6 +397,10 @@ public class EmbedExtractorTest extends DomDistillerJsTestCase {
WebImage result = (WebImage) extractor.extract(image);
assertNotNull(result);
assertEquals("<img src=\"http://example.com/image.png\">", result.generateOutput(false));
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("http://example.com/image.png");
+ assertEquals(expected, result.getUrlList());
}
private void extractLazilyLoadedFigure(String attr) {
@@ -412,6 +418,10 @@ public class EmbedExtractorTest extends DomDistillerJsTestCase {
assertNotNull(result);
assertEquals("<figure><img src=\"http://example.com/image.png\"></figure>",
result.generateOutput(false));
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("http://example.com/image.png");
+ assertEquals(expected, result.getUrlList());
}
public void testImageExtractorLazy() {
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebImage.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698