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

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

Issue 2638823002: Support <picture> in image extraction (Closed)
Patch Set: support lazy loading in <picture> Created 3 years, 11 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/ContentExtractorTest.java
diff --git a/javatests/org/chromium/distiller/ContentExtractorTest.java b/javatests/org/chromium/distiller/ContentExtractorTest.java
index cd362cd660fadf4d91a48e64ef89770d0c582cfb..c72e56c33b8006e6e58fa1b922046c75a3d7967a 100644
--- a/javatests/org/chromium/distiller/ContentExtractorTest.java
+++ b/javatests/org/chromium/distiller/ContentExtractorTest.java
@@ -94,6 +94,11 @@ public class ContentExtractorTest extends DomDistillerJsTestCase {
final String html =
"<h1>" + CONTENT_TEXT + "</h1>" +
"<img id=\"a\" style=\"typo\" align=\"left\" src=\"image\" srcset=\"image200 200w, //example.org/image400 400w\">" +
+ "<figure><picture>" +
+ "<source srcset=\"image200 200w, //example.org/image400 400w\">" +
+ "<source srcset=\"image100 100w, //example.org/image300 300w\">" +
+ "<img>" +
+ "</picture></figure>" +
"<img id=\"b\" style=\"align: left\" alt=\"b\" data-dummy=\"c\" data-src=\"image2\">" +
"<table role=\"grid\"><tbody><tr><td>" +
"<img id=\"c\" style=\"a\" alt=\"b\" src=\"/image\" srcset=\"https://example.com/image2x 2x, /image4x 4x,\">" +
@@ -105,6 +110,11 @@ public class ContentExtractorTest extends DomDistillerJsTestCase {
"<h1>" + CONTENT_TEXT + "</h1>" +
"<img src=\"http://example.com/path/image\" " +
"srcset=\"http://example.com/path/image200 200w, http://example.org/image400 400w\">" +
+ "<figure><picture>" +
+ "<source srcset=\"http://example.com/path/image200 200w, http://example.org/image400 400w\">" +
+ "<source srcset=\"http://example.com/path/image100 100w, http://example.org/image300 300w\">" +
+ "<img>" +
+ "</picture></figure>" +
"<img alt=\"b\" src=\"http://example.com/path/image2\">" +
"<table role=\"grid\"><tbody><tr><td>" +
"<img alt=\"b\" src=\"http://example.com/image\" " +
« no previous file with comments | « java/org/chromium/distiller/webdocument/WebTable.java ('k') | javatests/org/chromium/distiller/DomUtilTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698