Debian Codegraph @

test_non_regression/fail/na/animation/animate-script-elem-01-b.svg

raw
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.1 $" testname="$RCSfile: animate-script-elem-01-b.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/script.html#ScriptElement">
15 <p>
16 This tests that the 'xlink:href' attribute on the 'script' element is not animatable.
17 </p>
18 <p>
19 After loading the test and waiting one second, two rectangles
20 will appear, indicating the result of two sub-tests. The
21 upper rectangle reflects the result of testing that an
22 attempt to animate 'xlink:href' on 'script' does not affect
23 the .href.animVal of the element. The lower rectangle reflects
24 the result of testing that the animation attempt does not
25 cause a new script to be loaded and executed. Black indicates
26 that the sub-test did not run, red that it failed and green
27 that it passed.
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 once they
38 appear one second after loading the test.
39 </p>
40 </d:passCriteria>
41 </d:SVGTestCase>
42 <title id="test-title">$RCSfile: animate-script-elem-01-b.svg,v $</title>
43 <defs>
44 <font-face
45 font-family="SVGFreeSansASCII"
46 unicode-range="U+0-7F">
47 <font-face-src>
48 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
49 </font-face-src>
50 </font-face>
51 </defs>
52 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
53
54 <text x='10' y='30'>Test that &lt;script xlink:href=""> is not animatable</text>
55
56 <g>
57 <rect id='r1' x='10' y='50' width='30' height='30' fill='black'/>
58 <rect id='r2' x='10' y='90' width='30' height='30' fill='green'/>
59 <g font-size='15'>
60 <text x='50' y='70'>Test script.href.animVal does not change</text>
61 <text x='50' y='110'>Test animating xlink:href="" does not load a script</text>
62 </g>
63
64 <script id='s' xlink:href='../images/empty.js'/>
65 <script>
66 function f() {
67 document.getElementById('r2').setAttribute('fill', 'red');
68 }
69
70 function g() {
71 document.getElementById('r1').setAttribute('fill', document.getElementById('s').href.animVal.indexOf('empty') >= 0 ? 'green' : 'red');
72 }
73 </script>
74 <set xlink:href='#s' attributeName='xlink:href' to='../images/f.js' dur='100s'/>
75 <set attributeName='visibility' to='hidden' dur='1s' onend='g()'/>
76 </g>
77
78 </g>
79 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
80 <text id="revision" x="10" y="340" stroke="none"
81 fill="black">$Revision: 1.1 $</text>
82 </g>
83 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
84 <!-- comment out this watermark once the test is approved --><!--
85 <g id="draft-watermark">
86 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
87 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
88 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
89 </g>-->
90 </svg>