Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: LayoutTests/fast/events/mousemove.html

Issue 23463012: Make the mousemove event cancellable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/mousemove-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../js/resources/js-test-pre.js"></script>
3 <body>
4 <div id="testelm">The test element<div>
5 <script>
6 var testElm = document.getElementById("testelm");
7 testElm.addEventListener("mousemove", function(event) {
8 if (event.defaultPrevented) {
9 testFailed("Mouse event already cancelled.");
10 return;
11 }
12 event.preventDefault();
13 if (!event.defaultPrevented) {
14 testFailed("Mouse event not cancellable.");
15 return;
16 }
17 testPassed("Mouse move event cancellable.")
18 }, false);
19 if ("eventSender" in window) {
20 eventSender.mouseMoveTo(testElm.offsetLeft + testElm.offsetWidth / 3,
21 testElm.offsetTop + testElm.offsetHeight / 2);
22 eventSender.mouseMoveTo(testElm.offsetLeft + testElm.offsetWidth / 3 * 2,
23 testElm.offsetTop + testElm.offsetHeight / 2);
24 }
25 else {
26 testElm.innerHTML = "window.eventSender not available. To test move the mo use on top of this text.";
27 }
28 </script>
29 </body>
30 <script src="../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/mousemove-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698