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 'display' or 'visibility' attributes have an incorrect effect on the 'switch' element." status="accepted"
approved="yes"
version="$Revision: 1.3 $" testname="$RCSfile: struct-cond-209-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 'display' or 'visibility'
attributes on a switch statement. The result should be a green circle
in the center of the output window.
</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 a green circle in the center of the image. If a
gray rectangle is visible, the test cannot be evaluated because the
'display' attribute is not supported. If a blue rectangle is visible,
the test cannot be evaluated because the 'visibility' attribute is not
supported. If a red rectangle with a gray stroke is visible, the test
is failed because the switch is affected by the 'display' attribute.
If a red rectangle with a black stroke is visible, the test is failed
because the switch is affected by the 'display' attribute.
</p>
<p>
The test uses the 'rect' and 'circle' elements, as well as basic fill
(solid primary colors), stroke (black or gray 2-pixel lines), and the
'display' and 'visibility' attributes.
</p>
</d:OperatorScript>
</SVGTestCase>
<title xml:id="test-title">$RCSfile: struct-cond-209-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">
<circle cx='240' cy='180' r='23' fill='lime' />
<switch xml:id="test-display">
<rect fill="gray" stroke-width="2" x="215" y="155" width="50" height="50" display="none" />
<rect fill="red" stroke="gray" stroke-width="2" x="215" y="155" width="50" height="50" />
</switch>
<switch xml:id="test-visibility">
<rect fill="blue" stroke-width="2" x="215" y="155" width="50" height="50" visibility="hidden" />
<rect fill="red" stroke="blue" stroke-width="2" x="215" y="155" width="50" height="50" />
</switch>
</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>