Revision control
Copy as Markdown
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--======================================================================-->
reviewer="CM" owner="DS" desc="Test to determine if referenced resource (elements or paint servers) are still displayed event if hidden by a 'switch' element." status="accepted"
approved="yes"
version="$Revision: 1.3 $" testname="$RCSfile: struct-cond-210-t.svg,v $">
<d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
<p>
This test evaluates the effects of the switch statement on referencing
content such as gradients or elements. The result should be a yellow
rectangle in the center of the output window, with green circles in
three of the corners of the rectangle.
</p>
<p>
The rendered picture should match the reference image, except for
possible variations in the labelling text (per CSS2 rules). The pass
condition is seeing three circles, one solid green circle in upper
right corner of the rectangle, and a circle with a green gradient in
each of the bottom corners of the rectangle. If a red or black circle
is visible in the upper left corner of the rectangle, the test cannot
be evaluated because the 'switch' is not correctly supported. If any of
the upper-right or lower circles is not visible, or does not have the
correct fill, the test is failed. If the bottom-right circle is not
visible or does not have the gradient fill, then the 'switch' is not
correctly supported, and does not allow one conditionally hidden
resource to reference another.
</p>
<p>
The test uses the 'rect', 'circle', 'gradient', and 'use' elements, as
well as basic fill (solid primary colors) and radial gradients.
</p>
</d:OperatorScript>
</SVGTestCase>
<title xml:id="test-title">$RCSfile: struct-cond-210-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
</font-face-src>
</font-face>
</defs>
<g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<switch>
<g>
<rect fill="yellow" x="120" y="90" width="240" height="180" />
</g>
<g fill="red">
<circle xml:id="ref-source" cx="150" cy="120" r="25" />
<radialGradient xml:id="ref-gradient">
<stop offset="0" stop-color="green" />
<stop offset="1" stop-color="lime" />
</radialGradient>
</g>
<g>
<circle xml:id="ref-source-gradient" cx="150" cy="240" r="25" fill="url(#ref-gradient)"/>
</g>
</switch>
<use xlink:href="#ref-source" x="180" fill="lime" />
<use xlink:href="#ref-source-gradient" x="180" />
<circle xml:id="ref-source" cx="150" cy="240" r="25" fill="url(#ref-gradient)"/>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text>
</g>
<rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
<!-- comment out this watermark once the test is approved -->
<!--<g xml:id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>