synthesizeMouse function needs to be adjusted to more reflect reality when double/triple-clicking

REOPENED
Unassigned

Status

REOPENED
9 years ago
2 years ago

People

(Reporter: martijn.martijn, Unassigned)

Tracking

({testcase})

unspecified
testcase
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

9 years ago
Created attachment 430652 [details]
testcase

In the sendMouseEvent function:
http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#18

When we do a double-click for instance, we only generate 1 click with clickCount 2 and dblclick event, which is not what happens, when you do a real double-click.
With a real double-click, you first get a click with clickCount 1, then a click with clickCount 2, then a dblclick event.
This is probably the cause for bug 537968.
So EventUtils.js should do something similar, to more reflect reality.

Tests that could be affected by this change are:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/tests/chrome/test_bug_429247.xul
http://mxr.mozilla.org/mozilla-central/source/layout/style/test/test_pointer-events.html?force=1
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/tests/chrome/test_bug_429247.xul
Stuff that use tree_shared.js:
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/tests/widgets/tree_shared.js
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/tests/widgets/test_richlist_direction.xul
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_pageInfo.js
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_bug432599.js
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_overflowScroll.js
Flags: in-testsuite-
(Reporter)

Comment 1

9 years ago
Created attachment 430655 [details]
testcase
Attachment #430652 - Attachment is obsolete: true
OS: Windows 7 → All
Hardware: x86 → All
(Reporter)

Comment 2

9 years ago
Created attachment 430666 [details] [diff] [review]
patch

This takes into effect what Neal wants with the function, commented in bug 537968, comment 9.
I haven't tested this patch yet.
(Reporter)

Comment 3

9 years ago
I uploaded a patch to the tryserver, but for some reason it failed on winmo or something:
http://tinderbox.mozilla.org/showbuilds.cgi?tree=MozillaTry

I tested the patch with test_pointer-events.html, that worked at least.
(Reporter)

Comment 4

9 years ago
Ok, builds are here:
https://build.mozilla.org/tryserver-builds/mwargers@mozilla.com-1267815144/
But I'm more interested what Tinderbox says, regarding the tests.
(Reporter)

Comment 5

9 years ago
Comment on attachment 430666 [details] [diff] [review]
patch

Tryserver tinderbox seems to be all green, so I guess this patch is ready for review.
Attachment #430666 - Flags: review?(enndeakin)

Updated

9 years ago
Attachment #430666 - Flags: review?(enndeakin) → review+
(Reporter)

Updated

9 years ago
Keywords: checkin-needed
(Reporter)

Updated

9 years ago
Keywords: checkin-needed
(Reporter)

Comment 6

9 years ago
Sorry, tryserver just mailed me that some tests were failing:
Summary of unittest results:
check: 577/0
xpcshell-tests: 746/0
reftest: 4211/0/242
crashtest: 1484/0/10
mochitest-plain: 156662/<em class="testfail">4</em>/1345
mochitest-chrome: 8759/0/109
mochitest-browser-chrome: 4371/<em class="testfail">2</em>/3
mochitest-a11y: 13726/0/8

http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1267815208.1267824397.8599.gz
159687 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/content/tests/widgets/test_tree.xul | cycleHeader column sortDirection - got "ascending", expected ""
160561 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/content/tests/widgets/test_tree_hier.xul | cycleHeader column sortDirection - got "ascending", expected ""
161321 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/content/tests/widgets/test_tree_hier_cell.xul | cycleHeader column sortDirection - got "ascending", expected ""
161858 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/content/tests/widgets/test_tree_single.xul | cycleHeader column sortDirection - got "ascending", expected ""
PROCESS-CRASH | automation.py | application crashed (minidump found)
Thread 1 (crashed)
PROCESS-CRASH | automation.py | application crashed (minidump found)
Thread 1 (crashed)
PROCESS-CRASH | automation.py | application crashed (minidump found)
Thread 1 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/base/content/test/browser_overflowScroll.js | Scrolled one page of tabs with a double click - Got 114, expected 16
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/base/content/test/browser_pageInfo.js | When the lock is clicked twice there should be only one page info dialog - Got 2, expected 1

At least some of those failures are files that I already mentioned, that could possibly cause test failures, so I have to look into these.
Martijn, have you had time in the last two weeks to check those failures?
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.