Bug 72234

Summary: Test JPEG image decoding RGB pixel endianess
Product: WebKit Reporter: noel gordon <noel.gordon>
Component: New BugsAssignee: noel gordon <noel.gordon>
Status: RESOLVED FIXED    
Severity: Normal CC: tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 59670    
Attachments:
Description Flags
Patch
none
Patch none

noel gordon
Reported 2011-11-13 19:15:35 PST
Test JPEG image decoding RGB pixel endianess
Attachments
Patch (6.46 KB, patch)
2011-11-13 19:16 PST, noel gordon
no flags
Patch (6.50 KB, patch)
2011-11-14 03:35 PST, noel gordon
no flags
noel gordon
Comment 1 2011-11-13 19:16:32 PST
Kent Tamura
Comment 2 2011-11-14 01:23:15 PST
Comment on attachment 114872 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114872&action=review > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:9 > +<img src="resources/rgb-jpeg-red.jpg" onload="test(this, [255,0,0,255])"> > +<img src="resources/rgb-jpeg-green.jpg" onload="test(this, [0,255,0,255])"> > +<img src="resources/rgb-jpeg-blue.jpg" onload="test(this, [0,0,255,255])"> > + > +<pre id="log">PASS</pre> Because there are three tests, we had better show three 'PASS' in the test result. > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:13 > + layoutTestController.waitUntilDone(), layoutTestController.dumpAsText(); No reason to use a comma operator here. > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:24 > + r += data[i + 0], g += data[i + 1], b += data[i + 2], a += data[i + 3]; ditto. > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:26 > + return [ r / size, g / size, b / size, a / size ]; nit: spaces after ']' and before ']' are not needed. > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:36 > + if (tolerance = tolerance || 0, delta > tolerance) The tolerance argument is always specified. We don't need "tolerance = tolerance || 0". Also, there is no reason to use a comma operator here. > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:60 > + if (testImage(image, expect), ++loadedImages < 3) No reason to use a comma operator here.
noel gordon
Comment 3 2011-11-14 03:35:45 PST
noel gordon
Comment 4 2011-11-14 03:38:23 PST
(In reply to comment #2) > (From update of attachment 114872 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=114872&action=review > > > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:9 > > +<img src="resources/rgb-jpeg-red.jpg" onload="test(this, [255,0,0,255])"> > > +<img src="resources/rgb-jpeg-green.jpg" onload="test(this, [0,255,0,255])"> > > +<img src="resources/rgb-jpeg-blue.jpg" onload="test(this, [0,0,255,255])"> > > + > > +<pre id="log">PASS</pre> > > Because there are three tests, we had better show three 'PASS' in the test result. We shown up to 3 failures should they happen, sufficient? > > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:13 > > + layoutTestController.waitUntilDone(), layoutTestController.dumpAsText(); > > No reason to use a comma operator here. One day layoutTestController will return its |this| context. Removed. > > LayoutTests/fast/images/rgb-jpeg-endian-pixels.html:24 > > + r += data[i + 0], g += data[i + 1], b += data[i + 2], a += data[i + 3]; > > ditto. All done, and the others you mentioned.
Kent Tamura
Comment 5 2011-11-14 16:54:37 PST
Comment on attachment 114910 [details] Patch ok
noel gordon
Comment 6 2011-11-14 16:55:51 PST
Thankyou Tamura-san
WebKit Review Bot
Comment 7 2011-11-14 17:13:41 PST
Comment on attachment 114910 [details] Patch Clearing flags on attachment: 114910 Committed r100220: <http://trac.webkit.org/changeset/100220>
WebKit Review Bot
Comment 8 2011-11-14 17:13:46 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.