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

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
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;
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
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') | content/test/gpu/gpu_tests/pixel_test_pages.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698