Debian Codegraph @

test_non_regression/fail/na/script/struct-image-11-b.svg

raw
1 <svg version="1.1" baseProfile="full" id="svg-root"
2 width="100%" height="100%" viewBox="0 0 480 360"
3 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= SVG 1.1 2nd Edition Test Case =-->
6 <!--======================================================================-->
7 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
8 <!--= Institute of Technology, European Research Consortium for =-->
9 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
10 <!--= All Rights Reserved. =-->
11 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
14 template-version="1.4" reviewer="CM" author="ED" status="reviewed"
15 version="$Revision: 1.7 $" testname="$RCSfile: struct-image-11-b.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#ImageElement">
17 <p>
18 Test interactivity in an svg image referenced by an 'image' element.
19 </p>
20 <p>
21 This test requires support for CSS2 and referencing SVG and PNG images via the 'image' element.
22 </p>
23 </d:testDescription>
24 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
25 <p>
26 Click each of the three rectangles in the center of the testframe once.
27 </p>
28 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 The test is passed if all three rectangles are green after being clicked once each.
32 </p>
33 </d:passCriteria>
34 </d:SVGTestCase>
35 <title id="test-title">$RCSfile: struct-image-11-b.svg,v $</title>
36 <defs>
37 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
38 <font-face-src>
39 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
40 </font-face-src>
41 </font-face>
42 </defs>
43 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
44 <script type="application/ecmascript">
45 function makeGreen(evt, expectedId)
46 {
47 if (evt.target.id == expectedId)
48 {
49 evt.target.href.baseVal = "../images/green1x1.png";
50 }
51 }
52 </script>
53 <image id="imageSVG1" x="180" y="50" width="120" height="120" xlink:href="../images/struct-image-11-b-1.svg" onclick="makeGreen(evt, 'imageSVG1')"/>
54 <image id="imageSVG2" x="60" y="170" width="120" height="120" xlink:href="../images/struct-image-11-b-2.svg" onclick="makeGreen(evt, 'imageSVG2')"/>
55 <image id="imageSVG3" x="300" y="170" width="120" height="120" xlink:href="../images/blue1x1.png" onclick="makeGreen(evt, 'imageSVG3')"/>
56 </g>
57 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
58 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
59 </g>
60 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
61 <!-- comment out this watermark once the test is approved -->
62 <g id="draft-watermark">
63 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
64 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
65 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
66 </g>
67 </svg>