blob: f3dc51965f7d1d7df85d199228cba57da80b0f14 [file] [log] [blame]
<html xmlns='http://www.w3.org/1999/xhtml'>
<body style="margin: 0px; padding: 0px">
<p></p>
<div style="position:absolute; top:50px; left:0px; width:100px; height:100px; background-color:blue;"></div>
<svg xmlns="http://www.w3.org/2000/svg" style="position:absolute; top:50px; left:0px; width:100px; height:100px;" pointer-events="none">
<rect width="100" height="100" fill="green" pointer-events="none"/>
</svg>
<script>
var svg = document.getElementsByTagName("svg")[0];
var container = document.getElementsByTagName("div")[0];
var p = document.getElementsByTagName("p")[0];
container.addEventListener("mousedown", passed, false);
svg.addEventListener("mousedown", failed, false);
function stop() {
container.removeEventListener("mousedown", failed, false);
svg.removeEventListener("mousedown", passed, false);
if (window.testRunner)
testRunner.notifyDone();
}
function failed() {
p.innerHTML = 'FAILED: SVGSVGElement had pointer';
stop();
}
function passed() {
p.innerHTML = 'PASSED: HTMLDivElement had pointer';
stop();
}
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
if (window.eventSender) {
eventSender.mouseMoveTo(50, 75);
eventSender.mouseDown();
}
</script>
</body>
</html>