Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-rec-2020.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-rec-2020.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-rec-2020.html |
deleted file mode 100644 |
index b89fd39b91f5b570c705f3ca921fc699a7c104cc..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-rec-2020.html |
+++ /dev/null |
@@ -1,43 +0,0 @@ |
-<!DOCTYPE html> |
-<body> |
-<script src="../../resources/testharness.js"></script> |
-<script src="../../resources/testharnessreport.js"></script> |
-<script> |
-test(drawThenGetImageData, 'verifies that getImageData works on rec-2020 canvases.'); |
-test(putThenGetImageData, 'verifies that putImageData works on rec-2020 canvases.'); |
- |
-function drawThenGetImageData() { |
- var canvas = document.createElement('canvas'); |
- canvas.width = 10; |
- canvas.height = 10; |
- var ctx = canvas.getContext('2d', {colorSpace: 'rec-2020'}) |
- ctx.fillStyle = 'rgb(50, 100, 150)'; |
- ctx.fillRect(0, 0, 10, 10); |
- var pixel = ctx.getImageData(5, 5, 1, 1).data; |
- // Note: the color specified as as fillStyle is converted from srgb to linear |
- // when drawn and the the results of getImageData are re-converted to sRGB |
- assert_equals(pixel[0], 50, "Red component retrieved by getImageData is the color that was drawn." ); |
- assert_equals(pixel[1], 100, "Green component retrieved by getImageData is the color that was drawn." ); |
- assert_equals(pixel[2], 150, "Blue component retrieved by getImageData is the color that was drawn." ); |
- assert_equals(pixel[3], 255, "Alpha component retrieved by getImageData is the color that was drawn." ); |
-} |
- |
-function putThenGetImageData() { |
- var canvas = document.createElement('canvas'); |
- canvas.width = 10; |
- canvas.height = 10; |
- var ctx = canvas.getContext('2d', {colorSpace: 'rec-2020'}) |
- var initialData = ctx.createImageData(1, 1); |
- initialData.data[0] = 50; |
- initialData.data[1] = 100; |
- initialData.data[2] = 150; |
- initialData.data[3] = 255; |
- ctx.putImageData(initialData, 5, 5); |
- var pixel = ctx.getImageData(5, 5, 1, 1).data; |
- assert_equals(pixel[0], 50, "Red component retrieved by getImageData is the color that was put." ); |
- assert_equals(pixel[1], 100, "Green component retrieved by getImageData is the color that was put." ); |
- assert_equals(pixel[2], 150, "Blue component retrieved by getImageData is the color that was put." ); |
- assert_equals(pixel[3], 255, "Alpha component retrieved by getImageData is the color that was put." ); |
-} |
-</script> |
-</body> |