Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/color-space/float32ImageData-colorSpace.html

Issue 2555213002: Implement color management for ImageData (Closed)
Patch Set: Addressing issues Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
+
+

Powered by Google App Engine
This is Rietveld 408576698