michael@0: # Encoder ref tests michael@0: # These reftests must be run as HTTP because of canvas' origin-clean security michael@0: # file:// URLs are always considered from a different origin unless same URL michael@0: # michael@0: # The test will copy a PNG image to a canvas, then use canvas.toDataUrl to get michael@0: # the data, then set the data to a new image hence invoking the appropriate michael@0: # encoder. michael@0: # michael@0: # The tests should only be used with lossless encoders. michael@0: # michael@0: # Valid arguments for encoder.html in the query string: michael@0: # - img= michael@0: # - mime= michael@0: # - options= michael@0: # Example: michael@0: # encoder.html?img=escape(reference_image.png) michael@0: # &mime=escape(image/vnd.microsoft.icon) michael@0: # &options=escape(-moz-parse-options:bpp=24;format=png) michael@0: michael@0: # PNG michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/png michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/png michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/png michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/png michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/png michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/png michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/png michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/png michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/png michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/png michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/png michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/png michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/png michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/png michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/png michael@0: michael@0: # BMP using default parse options michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp michael@0: michael@0: # BMP using image/bmp mime type and 32bpp parse options michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 michael@0: michael@0: # BMP using image/bmp mime type and 24bpp parse options michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 michael@0: michael@0: # ICO using default parse options michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon michael@0: HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon michael@0: michael@0: # ICO using image/vnd.microsoft.icon mime type and 32bpp parse options with bmp michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp michael@0: michael@0: # ICO using image/vnd.microsoft.icon mime type and 24bpp parse options with bmp michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp michael@0: michael@0: # ICO using image/vnd.microsoft.icon mime type png michael@0: HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng michael@0: