blob: 323b4b4aed6492338a2e1d6eb7ee99856a44afad [file] [log] [blame]
<embed id="plugin" src="../resources/orange.mov"></embed>
<div id="result">FAIL, plugin did not receive mouse click event.</div>
<script>
if (window.testRunner) {
window.internals.settings.setPlugInSnapshottingEnabled(true);
window.internals.settings.setMaximumPlugInSnapshotAttempts(0);
var embed = document.getElementById("plugin");
var div = document.getElementById("result");
embed.addEventListener("click", function() {
div.innerHTML = "PASS, plugin did receive mouse click event.";
testRunner.notifyDone();
});
testRunner.waitUntilDone();
setTimeout(function() {
var embed = document.querySelector("embed");
var rect = embed.getBoundingClientRect();
eventSender.mouseMoveTo(rect.left + 10, rect.top + 10);
eventSender.mouseDown();
eventSender.mouseUp();
setTimeout(function() {
testRunner.notifyDone();
}, 500);
}, 500);
testRunner.dumpAsText();
}
</script>