1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/test/reftest/colordepth.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +<script> 1.5 +/* 1.6 + * Almost all of the image decoding reftests require the display to be in 1.7 + * 24-bit color mode, or else the rendered images will have subtle color 1.8 + * variations and will fail. 1.9 + * The Windows test boxes used to have a tendency to flip to 16-bit color mode, 1.10 + * so this test will explicitly check the color depth to make it more obvious 1.11 + * when the requirement is not met. (See bug 414720.) 1.12 + * 24-bit is only a minimum, allow higher values too. (See bug 458847.) 1.13 + */ 1.14 + 1.15 +var colorDepth = window.screen.colorDepth; 1.16 + 1.17 +if (colorDepth < 24) 1.18 + document.write("ERROR: color depth is only " + colorDepth + "."); 1.19 +</script>