Closed Bug 550701 Opened 14 years ago Closed 14 years ago

synthesizeDragStart should not fail with |expectedDragData| = null

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.3a3

People

(Reporter: mounir, Assigned: mounir)

Details

Attachments

(1 file)

According to the comments [1] and to the code [2], synthesizeDragStart should accept |expectedDragData| = null and throw |dataTransfer|.
At the moment, dataTransfer.mozItemCount != expectedDragData.length is called before checking if |expectedDragData| is null. So, if |expectedDragData| is null, an exception is thrown because of expectedDragData.length.

[1] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#421

[2] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#449
Attachment #430852 - Flags: review?(enndeakin)
Status: NEW → ASSIGNED
Attachment #430852 - Flags: review?(enndeakin) → review+
By the way, to be sure no tests were expecting the buggy behavior, I put the patch on the try server and everything was okay.
Now, asking for checkin.
Keywords: checkin-needed
Comment on attachment 430852 [details] [diff] [review]
Patch v0.1
[Checkin: Comment 2]


http://hg.mozilla.org/mozilla-central/rev/ba67224d0e8d
Attachment #430852 - Attachment description: Patch v0.1 → Patch v0.1 [Checkin: Comment 2]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a3
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: