Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / linking-uri-01-b.svg
blobe83a9e79f0197947804bc4d9f78910c0aceb37e4
1 <svg version="1.1" baseProfile="basic" id="svg-root" width="100%" height="100%" onload="clickLink()"
2 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3 <!--======================================================================-->
4 <!--= SVG 1.1 2nd Edition Test Case =-->
5 <!--======================================================================-->
6 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
7 <!--= Institute of Technology, European Research Consortium for =-->
8 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
9 <!--= All Rights Reserved. =-->
10 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <script type="text/ecmascript"><![CDATA[
14 if (window.testRunner)
15 window.testRunner.waitUntilDone();
17 function linkClicked()
19 if (window.testRunner)
20 window.testRunner.notifyDone();
23 function clickLink() {
24 if (window.eventSender) {
25 eventSender.mouseMoveTo(160, 165);
26 eventSender.mouseDown();
27 eventSender.mouseUp();
28 } else {
29 // in manual mode
30 alert("Please use run-webkit-tests.");
33 ]]>
34 </script>
35 <title id="test-title">$RCSfile: linking-uri-01-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"/>
41 </font-face-src>
42 </font-face>
43 </defs>
44 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
45 <text x="65" y="16" font-size="12">Link test of the 'view' element and its attributes, 1 of 2, internal.</text>
46 <g font-size="14">
47 <g transform="translate(-150,75)">
48 <rect x="300" y="55" width="125" height="85" fill="#aaa"/>
50 <a xlink:href="#rect-view">
51 <text x="310" y="70" fill="purple">Go to Rectangle</text>
52 </a>
53 <a xlink:href="#ellipse-view">
54 <text onclick="linkClicked()" x="310" y="90" fill="blue">Go to Ellipse</text>
55 </a>
56 <a xlink:href="#circle-view">
57 <text x="310" y="110" fill="yellow">Go to Circle</text>
59 </a>
60 <a xlink:href="#polygon-view">
61 <text x="310" y="130" fill="green">Go to Polygon</text>
62 </a>
63 <text x="315" y="152" font-size="12">Click element's line</text>
64 <text x="315" y="164" font-size="12">to link to its view</text>
65 </g>
67 <!-- View with no attributes. Picture should not change. -->
68 <view id="rect-view"/>
69 <rect id="rect-object" fill="purple" x="295" y="36" width="135" height="68"/>
70 <text id="rect-label" x="362.5" y="116" text-anchor="middle">Rectangle</text>
71 <rect x="292" y="29" width="141" height="91" fill="none" stroke="black"/>
72 <text x="362.5" y="132" font-size="10" text-anchor="middle">No view attributes except id.</text>
73 <!-- Test viewBox. Should blow-up the ellipse in the frame. -->
75 <view id="ellipse-view" viewBox="295 216 150 82"/>
76 <ellipse id="ellipse-object" fill="blue" cx="370" cy="251" rx="72" ry="32"/>
77 <text id="ellipse-label" x="370" y="295" text-anchor="middle">Ellipse</text>
78 <rect x="295" y="216" width="150" height="82" fill="none" stroke="black"/>
79 <text x="315" y="212" font-size="10">viewBox, should fill frame.</text>
80 <!-- Test preserveAspectRatio. -->
81 <view id="circle-view" viewBox="36 29 98 91" preserveAspectRatio="none"/>
82 <circle id="circle-object" fill="yellow" cx="85" cy="68" r="36"/>
84 <text id="circle-label" x="85" y="116" text-anchor="middle">Circle</text>
85 <rect x="36" y="29" width="98" height="91" fill="none" stroke="black"/>
86 <text x="85" y="130" font-size="10" text-anchor="middle">viewBox &amp; non-uniform</text>
87 <text x="85" y="139" font-size="10" text-anchor="middle">preserveAspectRatio</text>
88 <!-- Test viewTarget attribute, no change to the viewport. -->
89 <view id="polygon-view" viewTarget="polygon-object"/>
91 <polygon id="polygon-object" fill="green" points="87,211 134,238 116,283 57,283 39,238 87,211"/>
92 <text id="polygon-label" x="85" y="295" text-anchor="middle">Polygon</text>
93 <rect x="36" y="208" width="100" height="89" fill="none" stroke="black"/>
94 <text x="85" y="195" font-size="10" text-anchor="middle">viewTarget, no</text>
95 <text x="85" y="204" font-size="10" text-anchor="middle">changes to viewport</text>
96 </g>
97 </g>
99 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
100 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.12 $</text>
101 </g>
102 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
103 <!-- comment out this watermark once the test is approved -->
104 <!--<g id="draft-watermark">
105 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
106 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
107 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
108 </g>-->
109 </svg>