| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="CL" author="Microsoft" status="accepted" |
| 13 |
version="$Revision: 1.3 $" testname="$RCSfile: struct-use-12-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#UseElement"> |
| 15 |
<p> |
| 16 |
Tests that recursive 'use' instances do not block rendering. |
| 17 |
</p> |
| 18 |
<p> |
| 19 |
Various scenarios that directly and indirectly create circular references via the 'use' tag. A 'g' element is used when |
| 20 |
structural elements are necessary. None of the 'use' scenarios render anything. 'useLongCycle' tests a chain of recursive |
| 21 |
'use' instances that eventually cycles back to the first element. In 'useNested' 'use' elements are nested, with the child |
| 22 |
referring to the parent. In 'useNestedGroup' a 'use' instance references a parent 'g' element. In 'useIndirectNestedGroup' |
| 23 |
a 'use' instance indirectly references its own parent 'g'. In 'useMultipleIndirectNestedGroup', two 'use' instances |
| 24 |
reference their parent 'g' elements, and additional 'use' instances refer to these self-referencing 'use' elements. A green |
| 25 |
'rect' is used to verify that rendering was processed up to that point. |
| 26 |
</p> |
| 27 |
</d:testDescription> |
| 28 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p> |
| 30 |
Run the test. No interaction required. |
| 31 |
</p> |
| 32 |
</d:operatorScript> |
| 33 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 34 |
<p> |
| 35 |
Test passes if there is green visible on the page. |
| 36 |
</p> |
| 37 |
</d:passCriteria> |
| 38 |
</d:SVGTestCase> |
| 39 |
<title id="test-title">$RCSfile: struct-use-12-f.svg,v $</title> |
| 40 |
<defs> |
| 41 |
<font-face |
| 42 |
font-family="SVGFreeSansASCII" |
| 43 |
unicode-range="U+0-7F"> |
| 44 |
<font-face-src> |
| 45 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 46 |
</font-face-src> |
| 47 |
</font-face> |
| 48 |
</defs> |
| 49 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 50 |
|
| 51 |
<use xlink:href="#useShortCycle2" x="20" y="20" id="useShortCycle1" /> |
| 52 |
<use xlink:href="#useShortCycle1" x="20" y="20" id="useShortCycle2" /> |
| 53 |
<use xlink:href="#useLongCycle40" x="20" y="20" id="useLongCycle1" /> |
| 54 |
<use xlink:href="#useLongCycle1" x="20" y="20" id="useLongCycle2" /> |
| 55 |
<use xlink:href="#useLongCycle2" x="20" y="20" id="useLongCycle3" /> |
| 56 |
<use xlink:href="#useLongCycle3" x="20" y="20" id="useLongCycle4" /> |
| 57 |
<use xlink:href="#useLongCycle4" x="20" y="20" id="useLongCycle5" /> |
| 58 |
<use xlink:href="#useLongCycle5" x="20" y="20" id="useLongCycle6" /> |
| 59 |
<use xlink:href="#useLongCycle6" x="20" y="20" id="useLongCycle7" /> |
| 60 |
<use xlink:href="#useLongCycle7" x="20" y="20" id="useLongCycle8" /> |
| 61 |
<use xlink:href="#useLongCycle8" x="20" y="20" id="useLongCycle9" /> |
| 62 |
<use xlink:href="#useLongCycle9" x="20" y="20" id="useLongCycle10" /> |
| 63 |
<use xlink:href="#useLongCycle10" x="20" y="20" id="useLongCycle11" /> |
| 64 |
<use xlink:href="#useLongCycle1" x="20" y="20" id="useLongCycle12" /> |
| 65 |
<use id="useNested1" xlink:href="#useNested2"> |
| 66 |
<use id="useNested2" xlink:href="#useNested1" /> |
| 67 |
</use> |
| 68 |
<g id="useNestedGroup1" xlink:href="#useNestedGroup2"> |
| 69 |
<use id="useNestedGroup2" xlink:href="#useNestedGroup1" /> |
| 70 |
</g> |
| 71 |
<g id="useIndirectNestedGroup1"> |
| 72 |
<use xlink:href="#useIndirectNestedGroupElem2" id="useIndirectNestedGroupElem1" /> |
| 73 |
</g> |
| 74 |
<use xlink:href="#useIndirectNestedGroup1" id="useIndirectNestedGroupElem2" /> |
| 75 |
<g id="useMultipleIndirectNestedGroup1"> |
| 76 |
<g id="useMultipleIndirectNestedGroup2"> |
| 77 |
<use xlink:href="#useMultipleIndirectNestedGroupElement2" id="useMultipleIndirectNestedGroupElement1" /> |
| 78 |
</g> |
| 79 |
<use xlink:href="#useMultipleIndirectNestedGroupElement3" id="useMultipleIndirectNestedGroupElement4" /> |
| 80 |
</g> |
| 81 |
<use xlink:href="#useMultipleIndirectNestedGroup1" id="useMultipleIndirectNestedGroupElement2" /> |
| 82 |
<use xlink:href="#useMultipleIndirectNestedGroup2" id="useMultipleIndirectNestedGroupElement3" /> |
| 83 |
<use xlink:href="#useMultipleIndirectNestedGroupElement1" id="useMultipleIndirectNestedGroupElement4" /> |
| 84 |
<use xlink:href="#useMultipleIndirectNestedGroupElement2" /> |
| 85 |
<use xlink:href="#useMultipleIndirectNestedGroupElement3" /> |
| 86 |
|
| 87 |
<!-- if we get here, the above circular usr references did not block rendering --> |
| 88 |
<rect width="96" height="96" fill="green" /> |
| 89 |
|
| 90 |
</g> |
| 91 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 92 |
<text id="revision" x="10" y="340" stroke="none" |
| 93 |
fill="black">$Revision: 1.3 $</text> |
| 94 |
</g> |
| 95 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 96 |
<!-- comment out this watermark once the test is approved --> |
| 97 |
<!-- |
| 98 |
<g id="draft-watermark"> |
| 99 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 100 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 101 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 102 |
</g> |
| 103 |
--> |
| 104 |
</svg> |