To my knowledge there are no tests of .ico decoding. I'll add one that tests a few different types of decoding (1-bit, 8-bit, 32-bit, and multiple directory entries).
Created attachment 34167 [details] .ico LayoutTest Here's the test. Note that the CG .ico decoder has a bug in how it decodes 1-bit images; I've filed this on Apple's bug tracker and commented on it in the test, so if the bug gets fixed it will hopefully be obvious that the expected PNG should change. There are still other types of decoding that could be tested (PNG-in-.ico, negative tests of broken icons, a BMP decoder test that checks RLE-encoded data), but this is at least better than nothing.
(In reply to comment #1) > I've filed this on Apple's bug tracker and commented on it in the > test, so if the bug gets fixed it will hopefully be obvious that the expected > PNG should change. Would you be willing to share the Apple bug number?
(In reply to comment #2) > (In reply to comment #1) > > I've filed this on Apple's bug tracker > > Would you be willing to share the Apple bug number? Sure, it's ID 7114290. I don't think it's very important to fix -- probably few if any icons in the wild are 1-bit.
Comment on attachment 34167 [details] .ico LayoutTest LGTM. Seems we should file a bug about the CG decoder. http://radar.apple.com/ is probably the right place for that, even though I hate that site. :(
(In reply to comment #4) > Seems we should file a bug about the CG decoder. > http://radar.apple.com/ is probably the right place for that, even though I > hate that site. :( I am confused. I already said above that I'd filed a bug for this.
Fixed in r46871.