blob: 62a5a237e4f15a407c4405c1e498fa8f5a43bb9c [file] [log] [blame]
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<style>
body {
margin: 0px;
padding: 0px;
border: 1px solid black;
}
#square {
fill: blue;
}
#square:hover {
fill: green;
}
</style>
</head>
<body>
<table><tr><td>
<svg width='100px' height='100px' style='padding: 50px' xmlns='http://www.w3.org/2000/svg'>
<svg>
<rect id='square' width='100' height='100' onclick='alert("You clicked the square! It worked!")'/>
</svg>
</svg>
</td></tr></table>
<script><![CDATA[
if (window.testRunner) {
testRunner.dumpAsText();
}
var hitElement = document.elementFromPoint(75, 75);
var hitSuccess = hitElement && hitElement == document.getElementById("square");
document.body.innerHTML = hitSuccess ? "PASSED" : "FAIL, hit " + hitElement + " @ 50, 50";
]]></script>
</body>
</html>