[lasem] tests: more test files.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] tests: more test files.
- Date: Sun, 21 Oct 2012 15:42:43 +0000 (UTC)
commit 14ac7a3fc4e727194e9720ce729098660d7a405a
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Oct 21 17:42:28 2012 +0200
tests: more test files.
.../svg/suite/gradients/linear-gradient-ref.png | Bin 0 -> 1213 bytes
tests/data/svg/suite/gradients/linear-gradient.svg | 105 ++++++++++++++++++++
tests/data/svg/suite/gradients/multi-color-ref.png | Bin 0 -> 12972 bytes
tests/data/svg/suite/gradients/multi-color.svg | 73 ++++++++++++++
.../data/svg/suite/gradients/spread-method-ref.png | Bin 0 -> 10596 bytes
tests/data/svg/suite/gradients/spread-method.svg | 101 +++++++++++++++++++
.../svg/suite/patterns/referenced-pattern-ref.png | Bin 0 -> 1413 bytes
.../data/svg/suite/patterns/referenced-pattern.svg | 59 +++++++++++
8 files changed, 338 insertions(+), 0 deletions(-)
---
diff --git a/tests/data/svg/suite/gradients/linear-gradient-ref.png b/tests/data/svg/suite/gradients/linear-gradient-ref.png
new file mode 100644
index 0000000..4fe7d93
Binary files /dev/null and b/tests/data/svg/suite/gradients/linear-gradient-ref.png differ
diff --git a/tests/data/svg/suite/gradients/linear-gradient.svg b/tests/data/svg/suite/gradients/linear-gradient.svg
new file mode 100755
index 0000000..7322e66
--- /dev/null
+++ b/tests/data/svg/suite/gradients/linear-gradient.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- gradPatt-linearGr-BE-02.svg -->
+<!-- renamed for 1.1 suite to pservers-grad-09-b.svg -->
+<!-- -->
+<!-- Test that the viewer can handle the gradientUnits attribute on -->
+<!-- linear gradients. -->
+<!-- -->
+<!-- Author : Haroon Sheikh 09-Feb-2000 -->
+<!-- 1.1 revision by Rick Graham -->
+<!-- -->
+<!-- History: -->
+<!-- 09-Feb-2000, HSS: Serial#1 created. -->
+<!-- 28-Feb-2000, LRH: fix name ("02"), Ser#2 created. -->
+<!-- 6-Mar-2000, HSS: Changed name to gradientPattern-linearGradient-BE -->
+<!-- Increased size of legend box by 100. -->
+<!-- Reorganized tests to focus on sections in spec. -->
+<!-- Changed description. -->
+<!-- Changed DOCTYPE and width & height on bounding rect-->
+<!-- Serial#3 created. -->
+<!-- 26-Apr-2000, DJ: changed be to BE -->
+<!-- removed "should"s -->
+<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
+<!-- 16-Aug-2000, LH="rename" ser#6. -->
+<!-- -->
+<!-- ===================================================================== -->
+<!--======================================================================-->
+<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
+<!--= log messages, and therefore is no longer in the preceding preamble.=-->
+<!--======================================================================-->
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.7 $" testname="pservers-grad-09-b.svg">
+ <Paragraph>
+ Test that the viewer can handle the gradientUnits attribute on linear gradients.
+ It tests the following values of gradientUnits : default (userSpace), objectBoundingBox,
+ and userSpaceOnUse.
+ </Paragraph>
+ <Paragraph>
+ From top-down the appearance of objects is as follows.
+ </Paragraph>
+ <Paragraph>
+ The first rectangle uses the default attributes on the linearGradient element.
+ Therefore the linear gradient should default to objectBoundingBox. It should appear
+ from the left edge of therectangle (blue) to the right edge of the rectangle (red).
+ The rectangle is smaller than the viewport, because a previous version of the SVG spec had the default value be 'viewport'.
+ The test fails if only a portion of the gradient is shown.
+ </Paragraph>
+ <Paragraph>
+ The next rectangle uses gradientUnits=objectBoundingBox. The linear gradient should
+ travel from blue (top) to red (bottom).
+ </Paragraph>
+ <Paragraph>
+ The last rectangle uses gradientUnits=userSpaceOnUse. The rectangle element is given it's
+ own transformation and the gradient is assumed to be in this user space.
+ The gradient should appear as a linear gradient from red (left) to blue (right).
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">pservers-grad-09-b.svg</title>
+ <desc id="test-desc">Test that the viewer can handle the gradientUnits attribute on linear gradients.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with default attributes on <linear gradient> element. -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad1">
+ <stop stop-color="red" offset="0"/>
+ <stop stop-color="blue" offset="1"/>
+ </linearGradient>
+ <rect x="125" y="35" width="200" height="50" fill="url(#Grad1)" />
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with gradientUnits=objectBoundingBox ======== -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="red" offset="1"/>
+ </linearGradient>
+ <rect x="10" y="125" width="430" height="50" fill="url(#Grad2)" />
+ <!-- ====================================================================== -->
+ <!-- Gradient using gradientUnits="userSpaceOnUse" -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad3" x1="0" y1="0" x2="0" y2="430" gradientUnits="userSpaceOnUse">
+ <stop stop-color="red" offset="0"/>
+ <stop stop-color="blue" offset="1"/>
+ </linearGradient>
+ <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="430" fill="url(#Grad3)" />
+ </g>
+</svg>
+
diff --git a/tests/data/svg/suite/gradients/multi-color-ref.png b/tests/data/svg/suite/gradients/multi-color-ref.png
new file mode 100644
index 0000000..0eaf19d
Binary files /dev/null and b/tests/data/svg/suite/gradients/multi-color-ref.png differ
diff --git a/tests/data/svg/suite/gradients/multi-color.svg b/tests/data/svg/suite/gradients/multi-color.svg
new file mode 100755
index 0000000..1452728
--- /dev/null
+++ b/tests/data/svg/suite/gradients/multi-color.svg
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- =====================================================================-->
+<!-- gradPatt-stop-BE-06.svg -->
+<!-- renamed for 1.1 suite to pservers-grad-04-b.svg -->
+<!-- Author : Haroon Sheikh 07-Mar-2000 -->
+<!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
+<!--======================================================================-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 480 360" width="100%" height="100%" version="1.1" baseProfile="basic">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.7 $" testname="pservers-grad-04-b.svg">
+ <Paragraph>
+ Test that checks the capability of the stop element in linear and radial
+ gradients.
+ </Paragraph>
+ <Paragraph>
+ The first rectangle has a linear gradient fill with a vector starting at top left
+ and going to bottom right. The stop colors are at 20% spacing apart and are in the
+ following order : violet, blue, lime, yellow, orange, red.
+ Because the gradient vector vector goes from (0,0) to (1,1) in object bounding box space
+ and because the object bounding box has a larger width than height, the gradient vector
+ is skewed off of a pure 45 degree angle. The gradient stripes are also skewed
+ so that they are no longer perpendicular to the gradient vector.
+ </Paragraph>
+ <Paragraph>
+ The next rectangle has a radial gradient fill with a multi-color stops from innermost
+ to outermost in the following order : black, yellow, red, blue, white, green.
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">pservers-grad-04-b</title>
+ <desc id="test-desc">Test that checks the capability of the stop element in linear and radial gradients.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <!-- ====================================================================== -->
+ <!-- Very simple black to red radial gradient ======== -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
+ <stop stop-color="rgb(238,130,238)" offset="0"/>
+ <stop stop-color="blue" offset="0.2"/>
+ <stop stop-color="lime" offset="0.4"/>
+ <stop stop-color="yellow" offset="0.6"/>
+ <stop stop-color="rgb(255,165,0)" offset="0.8"/>
+ <stop stop-color="red" offset="1"/>
+ </linearGradient>
+ <rect x="20" y="20" width="440" height="80" fill="url(#Grad1)" />
+ <!-- ====================================================================== -->
+ <!-- Radial gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad2" gradientUnits="userSpaceOnUse" cx="240" cy="210" r="220" fx="240" fy="210">
+ <stop stop-color="black" offset="0"/>
+ <stop stop-color="yellow" offset="0.2"/>
+ <stop stop-color="red" offset="0.4"/>
+ <stop stop-color="blue" offset="0.6"/>
+ <stop stop-color="white" offset="0.8"/>
+ <stop stop-color="green" offset="1"/>
+ </radialGradient>
+ <rect x="20" y="150" width="440" height="80" fill="url(#Grad2)" stroke-width="40"/>
+ </g>
+</svg>
diff --git a/tests/data/svg/suite/gradients/spread-method-ref.png b/tests/data/svg/suite/gradients/spread-method-ref.png
new file mode 100644
index 0000000..4b2afed
Binary files /dev/null and b/tests/data/svg/suite/gradients/spread-method-ref.png differ
diff --git a/tests/data/svg/suite/gradients/spread-method.svg b/tests/data/svg/suite/gradients/spread-method.svg
new file mode 100755
index 0000000..ddc299a
--- /dev/null
+++ b/tests/data/svg/suite/gradients/spread-method.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="basic" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- pservers-grad-16-b.svg -->
+<!-- -->
+<!-- Tests the spreadMethod attributes for gradients -->
+<!-- -->
+<!-- Author : Corel SVG Viewer QA team 01-05-2003 -->
+<!-- Revised by: Benoit Bezaire -->
+<!-- -->
+<!--======================================================================-->
+
+ <SVGTestCase
+ xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/"
+ xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ owner="BB" reviewer="CL" desc="Tests the spreadMethod attributes
+ for gradients" status="accepted" version="$Revision: 1.7 $" testname="$RCSfile: pservers-grad-14-b.svg,v $">
+ <OperatorScript>
+ <Paragraph>The intent of this file is to test the 4 allowed spread methods for linear and radial gradients.
+ The 4 values (pad, reflect, repeat and default) are available for both types of gradients.
+ On the left side are the linear gradient results, and on the right, the radial results.
+ The UA should render a result equivalent to the reference image.
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+
+ <title id="test-title">pservers-grad-16-b.svg</title>
+ <desc id="test-desc">Tests the spreadMethod attributes for gradients</desc>
+
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <defs>
+ <linearGradient id="lgSpreadPad" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="pad">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadReflect" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="reflect">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadRepeat" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="repeat">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadDefault" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <radialGradient id="rgSpreadPad" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="pad">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadReflect" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="reflect">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadRepeat" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="repeat">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadDefault" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2">
+ <stop offset="000%" stop-color="red"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+ </defs>
+
+
+ <rect x="10" y="060" width="225" height="40" fill="url(#lgSpreadPad)" stroke="none"/>
+
+ <rect x="10" y="130" width="225" height="40" fill="url(#lgSpreadReflect)" stroke="none"/>
+
+ <rect x="10" y="200" width="225" height="40" fill="url(#lgSpreadRepeat)" stroke="none"/>
+
+ <rect x="10" y="270" width="225" height="40" fill="url(#lgSpreadDefault)" stroke="none"/>
+
+
+ <rect x="245" y="060" width="225" height="40" fill="url(#rgSpreadPad)" stroke="none"/>
+
+ <rect x="245" y="130" width="225" height="40" fill="url(#rgSpreadReflect)" stroke="none"/>
+
+ <rect x="245" y="200" width="225" height="40" fill="url(#rgSpreadRepeat)" stroke="none"/>
+
+ <rect x="245" y="270" width="225" height="40" fill="url(#rgSpreadDefault)" stroke="none"/>
+
+</svg>
diff --git a/tests/data/svg/suite/patterns/referenced-pattern-ref.png b/tests/data/svg/suite/patterns/referenced-pattern-ref.png
new file mode 100644
index 0000000..a46d5c5
Binary files /dev/null and b/tests/data/svg/suite/patterns/referenced-pattern-ref.png differ
diff --git a/tests/data/svg/suite/patterns/referenced-pattern.svg b/tests/data/svg/suite/patterns/referenced-pattern.svg
new file mode 100755
index 0000000..339ea78
--- /dev/null
+++ b/tests/data/svg/suite/patterns/referenced-pattern.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- =====================================================================-->
+<!-- gradPatt-referenc-BE-08.svg -->
+<!-- renamed for 1.1 suite to pservers-grad-03-b.svg -->
+<!-- Author : Haroon Sheikh 08-Mar-2000 -->
+<!-- & Philip Mansfield -->
+<!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
+<!--======================================================================-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 480 360" width="100%" height="100%" version="1.1" baseProfile="basic">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.6 $" testname="pservers-grad-03-b.svg">
+ <Paragraph>
+ Test that the viewer can handle the xlink:href attribute on
+ patterns.
+ </Paragraph>
+ <Paragraph>
+ There are two rectangles with a pattern fill made
+ up of 4 rectangles. The pattern definition of the lower one references the pattern definition
+ of the upper one, using the xlink:href attribute. Because
+ the particular way that the patterns and rectangles are
+ defined in this test case, the two fills will appear the
+ same - the rectangles are positioned on pattern-size
+ boundaries, so that the offsets into the pattern at the left
+ edges of the respective rectangles is identical.
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image, except
+ for possible variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">pservers-grad-03-b</title>
+ <desc id="test-desc">Test that the viewer can handle the xlink:href attribute on patterns.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <!-- ====================================================================== -->
+ <!-- Pattern filled rectangles using a xlink:href to another pattern fill -->
+ <!-- ====================================================================== -->
+ <pattern id="Pat3a" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
+ <rect x="0" y="0" width="10" height="10" fill="red" />
+ <rect x="10" y="0" width="10" height="10" fill="green" />
+ <rect x="0" y="10" width="10" height="10" fill="blue" />
+ <rect x="10" y="10" width="10" height="10" fill="yellow" />
+ </pattern>
+ <pattern id="Pat3b" xlink:href="#Pat3a" width="20" height="20"/>
+ <rect x="20" y="20" width="440" height="80" fill="url(#Pat3a)" />
+ <rect x="20" y="150" width="440" height="80" fill="url(#Pat3b)" />
+ </g>
+</svg>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]