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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html

Issue 430583002: Add SVG as a picture supported mime type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed approach Created 6 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: LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html b/LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html
index 5c87fdbfb8b8568e9726af6bdc48b553a41b80d1..bb24b384a102abd098fde284c5f9bfb8866c44f5 100644
--- a/LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-picture-1x.html
@@ -18,6 +18,8 @@
shouldBe('currentSrcFileName("img_before_source")', '"blue_rect.jpg?1"');
shouldBe('document.getElementById("unknown_type").clientWidth', '1600');
shouldBe('currentSrcFileName("unknown_type")', '"image-set-4x.png?3"');
+ shouldBe('document.getElementById("svg_type").clientWidth', '800');
+ shouldBe('currentSrcFileName("svg_type")', '"image-set-2x.png?2"');
shouldBe('document.getElementById("empty_srcset").clientWidth', '1600');
shouldBe('currentSrcFileName("empty_srcset")', '"image-set-4x.png?3"');
shouldBe('document.getElementById("no_srcset").clientWidth', '1600');
@@ -78,6 +80,16 @@
resources/image-set-4x.png?3 1600w">
<img id="unknown_type" src="resources/blue_rect.jpg?1">
</picture>
+<!-- SVG source - should not be ignored -->
+<picture>
+ <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resources/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w,
+ resources/image-set-4x.png?1 1600w">
+ <source media="(max-width: 800px)" type="image/svg+xml" sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resources/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w,
+ resources/image-set-4x.png?3 1600w">
+ <img id="svg_type" src="resources/blue_rect.jpg?1">
+</picture>
<!-- source with empty srcset - should be ignored -->
<picture>
<source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resources/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w,
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-picture-1x-expected.txt » ('j') | public/platform/WebMimeRegistry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698