Bug 1358794, part 2 - Reftests to check SVG embedded by SVG <image> gets a synthetic viewBox if necessary. r=longsonr
authorJonathan Watt <jwatt@jwatt.org>
Sat, 25 Mar 2017 17:05:37 +0000
changeset 567049 63a7a32fe28fa10c6c238633f3c52b4ee7c113e7
parent 567048 f27ad6a2fa53898d78342518dccfec1dca95b410
child 567050 a06749566178c2018473e7b863e48e0eee31be96
push id55429
push userbmo:hskupin@gmail.com
push dateMon, 24 Apr 2017 10:48:57 +0000
reviewerslongsonr
bugs1358794
milestone55.0a1
Bug 1358794, part 2 - Reftests to check SVG embedded by SVG <image> gets a synthetic viewBox if necessary. r=longsonr MozReview-Commit-ID: FWCXcU0TUEz
layout/reftests/svg/as-image/reftest.list
layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-helper-1.svg
layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-helper-2.svg
layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-ref.svg
layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01.svg
--- a/layout/reftests/svg/as-image/reftest.list
+++ b/layout/reftests/svg/as-image/reftest.list
@@ -175,16 +175,19 @@ HTTP == svg-stylesheet-external-1.html b
 # in non-image contexts, but for that to work, we have to reliably count on
 # :visited styles loading (asynchronously), so we test that in
 # layout/style/test/test_visited_reftests.html instead of the reftest harness.
 != svg-image-visited-1-helper.svg about:blank
 == svg-image-visited-1.html       lime100x100.svg
 != svg-image-visited-2-helper.svg about:blank
 == svg-image-visited-2.html       lime100x100.svg
 
+# tests for SVG <image> that should have a synthetic viewBox
+== svg-image-synthetic-viewBox-01.svg svg-image-synthetic-viewBox-01-ref.svg
+
 # Test for painting problems with SVGs used in border images.
 # XXXseth: The underlying problems also apply to media fragments,
 # but the test case would be much simpler. This should be switched
 # over to use media fragments once bug 790640 lands.
 fuzzy(2,1) == svg-border-image-repaint-1.html svg-border-image-repaint-1-ref.html
 
 # Tests for image-orientation with a viewbox and an intrinsic size:
 == image-orientation-viewbox-and-size.html?0        image-orientation-ref.html?0
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-helper-1.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
+  <circle cx="100" cy="100" r="100" fill="blue"/>
+</svg>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-helper-2.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
+  <circle cx="50" cy="50" r="50" fill="blue"/>
+</svg>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01-ref.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <image width="100" height="100" href="svg-image-synthetic-viewBox-01-helper-2.svg"/>
+</svg>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/as-image/svg-image-synthetic-viewBox-01.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <image width="100" height="100" href="svg-image-synthetic-viewBox-01-helper-1.svg"/>
+</svg>
+