Chromium Code Reviews| Index: content/test/data/gpu/pixel_canvas_display_linear-rgb.html |
| diff --git a/content/test/data/gpu/pixel_canvas_display_linear-rgb.html b/content/test/data/gpu/pixel_canvas_display_linear-rgb.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b33ec64479fda2fbfb8ee53eb712a6f79d279389 |
| --- /dev/null |
| +++ b/content/test/data/gpu/pixel_canvas_display_linear-rgb.html |
| @@ -0,0 +1,44 @@ |
| +<!DOCTYPE html> |
| +<canvas id="cnv" width=140 height=140></canvas> |
| + |
| +<script> |
| +// This layout test checks if the 2D canvas is properly displayed |
| +// when the color space is set to linear-rgb. |
| + |
| +var g_swapsBeforeAck = 15; |
|
Justin Novosad
2016/10/24 21:22:27
What is the justification for this number? Seems l
xidachen
2016/10/25 00:58:35
+kbr@ for this. When I added the "pixel_offscreenC
Ken Russell (switch to Gerrit)
2016/10/25 01:03:29
I recall it was added a while ago in order to addr
|
| + |
| +function main() |
| +{ |
| + draw(); |
| + waitForFinish(); |
| +} |
| + |
| +function draw() |
| +{ |
| + var ctx = document.getElementById("cnv").getContext("2d", {colorSpace:'linear-rgb'}); |
| + ctx.fillStyle = 'red'; |
| + ctx.fillRect(20,20,50,50); |
| + ctx.fillStyle = 'green'; |
| + ctx.fillRect(70,20,50,50); |
| + ctx.fillStyle = 'blue'; |
| + ctx.fillRect(20,70,50,50); |
| + ctx.fillStyle = 'black'; |
| + ctx.fillRect(70,70,50,50); |
| +} |
| + |
| +function waitForFinish() |
| +{ |
| + if (g_swapsBeforeAck == 0) { |
| + domAutomationController.setAutomationId(1); |
| + domAutomationController.send("SUCCESS"); |
| + } else { |
| + g_swapsBeforeAck--; |
| + document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; |
| + window.webkitRequestAnimationFrame(waitForFinish); |
| + } |
| +} |
| + |
| +main(); |
| +</script> |
| + |
| + |