diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /image/test/reftest/ico/ico-bmp-corrupted | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'image/test/reftest/ico/ico-bmp-corrupted')
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/16x16.png | bin | 0 -> 879 bytes | |||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico | bin | 0 -> 86 bytes | |||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico | bin | 0 -> 86 bytes | |||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico | bin | 0 -> 86 bytes | |||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico | bin | 0 -> 830 bytes | |||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list | 11 | ||||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/reftest.list | 10 | ||||
-rw-r--r-- | image/test/reftest/ico/ico-bmp-corrupted/wrapper.html | 80 |
8 files changed, 101 insertions, 0 deletions
diff --git a/image/test/reftest/ico/ico-bmp-corrupted/16x16.png b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png Binary files differnew file mode 100644 index 000000000..c04869e72 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico Binary files differnew file mode 100644 index 000000000..1189e4c04 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico Binary files differnew file mode 100644 index 000000000..8fd0a5d65 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico Binary files differnew file mode 100644 index 000000000..1f185ca62 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico Binary files differnew file mode 100644 index 000000000..a49a783c5 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list b/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list new file mode 100644 index 000000000..1dd1a43ae --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/reftest-stylo.list @@ -0,0 +1,11 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# ICOs containing corrupted BMP tests + +# Invalid value for bits per pixel (BPP) - detected when decoding the header. +skip == wrapper.html?invalid-bpp.ico wrapper.html?invalid-bpp.ico +# Invalid BPP values for RLE4 - detected when decoding the image data. +skip == wrapper.html?invalid-compression-RLE4.ico wrapper.html?invalid-compression-RLE4.ico +# Invalid BPP values for RLE8 - detected when decoding the image data. +skip == wrapper.html?invalid-compression-RLE8.ico wrapper.html?invalid-compression-RLE8.ico +# Invalid compression value - detected when decoding the image data. +skip == wrapper.html?invalid-compression.ico wrapper.html?invalid-compression.ico diff --git a/image/test/reftest/ico/ico-bmp-corrupted/reftest.list b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list new file mode 100644 index 000000000..2467b1323 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list @@ -0,0 +1,10 @@ +# ICOs containing corrupted BMP tests + +# Invalid value for bits per pixel (BPP) - detected when decoding the header. +== wrapper.html?invalid-bpp.ico about:blank +# Invalid BPP values for RLE4 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE4.ico about:blank +# Invalid BPP values for RLE8 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE8.ico about:blank +# Invalid compression value - detected when decoding the image data. +== wrapper.html?invalid-compression.ico about:blank diff --git a/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html new file mode 100644 index 000000000..5935f3763 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html @@ -0,0 +1,80 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> +<title>Image reftest wrapper</title> +<style type="text/css"> + #image1 { background-color: rgb(10, 100, 250); } +</style> +<script> + var gImg; + + function runAfterAsyncEvents(aCallback) { + function handlePostMessage(aEvent) { + if (aEvent.data == 'next') { + window.removeEventListener('message', handlePostMessage, false); + aCallback(); + } + } + + window.addEventListener('message', handlePostMessage, false); + + // We'll receive the 'message' event after everything else that's currently in + // the event queue (which is a stronger guarantee than setTimeout, because + // setTimeout events may be coalesced). This lets us ensure that we run + // aCallback *after* any asynchronous events are delivered. + window.postMessage('next', '*'); + } + + // The image is loaded async after the page loads + // wait for it to finish loading + function onImageLoad() { + // Use a canvas to force the image to get sync decoded. + var canvas = document.createElement('canvas'); + var ctx = canvas.getContext('2d'); + + try { + ctx.drawImage(gImg, 0, 0); + } catch (e) { + } + + // Continue after pumping the event loop. + runAfterAsyncEvents(step2); + } + + function step2() { + // Only now, once the image has already been sync decoded, do we load it in + // the <img> element we're going to snapshot. That's because for some of the + // tests that use wrapper.html, an error is only detected when decoding the + // actual image data - i.e., the error isn't detected in the header. The + // precise time when we detect the error, unfortunately, affects how we draw + // the image. This will be fixed in bug 1182531, and then we can simplify this + // code. + + var finalImg = document.getElementById('image1'); + finalImg.alt = ""; + finalImg.onload = finalImg.onerror = step3; + finalImg.src = gImg.src; + } + + function step3() { + // We're ready to take the snapshot, but pump the event loop first just to + // be sure that everything has settled down. + runAfterAsyncEvents(takeSnapshot); + } + + function takeSnapshot() { + document.documentElement.removeAttribute("class"); + } +</script> +</head> +<body> +<img id="image1"> +<script> + // Use as "wrapper.html?image.png + gImg = document.createElement('img'); + gImg.onload = gImg.onerror = onImageLoad; + gImg.src = document.location.search.substr(1); +</script> +</body> +</html> + |