Debian Codegraph @

test_non_regression/fail/na/script/struct-dom-08-f.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="DAS" author="CM" status="accepted"
13 version="$Revision: 1.8 $" testname="$RCSfile: struct-dom-08-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/[chapter]">
15 <p>
16 This tests that SVGSVGElement.unsuspendRedraw() does not
17 throw an exception if the redraw suspend timeout has elapsed.
18 After loading the test, wait for one second. Some time
19 before the one second has elapsed, the rectangle should change
20 color to indicate the result of the test: black if the test
21 did not run, red if the test failed and green if the test
22 passed.
23 </p>
24 </d:testDescription>
25 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
26 <p>
27 Run the test. No interaction required.
28 </p>
29 </d:operatorScript>
30 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
31 <p>
32 The test is passed if the rectangle is green one
33 second after the test is loaded.
34 </p>
35 </d:passCriteria>
36 </d:SVGTestCase>
37 <title id="test-title">$RCSfile: struct-dom-08-f.svg,v $</title>
38 <defs>
39 <font-face
40 font-family="SVGFreeSansASCII"
41 unicode-range="U+0-7F">
42 <font-face-src>
43 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
44 </font-face-src>
45 </font-face>
46 </defs>
47 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
48
49 <text x='10' y='50'>Test that unsuspendRedraw() doesn't throw</text>
50 <rect id='r' x='10' y='60' width='50' height='50'/>
51
52 <script>
53 var id, svg = document.documentElement;
54
55 function begin() {
56 id = svg.suspendRedraw(10);
57 window.setTimeout("end()", 1000);
58 }
59
60 function end() {
61 try {
62 svg.unsuspendRedraw(id);
63 document.getElementById('r').setAttribute('fill', 'green');
64 return;
65 } catch (e) {
66 }
67 document.getElementById('r').setAttribute('fill', 'red');
68 }
69
70 begin();
71 </script>
72 </g>
73 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
74 <text id="revision" x="10" y="340" stroke="none"
75 fill="black">$Revision: 1.8 $</text>
76 </g>
77 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
78 <!-- comment out this watermark once the test is approved --><!--
79 <g id="draft-watermark">
80 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
81 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
82 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
83 </g>-->
84 </svg>