1 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" onload=
"runTest()">
5 testRunner.dumpAsText();
9 function addToStatus(s) {
10 document.getElementById(
"status").textContent += s;
12 function setStatus(s) {
13 document.getElementById(
"status").textContent = s;
16 function testClickAt(x, y, expectedResult) {
17 eventSender.mouseMoveTo(x, y);
18 eventSender.mouseDown();
19 eventSender.mouseUp();
21 addToStatus(
"Hit test @ " + x +
", " + y);
22 if (clicked == expectedResult)
23 addToStatus(
" SUCCESS, got " + clicked);
25 addToStatus(
"FAILURE, expected " + expectedResult)
32 if (!window.eventSender) {
33 setStatus(
"This test requires DumpRenderTree to run. Dots are where the clicks go.");
36 testClickAt(
219,
196, true);
37 testClickAt(
236,
300, false);
41 if (!window.testRunner)
42 alert(
"Clicked hidden image @ " + event.clientX +
", " + event.clientY);
47 <circle cx=
"219" cy=
"196" r=
"3" />
48 <circle cx=
"236" cy=
"300" r=
"3" />
49 <g transform=
"rotate(30)" style=
"visibility:hidden">
50 <svg x=
"250" width=
"100" height=
"150" style=
"overflow:hidden">"
51 <rect opacity="0.5" fill="pink
" x="0" y="0" width="240" height="150" />
52 <image pointer-events="all
" onmousedown="gotClick()
" x="0" y="0" width="240" height="150" xlink:href="../W3C-SVG-
1.1/resources/struct-image-
01.png
"/>
55 <text id="status
" x="10" y="20"></text>