Closed
Bug 494744
Opened 16 years ago
Closed 14 years ago
Incorrect canvas test - getImageData() with negative dimensions
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: wesongathedeveloper, Assigned: Ms2ger)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090524 Shiretoko/3.5pre
Build Identifier:
The file /content/canvas/test/test_2d.imageData.get.source.negative.html has errors in it.
1. Lines 30-33 look like:
ok(imgdata1.data[imgdata1.length-4+0] === 255, "imgda...
ok(imgdata1.data[imgdata1.length-4+1] === 255, "imgda...
ok(imgdata1.data[imgdata1.length-4+2] === 255, "imgda...
ok(imgdata1.data[imgdata1.length-4+3] === 255, "imgda...
instead of (referencing the 'length' attr of the 'data' member of the imgdata1 object):
ok(imgdata1.data[imgdata1.data.length-4+0] === 255, "imgda...
ok(imgdata1.data[imgdata1.data.length-4+1] === 255, "imgda...
ok(imgdata1.data[imgdata1.data.length-4+2] === 255, "imgda...
ok(imgdata1.data[imgdata1.data.length-4+3] === 255, "imgda...
2. The test is related to functionality that has not yet been implemented - (see https://bugzilla.mozilla.org/show_bug.cgi?id=392751). Nonetheless, I am working on the aforementioned bug and find that the logic in this test seems to be incorrect. The pixel at 85,25 should actually be the lower right pixel of the region to be returned by the getImageData() call because the dimensions specified are negative. Consequently, the next 8 tests after the call should be verifying that the first 4 array elements represent the (white) top left pixel and that the last 4 array elements represent the (black) bottom right pixel (and not vice versa as is currently the case)
Reproducible: Always
Comment 1•16 years ago
|
||
Bugs against tests go in the component for the relevant code.
Component: General → DOM: Other
OS: Windows XP → All
Product: Testing → Core
QA Contact: general → general
Hardware: x86 → All
Reporter | ||
Updated•16 years ago
|
Component: DOM: Other → Layout: Canvas
Updated•15 years ago
|
QA Contact: general → layout.canvas
Assignee | ||
Comment 2•14 years ago
|
||
Assignee: nobody → Ms2ger
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #516890 -
Flags: review?(roc)
Attachment #516890 -
Flags: review?(roc) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Thanks.
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 4•14 years ago
|
||
Whiteboard: fixed-in-cedar
Updated•14 years ago
|
Keywords: checkin-needed
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
No longer depends on: post2.0
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•