| 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.3" reviewer="CL" author="CM" status="accepted" |
| 13 |
version="$Revision: 1.6 $" testname="$RCSfile: styling-elem-01-b.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/styling.html#StyleElement"> |
| 15 |
<p> |
| 16 |
This tests that the 'type' attribute on a 'style' element is |
| 17 |
honored. |
| 18 |
</p> |
| 19 |
<p> |
| 20 |
Once the test is loaded, two rectangles are presented, |
| 21 |
the upper indicating the result of a sub-test that checks |
| 22 |
whether the 'type' attribute on a 'style' element correctly |
| 23 |
defaults to "text/css", and the lower indicating the result |
| 24 |
of a sub-test that checks whether a bogus value for 'type' |
| 25 |
does not cause the 'style' element contents to be interpreted |
| 26 |
as CSS. Each rectangle is green if the sub-test is passed |
| 27 |
or red if it failed. |
| 28 |
</p> |
| 29 |
</d:testDescription> |
| 30 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 31 |
<p> |
| 32 |
Run the test. No interaction required. |
| 33 |
</p> |
| 34 |
</d:operatorScript> |
| 35 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 36 |
<p> |
| 37 |
The test is passed if both rectangles are green. |
| 38 |
</p> |
| 39 |
</d:passCriteria> |
| 40 |
</d:SVGTestCase> |
| 41 |
<title id="test-title">$RCSfile: styling-elem-01-b.svg,v $</title> |
| 42 |
<defs> |
| 43 |
<font-face |
| 44 |
font-family="SVGFreeSansASCII" |
| 45 |
unicode-range="U+0-7F"> |
| 46 |
<font-face-src> |
| 47 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 48 |
</font-face-src> |
| 49 |
</font-face> |
| 50 |
</defs> |
| 51 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 52 |
|
| 53 |
<text x='10' y='30'>Test that <style type=""> is honored</text> |
| 54 |
|
| 55 |
<rect id='r1' x='10' y='50' width='50' height='50' fill='red'/> |
| 56 |
<rect id='r2' x='10' y='110' width='50' height='50' fill='green'/> |
| 57 |
<text x='70' y='78'>No type="" attribute</text> |
| 58 |
<text x='70' y='138'>Rubbish type="" attribute</text> |
| 59 |
|
| 60 |
<style>#r1 { fill: green }</style> |
| 61 |
<style type='text/some-unknown-styling-language'>#r2 { fill: red }</style> |
| 62 |
|
| 63 |
</g> |
| 64 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 65 |
<text id="revision" x="10" y="340" stroke="none" |
| 66 |
fill="black">$Revision: 1.6 $</text> |
| 67 |
</g> |
| 68 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 69 |
<!-- comment out this watermark once the test is approved --><!-- |
| 70 |
<g id="draft-watermark"> |
| 71 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 72 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 73 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 74 |
</g>--> |
| 75 |
</svg> |