summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/moz-only
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/svg/moz-only')
-rw-r--r--layout/reftests/svg/moz-only/big.pngbin0 -> 82 bytes
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg13
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01a.svg16
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01b.svg16
-rw-r--r--layout/reftests/svg/moz-only/foreignObject-zoom-01.svg34
-rw-r--r--layout/reftests/svg/moz-only/pass-black.svg8
-rw-r--r--layout/reftests/svg/moz-only/pass.svg8
-rw-r--r--layout/reftests/svg/moz-only/reftest.list7
-rw-r--r--layout/reftests/svg/moz-only/replaced-element-zoom-01.html39
-rw-r--r--layout/reftests/svg/moz-only/small.pngbin0 -> 85 bytes
-rw-r--r--layout/reftests/svg/moz-only/zoom-invalidation-01.svg26
-rw-r--r--layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg13
-rw-r--r--layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg14
13 files changed, 194 insertions, 0 deletions
diff --git a/layout/reftests/svg/moz-only/big.png b/layout/reftests/svg/moz-only/big.png
new file mode 100644
index 0000000000..76a32497c7
--- /dev/null
+++ b/layout/reftests/svg/moz-only/big.png
Binary files differ
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg b/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg
new file mode 100644
index 0000000000..92046f8d2c
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg
@@ -0,0 +1,13 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage xlink:href="big.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01a.svg b/layout/reftests/svg/moz-only/feImage-zoom-01a.svg
new file mode 100644
index 0000000000..3b2ea655ff
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01a.svg
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ reftest-zoom="5"
+ width="20%" height="20%">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage image-rendering="-moz-crisp-edges" xlink:href="small.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01b.svg b/layout/reftests/svg/moz-only/feImage-zoom-01b.svg
new file mode 100644
index 0000000000..c8be9ea6b5
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01b.svg
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ reftest-zoom="5"
+ width="20%" height="20%">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage style="image-rendering:-moz-crisp-edges" xlink:href="small.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg b/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg
new file mode 100644
index 0000000000..42250464a9
--- /dev/null
+++ b/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ onload="startTest()" reftest-zoom="2" class="reftest-wait"
+ style="width:50%; height:50%;">
+
+ <title>Testcase for zoomed foreignObject</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=484677 -->
+
+ <style type="text/css">
+ * { margin:0;height:100%;width:100% }
+ </style>
+ <foreignObject width="100%" height="100%">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <div id="div" style="width:20px;height:20px;background:yellow;"/>
+ </body>
+ </html>
+ </foreignObject>
+ <script type="text/javascript">
+ function startTest() {
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ }
+ function doTest() {
+ var elem = document.elementFromPoint(25, 25);
+ var div = document.getElementById("div");
+ div.setAttribute("style", "background:" + ((elem == div) ? "red" : "lime") + ";");
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</svg>
diff --git a/layout/reftests/svg/moz-only/pass-black.svg b/layout/reftests/svg/moz-only/pass-black.svg
new file mode 100644
index 0000000000..d80f66d63e
--- /dev/null
+++ b/layout/reftests/svg/moz-only/pass-black.svg
@@ -0,0 +1,8 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <title>Testcase reference file for black pass condition</title>
+ <rect width="100%" height="100%" fill="black"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/pass.svg b/layout/reftests/svg/moz-only/pass.svg
new file mode 100644
index 0000000000..c09c6601e8
--- /dev/null
+++ b/layout/reftests/svg/moz-only/pass.svg
@@ -0,0 +1,8 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <title>Testcase reference file for generic pass condition</title>
+ <rect width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/reftest.list b/layout/reftests/svg/moz-only/reftest.list
new file mode 100644
index 0000000000..ce73d4119c
--- /dev/null
+++ b/layout/reftests/svg/moz-only/reftest.list
@@ -0,0 +1,7 @@
+# Tests for zooming with the full page zoom UI
+random-if(d2d) == feImage-zoom-01a.svg feImage-zoom-01-ref.svg
+random-if(d2d) == feImage-zoom-01b.svg feImage-zoom-01-ref.svg
+== foreignObject-zoom-01.svg pass.svg
+== zoom-invalidation-01.svg pass.svg
+== replaced-element-zoom-01.html pass.svg
+fuzzy-if(winWidget,0-12,0-7) == zoomed-svg-with-viewBox-01.svg zoomed-svg-with-viewBox-01-ref.svg
diff --git a/layout/reftests/svg/moz-only/replaced-element-zoom-01.html b/layout/reftests/svg/moz-only/replaced-element-zoom-01.html
new file mode 100644
index 0000000000..724bb304eb
--- /dev/null
+++ b/layout/reftests/svg/moz-only/replaced-element-zoom-01.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html reftest-zoom="2" class="reftest-wait">
+ <head>
+ <title>SVG page zoom test</title>
+ <style>
+ iframe, object, img {
+ width: 150px;
+ height: 100px;
+ border: none;
+ }
+ body {
+ background-color: lime;
+ }
+ </style>
+ <script>
+
+var expected = 3;
+var actual = 0;
+
+function process_load() {
+ ++actual;
+ if (actual == expected)
+ document.documentElement.removeAttribute("class");
+}
+
+ </script>
+ </head>
+ <body>
+ <div>
+ <iframe onload="process_load()" src="pass.svg"></iframe>
+ </div>
+ <div>
+ <object onload="process_load()" data="pass.svg"></object>
+ </div>
+ <div>
+ <img onload="process_load()" src="pass.svg">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/moz-only/small.png b/layout/reftests/svg/moz-only/small.png
new file mode 100644
index 0000000000..9ff11a9932
--- /dev/null
+++ b/layout/reftests/svg/moz-only/small.png
Binary files differ
diff --git a/layout/reftests/svg/moz-only/zoom-invalidation-01.svg b/layout/reftests/svg/moz-only/zoom-invalidation-01.svg
new file mode 100644
index 0000000000..e8270968b1
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoom-invalidation-01.svg
@@ -0,0 +1,26 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ reftest-zoom="2" class="reftest-wait"
+ width="50%" height="50%">
+
+ <title>Test invalidation of zoomed SVG</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=726928 -->
+
+ <script type="text/javascript">
+
+document.addEventListener("MozReftestInvalidate", doTest, false);
+
+function doTest() {
+ var redRect = document.getElementById('red-rect');
+ redRect.parentNode.removeChild(redRect);
+ document.documentElement.removeAttribute("class");
+}
+
+ </script>
+ <rect width="100%" height="100%" fill="lime"/>
+ <rect id="red-rect" x="10" y="10" width="100" height="100" fill="red"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg
new file mode 100644
index 0000000000..99a3d36b52
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg
@@ -0,0 +1,13 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="40" height="30">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=407959 -->
+
+ <title>Reference for zoomed-svg-with-viewBox-01.svg</title>
+
+ <ellipse cx="20" cy="15" rx="20" ry="15" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg
new file mode 100644
index 0000000000..530f892f4d
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg
@@ -0,0 +1,14 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" reftest-zoom="3"
+ width="40" height="30" viewBox="20 20 120 90">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=407959 -->
+
+ <title>Test that zooming isn't broken when we have a viewBox</title>
+
+ <ellipse cx="40" cy="35" rx="20" ry="15" fill="blue"/>
+
+</svg>