test_bug704423.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=704423
  5. -->
  6. <head>
  7. <title>Test for Bug 704423</title>
  8. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. </head>
  12. <body>
  13. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704423">Mozilla Bug 704423</a>
  14. <p id="display"></p>
  15. <pre id="test">
  16. <script type="application/javascript">
  17. /** Test for Bug 704423 **/
  18. function doTest()
  19. {
  20. function handler(aEvent) {
  21. aEvent.preventDefault();
  22. ok(aEvent.defaultPrevented,
  23. "mousemove event should be cancelable");
  24. }
  25. window.addEventListener("mousemove", handler, true);
  26. synthesizeMouseAtCenter(document.body, { type: "mousemove" });
  27. window.removeEventListener("mousemove", handler, true);
  28. SimpleTest.finish();
  29. }
  30. SimpleTest.waitForExplicitFinish();
  31. SimpleTest.waitForFocus(doTest);
  32. </script>
  33. </pre>
  34. </body>
  35. </html>