# Reftests for downscaling # # Downscaling can be a lossy process, so a bit of mismatch is acceptable here, # as long as it's barely noticable visually. When necessary, this can be # explicitly allowed via 'fuzzy'/'fuzzy-if' annotations. # # Many of these tests check primarily that we don't lose rows or columns of # pixels when downscaling by making sure that the result isn't too similar to # about:blank. A small amount of fuzziness is used to ensure that the tests # don't pass because of very slight deviations; passing tests should be # substantially different from about:blank. This fuzziness should *not* be # removed as doing so would make the tests pass in situations where they # shouldn't. # # IMPORTANT: For robustness, each test should be listed *twice* in this # manifest -- once with the high quality downscaling pref disabled, and once # with this pref enabled. The pref is set via "default-preferences", so # simply appending a new test to the lists below each of those lines should be # sufficient. # # Also note that Mac OS X has its own system-level downscaling algorithm, so # tests here may need Mac-specific "fuzzy-if(cocoaWidget,...)" annotations. # Similarly, modern versions of Windows have slightly different downscaling # behavior than other platforms, and may require "fuzzy-if(winWidget,...)". # RUN TESTS NOT AFFECTED BY DOWNSCALE-DURING-DECODE: # ================================================== == downscale-svg-1a.html downscale-svg-1-ref.html?80 fuzzy(80,468) == downscale-svg-1b.html downscale-svg-1-ref.html?72 == downscale-svg-1c.html downscale-svg-1-ref.html?64 fuzzy(17,208) fuzzy-if(B2G,255,207) == downscale-svg-1d.html downscale-svg-1-ref.html?53 # right side is 1 pixel off for B2G, probably regression from 974242 fuzzy(78,216) == downscale-svg-1e.html downscale-svg-1-ref.html?40 fuzzy(51,90) == downscale-svg-1f.html downscale-svg-1-ref.html?24 # RUN TESTS WITH DOWNSCALE-DURING-DECODE DISABLED: # ================================================ default-preferences pref(image.downscale-during-decode.enabled,false) fuzzy-if(winWidget,16,20) fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html fuzzy(20,999) != downscale-2a.html?203,52,left about:blank fuzzy(20,999) != downscale-2b.html?203,52,left about:blank fuzzy(20,999) != downscale-2c.html?203,52,left about:blank fuzzy(20,999) != downscale-2d.html?203,52,left about:blank fuzzy(20,999) != downscale-2e.html?203,52,left about:blank fuzzy(20,999) != downscale-2a.html?205,53,left about:blank fuzzy(20,999) != downscale-2b.html?205,53,left about:blank fuzzy(20,999) != downscale-2c.html?205,53,left about:blank fuzzy(20,999) != downscale-2d.html?205,53,left about:blank fuzzy(20,999) != downscale-2e.html?205,53,left about:blank fuzzy(20,999) != downscale-2a.html?203,52,right about:blank fuzzy(20,999) != downscale-2b.html?203,52,right about:blank fuzzy(20,999) != downscale-2c.html?203,52,right about:blank fuzzy(20,999) != downscale-2d.html?203,52,right about:blank fuzzy(20,999) != downscale-2e.html?203,52,right about:blank fuzzy(20,999) != downscale-2a.html?205,53,right about:blank fuzzy(20,999) != downscale-2b.html?205,53,right about:blank fuzzy(20,999) != downscale-2c.html?205,53,right about:blank fuzzy(20,999) != downscale-2d.html?205,53,right about:blank fuzzy(20,999) != downscale-2e.html?205,53,right about:blank fuzzy(20,999) != downscale-2a.html?203,52,top about:blank fuzzy(20,999) != downscale-2b.html?203,52,top about:blank fuzzy(20,999) != downscale-2c.html?203,52,top about:blank fuzzy(20,999) != downscale-2d.html?203,52,top about:blank fuzzy(20,999) != downscale-2e.html?203,52,top about:blank fuzzy(20,999) != downscale-2a.html?205,53,top about:blank fuzzy(20,999) != downscale-2b.html?205,53,top about:blank fuzzy(20,999) != downscale-2c.html?205,53,top about:blank fuzzy(20,999) != downscale-2d.html?205,53,top about:blank fuzzy(20,999) != downscale-2e.html?205,53,top about:blank fuzzy(20,999) != downscale-2a.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2b.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2c.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2d.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2e.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2a.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2b.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2c.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank fuzzy(20,999) fails-if(OSX>=1008) != downscale-2e.html?205,53,bottom about:blank == downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal == downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal # Non-transparent and transparent ICO images == downscale-ff.html?ff-0RGB.ico downscale-ff.html?ff-0RGB.png fuzzy(1,1) == downscale-ff.html?ff-ARGB.ico downscale-ff.html?ff-ARGB.png # RUN TESTS WITH DOWNSCALE-DURING-DECODE ENABLED: # =============================================== default-preferences pref(image.downscale-during-decode.enabled,true) fuzzy(31,127) fuzzy-if(d2d,31,147) == downscale-1.html downscale-1-ref.html # intermittently 147 pixels on win7 accelerated only (not win8) fuzzy(20,999) != downscale-2a.html?203,52,left about:blank fuzzy(20,999) != downscale-2b.html?203,52,left about:blank fuzzy(20,999) != downscale-2c.html?203,52,left about:blank fuzzy(20,999) != downscale-2d.html?203,52,left about:blank fuzzy(20,999) != downscale-2e.html?203,52,left about:blank fuzzy(20,999) != downscale-2f.html?203,52,left about:blank fuzzy(20,999) != downscale-2a.html?205,53,left about:blank fuzzy(20,999) != downscale-2b.html?205,53,left about:blank fuzzy(20,999) != downscale-2c.html?205,53,left about:blank fuzzy(20,999) != downscale-2d.html?205,53,left about:blank fuzzy(20,999) != downscale-2e.html?205,53,left about:blank fuzzy(20,999) != downscale-2f.html?205,53,left about:blank fuzzy(20,999) != downscale-2a.html?203,52,right about:blank fuzzy(20,999) != downscale-2b.html?203,52,right about:blank fuzzy(20,999) != downscale-2c.html?203,52,right about:blank fuzzy(20,999) != downscale-2d.html?203,52,right about:blank fuzzy(20,999) != downscale-2e.html?203,52,right about:blank fuzzy(20,999) != downscale-2f.html?203,52,right about:blank fuzzy(20,999) != downscale-2a.html?205,53,right about:blank fuzzy(20,999) != downscale-2b.html?205,53,right about:blank fuzzy(20,999) != downscale-2c.html?205,53,right about:blank fuzzy(20,999) != downscale-2d.html?205,53,right about:blank fuzzy(20,999) != downscale-2e.html?205,53,right about:blank fuzzy(20,999) != downscale-2f.html?205,53,right about:blank fuzzy(20,999) != downscale-2a.html?203,52,top about:blank fuzzy(20,999) != downscale-2b.html?203,52,top about:blank fuzzy(20,999) != downscale-2c.html?203,52,top about:blank fuzzy(20,999) != downscale-2d.html?203,52,top about:blank fuzzy(20,999) != downscale-2e.html?203,52,top about:blank fuzzy(20,999) != downscale-2f.html?203,52,top about:blank fuzzy(20,999) != downscale-2a.html?205,53,top about:blank fuzzy(20,999) != downscale-2b.html?205,53,top about:blank fuzzy(20,999) != downscale-2c.html?205,53,top about:blank fuzzy(20,999) != downscale-2d.html?205,53,top about:blank fuzzy(20,999) != downscale-2e.html?205,53,top about:blank fuzzy(20,999) != downscale-2f.html?205,53,top about:blank fuzzy(20,999) != downscale-2a.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2b.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2c.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2d.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2e.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2f.html?203,52,bottom about:blank fuzzy(20,999) != downscale-2a.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2b.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2c.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2e.html?205,53,bottom about:blank fuzzy(20,999) != downscale-2f.html?205,53,bottom about:blank == downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal == downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal # Non-transparent and transparent ICO images fuzzy(1,3) == downscale-ff.html?ff-0RGB.ico downscale-ff.html?ff-0RGB.png fuzzy(3,32) == downscale-ff.html?ff-ARGB.ico downscale-ff.html?ff-ARGB.png