Index: LayoutTests/fast/events/mousemove.html |
diff --git a/LayoutTests/fast/events/mousemove.html b/LayoutTests/fast/events/mousemove.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..390b96387664400325d3b23c37eddeb2065e6822 |
--- /dev/null |
+++ b/LayoutTests/fast/events/mousemove.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<script src="../js/resources/js-test-pre.js"></script> |
+<body> |
+ <div id="testelm">The test element<div> |
+<script> |
+ var testElm = document.getElementById("testelm"); |
+ testElm.addEventListener("mousemove", function(event) { |
+ if (event.defaultPrevented) { |
+ testFailed("Mouse event already cancelled."); |
+ return; |
+ } |
+ event.preventDefault(); |
+ if (!event.defaultPrevented) { |
+ testFailed("Mouse event not cancellable."); |
+ return; |
+ } |
+ testPassed("Mouse move event cancellable.") |
+ }, false); |
+ if ("eventSender" in window) { |
+ eventSender.mouseMoveTo(testElm.offsetLeft + testElm.offsetWidth / 3, |
+ testElm.offsetTop + testElm.offsetHeight / 2); |
+ eventSender.mouseMoveTo(testElm.offsetLeft + testElm.offsetWidth / 3 * 2, |
+ testElm.offsetTop + testElm.offsetHeight / 2); |
+ } |
+ else { |
+ testElm.innerHTML = "window.eventSender not available. To test move the mouse on top of this text."; |
+ } |
+</script> |
+</body> |
+<script src="../js/resources/js-test-post.js"></script> |