| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| <style type="text/css"> |
| </style> |
| </head> |
| <body> |
| <p id="description"></p> |
| <p><a href="https://bugs.webkit.org/show_bug.cgi?id=85343">Bug 85343</a></p> |
| <div id="test-container"> |
| <div id="target" style="cursor:default">Mouse idle, change cursor should not fire mousemove event</div> |
| </div> |
| <br/> |
| <div id="console"></div> |
| <script> |
| var CURSOR_UPDATE_DELAY = 50; |
| |
| description("Test that there is no mousemove event fired when changing cursor."); |
| |
| if (!window.eventSender) { |
| testFailed('This test requires DumpRenderTree'); |
| } |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| window.jsTestIsAsync = true; |
| } |
| |
| // Can't do anything useful here without eventSender |
| if (window.eventSender) { |
| var node = document.getElementById('target'); |
| debug('TEST CASE: ' + node.textContent); |
| eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop + 3); |
| debug('Cursor Info: ' + window.internals.getCurrentCursorInfo()); |
| node.addEventListener('mousemove', function() { |
| testFailed('Mousemove event should not be fired when changing cursor'); |
| finishJSTest(); |
| }); |
| node.style.cursor = 'help'; |
| setTimeout(function() { |
| debug('Cursor Info: ' + window.internals.getCurrentCursorInfo()); |
| debug(''); |
| }, CURSOR_UPDATE_DELAY); |
| |
| // Give some time for the change to resolve. Fake mousemove event that caused bug, is using a timer |
| setTimeout(function() { |
| document.getElementById('test-container').style.display = 'none'; |
| finishJSTest(); |
| }, 150); |
| } |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |