blob: 412658163717c17885e204e1f7271cad73e21ea2 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" onload="runTest()">
<script type="text/ecmascript"><![CDATA[
var states = [];
var clicked;
function testClickAt(x, y) {
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
states.push(clicked);
clicked = false;
}
function checkResults() {
var testAgainst = [true, false];
for (var i = 0; i < testAgainst.length; i++) {
if (testAgainst[i] != states[i]) {
alert("was: " + states);
alert("shouldBe: " + testAgainst);
return false;
}
}
return true;
}
function runTest() {
if (window.eventSender) {
testClickAt(219, 196);
testClickAt(236, 300);
document.getElementById("status").textContent = "Failed";
if (checkResults())
document.getElementById("status").textContent = "Passed";
} else {
// in manual mode
alert("Please use run-webkit-tests.");
}
}
]]></script>
<g style="visibility:hidden" transform="rotate(30)">
<svg x="250" width="100" height="150" style="overflow:hidden">"
<image pointer-events="all" onmousedown="clicked=true;" id="image1PNG" x="0" y="0" width="240" height="150" xlink:href="resources/struct-image-01.png"/>
</svg>
</g>
<text id="status" x="90" y="130" onmousedown="clicked=true;">Unknown</text>
</svg>