| 1 |
<svg version="1.1" baseProfile="tiny" 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="SVGWG" author="ED" status="accepted" |
| 15 |
version="$Revision: 1.3 $" testname="$RCSfile: animate-interact-pevents-01-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty"> |
| 17 |
<p> |
| 18 |
This test tests 'pointer-events' on text. Initially you should see four big rects with black stroke. |
| 19 |
In the uppermost rect there should be 10 'O':s with black fill. |
| 20 |
In the second rect from the top there should be 10 'O':s with no fill but with black stroke. |
| 21 |
In the third and fourth rects there should be no visible 'O':s at all. |
| 22 |
In the fourth rect there should be two green rects, and in each of the other three rects there should be one green rect. |
| 23 |
</p> |
| 24 |
</d:testDescription> |
| 25 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 26 |
<p> |
| 27 |
Using the pointer device move the cursor over each of the four black-stroked rectangles from left to right. |
| 28 |
As the mouseover event triggers, the 'O':s will become visible and marked |
| 29 |
in either green (a pass) or red (an immediate fail). Some 'O':s will not |
| 30 |
change when the pointer is moved over them. |
| 31 |
</p> |
| 32 |
</d:operatorScript> |
| 33 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 34 |
<p> |
| 35 |
The test has passed if after moving the cursor over all the rects: |
| 36 |
</p> |
| 37 |
<ol> |
| 38 |
<li>all the 'O':s in the green rects have green fill</li> |
| 39 |
<li>there are no red 'O':s visible</li> |
| 40 |
<li>there are 9 green 'O':s in the first and second rect, 4 in the third rect and 6 in the fourth rect</li> |
| 41 |
</ol> |
| 42 |
</d:passCriteria> |
| 43 |
</d:SVGTestCase> |
| 44 |
<title id="test-title">$RCSfile: animate-interact-pevents-01-t.svg,v $</title> |
| 45 |
<defs> |
| 46 |
<font-face font-family="SVGFreeSansASCII" 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 |
<g font-family="sans-serif" font-size="40" text-rendering="geometricPrecision"> |
| 54 |
<text x="240" y="40" text-anchor="middle" font-size="20">Test pointer-events on text</text> |
| 55 |
<g transform="translate(40, -10)"> |
| 56 |
<g id="first-line"> |
| 57 |
<text x="50" y="100"> |
| 58 |
O |
| 59 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 60 |
</text> |
| 61 |
<text x="80" y="100" pointer-events="visiblePainted"> |
| 62 |
O |
| 63 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 64 |
</text> |
| 65 |
<text x="110" y="100" pointer-events="visibleFill"> |
| 66 |
O |
| 67 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 68 |
</text> |
| 69 |
<text x="140" y="100" pointer-events="visibleStroke"> |
| 70 |
O |
| 71 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 72 |
</text> |
| 73 |
<text x="170" y="100" pointer-events="visible"> |
| 74 |
O |
| 75 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 76 |
</text> |
| 77 |
<text x="200" y="100" pointer-events="painted"> |
| 78 |
O |
| 79 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 80 |
</text> |
| 81 |
<text x="230" y="100" pointer-events="fill"> |
| 82 |
O |
| 83 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 84 |
</text> |
| 85 |
<text x="260" y="100" pointer-events="stroke"> |
| 86 |
O |
| 87 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 88 |
</text> |
| 89 |
<text x="290" y="100" pointer-events="all"> |
| 90 |
O |
| 91 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 92 |
</text> |
| 93 |
<text x="320" y="100" pointer-events="none"> |
| 94 |
O |
| 95 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 96 |
</text> |
| 97 |
|
| 98 |
<g pointer-events="none"> |
| 99 |
<rect x="50" y="65" height="40" width="270" fill="green" fill-opacity="0.5" visibility="visible"/> |
| 100 |
|
| 101 |
<rect x="50" y="65" height="40" width="300" fill="none" stroke="black" visibility="visible"/> |
| 102 |
</g> |
| 103 |
</g> |
| 104 |
|
| 105 |
<g id="second-line" transform="translate(0 60)" fill="none" stroke="black"> |
| 106 |
<text x="50" y="100"> |
| 107 |
O |
| 108 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 109 |
</text> |
| 110 |
<text x="80" y="100" pointer-events="visiblePainted"> |
| 111 |
O |
| 112 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 113 |
</text> |
| 114 |
<text x="110" y="100" pointer-events="visibleFill"> |
| 115 |
O |
| 116 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 117 |
</text> |
| 118 |
<text x="140" y="100" pointer-events="visibleStroke"> |
| 119 |
O |
| 120 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 121 |
</text> |
| 122 |
<text x="170" y="100" pointer-events="visible"> |
| 123 |
O |
| 124 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 125 |
</text> |
| 126 |
<text x="200" y="100" pointer-events="painted"> |
| 127 |
O |
| 128 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 129 |
</text> |
| 130 |
<text x="230" y="100" pointer-events="fill"> |
| 131 |
O |
| 132 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 133 |
</text> |
| 134 |
<text x="260" y="100" pointer-events="stroke"> |
| 135 |
O |
| 136 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 137 |
</text> |
| 138 |
<text x="290" y="100" pointer-events="all"> |
| 139 |
O |
| 140 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 141 |
</text> |
| 142 |
<text x="320" y="100" pointer-events="none"> |
| 143 |
O |
| 144 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 145 |
</text> |
| 146 |
|
| 147 |
<g pointer-events="none"> |
| 148 |
<rect x="50" y="65" height="40" width="270" fill="green" fill-opacity="0.5" visibility="visible" stroke="none"/> |
| 149 |
|
| 150 |
<rect x="50" y="65" height="40" width="300" fill="none" stroke="black" visibility="visible"/> |
| 151 |
</g> |
| 152 |
</g> |
| 153 |
|
| 154 |
<g id="third-line" transform="translate(0 120)" visibility="hidden"> |
| 155 |
<text x="50" y="100"> |
| 156 |
O |
| 157 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 158 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 159 |
</text> |
| 160 |
<text x="80" y="100" pointer-events="visiblePainted"> |
| 161 |
O |
| 162 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 163 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 164 |
</text> |
| 165 |
<text x="110" y="100" pointer-events="visibleFill"> |
| 166 |
O |
| 167 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 168 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 169 |
</text> |
| 170 |
<text x="140" y="100" pointer-events="visibleStroke"> |
| 171 |
O |
| 172 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 173 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 174 |
</text> |
| 175 |
<text x="170" y="100" pointer-events="visible"> |
| 176 |
O |
| 177 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 178 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 179 |
</text> |
| 180 |
<text x="200" y="100" pointer-events="painted"> |
| 181 |
O |
| 182 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 183 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 184 |
</text> |
| 185 |
<text x="230" y="100" pointer-events="fill"> |
| 186 |
O |
| 187 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 188 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 189 |
</text> |
| 190 |
<text x="260" y="100" pointer-events="stroke"> |
| 191 |
O |
| 192 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 193 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 194 |
</text> |
| 195 |
<text x="290" y="100" pointer-events="all"> |
| 196 |
O |
| 197 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 198 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 199 |
</text> |
| 200 |
<text x="320" y="100" pointer-events="none"> |
| 201 |
O |
| 202 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 203 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 204 |
</text> |
| 205 |
|
| 206 |
<g pointer-events="none"> |
| 207 |
<rect x="200" y="65" height="40" width="120" fill="green" fill-opacity="0.5" visibility="visible"/> |
| 208 |
|
| 209 |
<rect x="50" y="65" height="40" width="300" fill="none" stroke="black" visibility="visible"/> |
| 210 |
</g> |
| 211 |
</g> |
| 212 |
|
| 213 |
<g id="fourth-line" transform="translate(0 180)" fill="none" stroke="none"> |
| 214 |
<text x="50" y="100"> |
| 215 |
O |
| 216 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 217 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 218 |
</text> |
| 219 |
<text x="80" y="100" pointer-events="visiblePainted"> |
| 220 |
O |
| 221 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 222 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 223 |
</text> |
| 224 |
<text x="110" y="100" pointer-events="visibleFill"> |
| 225 |
O |
| 226 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 227 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 228 |
</text> |
| 229 |
<text x="140" y="100" pointer-events="visibleStroke"> |
| 230 |
O |
| 231 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 232 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 233 |
</text> |
| 234 |
<text x="170" y="100" pointer-events="visible"> |
| 235 |
O |
| 236 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 237 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 238 |
</text> |
| 239 |
<text x="200" y="100" pointer-events="painted"> |
| 240 |
O |
| 241 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 242 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 243 |
</text> |
| 244 |
<text x="230" y="100" pointer-events="fill"> |
| 245 |
O |
| 246 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 247 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 248 |
</text> |
| 249 |
<text x="260" y="100" pointer-events="stroke"> |
| 250 |
O |
| 251 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 252 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 253 |
</text> |
| 254 |
<text x="290" y="100" pointer-events="all"> |
| 255 |
O |
| 256 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 257 |
<set attributeName="fill" to="green" begin="mouseover" dur="indefinite"/> |
| 258 |
</text> |
| 259 |
<text x="320" y="100" pointer-events="none"> |
| 260 |
O |
| 261 |
<set attributeName="visibility" to="visible" begin="mouseover" dur="indefinite"/> |
| 262 |
<set attributeName="fill" to="red" begin="mouseover" dur="indefinite"/> |
| 263 |
</text> |
| 264 |
|
| 265 |
<g pointer-events="none"> |
| 266 |
<rect x="110" y="65" height="40" width="90" fill="green" fill-opacity="0.5" visibility="visible"/> |
| 267 |
<rect x="230" y="65" height="40" width="90" fill="green" fill-opacity="0.5" visibility="visible"/> |
| 268 |
|
| 269 |
<rect x="50" y="65" height="40" width="300" fill="none" stroke="black" visibility="visible"/> |
| 270 |
</g> |
| 271 |
</g> |
| 272 |
</g> |
| 273 |
</g> |
| 274 |
</g> |
| 275 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 276 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text> |
| 277 |
</g> |
| 278 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 279 |
<!-- comment out this watermark once the test is approved --> |
| 280 |
<!--<g id="draft-watermark"> |
| 281 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 282 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 283 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 284 |
</g>--> |
| 285 |
</svg> |