Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/canvas/color-space/float32ImageData-colorSpace.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/color-space/float32ImageData-colorSpace.html b/third_party/WebKit/LayoutTests/fast/canvas/color-space/float32ImageData-colorSpace.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f22c726d337d715be8309e8a0eead983a3c71ab5 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/color-space/float32ImageData-colorSpace.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE html> |
| +<body> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<script> |
| + |
| +// RGBA(255,0,0,255) -> LinearRGB(0x3c00, 0x0, 0x0, 0x3c00) |
| +var data = new Float32Array([0x00003c00, 0x0, 0x0, 0x00003c00]); |
| + |
| +test(function() { |
| + |
| + assert_equals((new Float32ImageData(1, 1)).colorSpace, "linear-rgb"); |
|
Justin Novosad
2016/12/16 18:38:11
Each of these assertions is checking a specific be
zakerinasab1
2016/12/19 19:57:39
Done.
|
| + assert_equals((new Float32ImageData(1, 1, "linear-rgb")).colorSpace, "linear-rgb"); |
| + assert_throws("NotSupportedError", function() {fImageData = new Float32ImageData(1, 1, "srgb");}); |
| + assert_throws(null, function() {fImageData = new Float32ImageData(1, 1, "undefined");}); |
| + |
| + assert_equals((new Float32ImageData(data, 1, 1)).colorSpace, "linear-rgb"); |
| + assert_equals((new Float32ImageData(data, 1, 1, "linear-rgb")).colorSpace, "linear-rgb"); |
| + assert_throws("NotSupportedError", function() {fImageData = new Float32ImageData(data, 1, 1, "srgb");}); |
| + assert_throws(null, function() {fImageData = new Float32ImageData(data, 1, 1, "undefined");}); |
| + |
| +}, 'This test examines the correct behavior of Float32ImageData API in setting and getting ImageDataColorSpace.'); |
| + |
| +</script> |
| + |
| + |
| + |
| +</script> |
| +</body> |
| + |
| + |