Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / image-clipped-hit.svg
blob9ba255c56b0f3928267d410f235f011a74868d9d
1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()">
2 <script>
3 <![CDATA[
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 var clicked = false;
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);
24 else {
25 addToStatus("FAILURE, expected " + expectedResult)
27 addToStatus("; ");
28 clicked = false;
31 function runTest() {
32 if (!window.eventSender) {
33 setStatus("This test requires DumpRenderTree to run. Dots are where the clicks go.");
34 return;
36 testClickAt(219, 196, true);
37 testClickAt(236, 300, false);
40 function gotClick() {
41 if (!window.testRunner)
42 alert("Clicked hidden image @ " + event.clientX + ", " + event.clientY);
43 clicked = true;
45 ]]>
46 </script>
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"/>
53 </svg>
54 </g>
55 <text id="status" x="10" y="20"></text>
56 </svg>