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

Side by Side Diff: content/test/data/gpu/pixel_canvas_display_linear-rgb.html

Issue 2448583002: Adding browser pixel test for linear-rgb support in Canvas. (Closed)
Patch Set: Addressing comments. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <canvas id="cnv" width=140 height=140></canvas>
3
4 <script>
5 // This layout test checks if the 2D canvas is properly displayed
6 // when the color space is set to linear-rgb.
7
8 var g_swapsBeforeAck = 15;
9
10 function main()
11 {
12 draw();
13 waitForFinish();
14 }
15
16 function draw()
17 {
18 var ctx = document.getElementById("cnv").getContext("2d", {colorSpace:'linear- rgb'});
19 ctx.fillStyle = 'red';
20 ctx.fillRect(20,20,50,50);
21 ctx.fillStyle = 'green';
22 ctx.fillRect(70,20,50,50);
23 ctx.fillStyle = 'blue';
24 ctx.fillRect(20,70,50,50);
25 ctx.fillStyle = 'black';
26 ctx.fillRect(70,70,50,50);
27 }
28
29 function waitForFinish()
30 {
31 if (g_swapsBeforeAck == 0) {
32 domAutomationController.setAutomationId(1);
33 domAutomationController.send("SUCCESS");
34 } else {
35 g_swapsBeforeAck--;
36 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
37 window.webkitRequestAnimationFrame(waitForFinish);
38 }
39 }
40
41 main();
42 </script>
43
44
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698