Bug 704423 mousemove event should be cancelable r=smaug

This commit is contained in:
Masayuki Nakano 2014-04-24 23:19:54 +09:00
parent 412b2eab93
commit aa1ef33af8
3 changed files with 41 additions and 6 deletions

View File

@ -114,6 +114,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM # b2g(bu
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug698929.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug704423.html]
[test_bug741666.html]
skip-if = toolkit == 'android'
[test_bug742376.html]

View File

@ -0,0 +1,40 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=704423
-->
<head>
<title>Test for Bug 704423</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704423">Mozilla Bug 704423</a>
<p id="display"></p>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 704423 **/
function doTest()
{
function handler(aEvent) {
aEvent.preventDefault();
ok(aEvent.defaultPrevented,
"mousemove event should be cancelable");
}
window.addEventListener("mousemove", handler, true);
synthesizeMouseAtCenter(document.body, { type: "mousemove" });
window.removeEventListener("mousemove", handler, true);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(doTest);
</script>
</pre>
</body>
</html>

View File

@ -188,9 +188,6 @@ protected:
reason(aReason), context(eNormal), exit(eChild), clickCount(0)
{
switch (aMessage) {
case NS_MOUSE_MOVE:
mFlags.mCancelable = false;
break;
case NS_MOUSEENTER:
case NS_MOUSELEAVE:
mFlags.mBubbles = false;
@ -211,9 +208,6 @@ public:
reason(aReason), context(aContext), exit(eChild), clickCount(0)
{
switch (aMessage) {
case NS_MOUSE_MOVE:
mFlags.mCancelable = false;
break;
case NS_MOUSEENTER:
case NS_MOUSELEAVE:
mFlags.mBubbles = false;