Bug 847310 - Test cases for WBMP decoder. r=joe

This commit is contained in:
Shih-Chiang Chien 2013-03-08 16:04:51 +08:00
parent 52d6dc4b9b
commit d5a29e8dbd
40 changed files with 69 additions and 0 deletions

View File

@ -46,3 +46,5 @@ include color-management/reftest.list
# Lossless encoders
skip-if(Android||B2G) include encoders-lossless/reftest.list # bug 783621
# WBMP tests
skip-if(Android) include wbmp/reftest.list

View File

@ -0,0 +1,4 @@
# WBMP tests
include wbmp-normal/reftest.list
include wbmp-corrupted/reftest.list

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
# Corrupted WBMP tests
# Tests for corrupted header value
== wrapper.html?err_fh_b0.wbmp about:blank
== wrapper.html?err_fh_b1.wbmp about:blank
== wrapper.html?err_fh_b2.wbmp about:blank
== wrapper.html?err_fh_b3.wbmp about:blank
== wrapper.html?err_fh_b4.wbmp about:blank
== wrapper.html?err_fh_b5.wbmp about:blank
== wrapper.html?err_fh_b6.wbmp about:blank
== wrapper.html?err_fh_b7_and_ext_header.wbmp about:blank
# Tests for corrupted size value
== wrapper.html?err_incomplete_height.wbmp about:blank
== wrapper.html?err_incomplete_width.wbmp about:blank
== wrapper.html?over_height.wbmp about:blank
== wrapper.html?over_width.wbmp about:blank
# Tests for unsupported type value
== wrapper.html?err_type_1.wbmp about:blank
== wrapper.html?err_type_fix_only.wbmp about:blank
== wrapper.html?err_type_fix_width_only.wbmp about:blank
== wrapper.html?err_type_header_only.wbmp about:blank
# Test for empty size value
== wrapper.html?height_0.wbmp about:blank
== wrapper.html?width_0.wbmp about:blank
== wrapper.html?width_0_height_0.wbmp about:blank

Binary file not shown.

View File

@ -0,0 +1,27 @@
<!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>
// The image is loaded async after the page loads
// wait for it to finish loading
function onImageLoad() {
document.documentElement.removeAttribute("class");
};
</script>
</head>
<body>
<img id="image1">
<script>
// Use as "wrapper.html?image.png"
var imgURL = document.location.search.substr(1);
document.images[0].onload = onImageLoad;
document.images[0].onerror = onImageLoad;
document.images[0].src = imgURL;
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

View File

@ -0,0 +1,11 @@
# WBMP tests
== bmts.wbmp bmts.png
== ok_fh_b5.wbmp ok_fh_b5.png
== ok_fh_b6.wbmp ok_fh_b6.png
== height_1.wbmp height_1.png
== width_1.wbmp width_1.png
== width_1_height_1.wbmp width_1_height_1.png
== multi_byte_height.wbmp multi_byte_height.png
== multi_byte_width.wbmp multi_byte_width.png
== large.wbmp large.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B