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

Side by Side Diff: content/test/data/gpu/pixel_webgl_aa_alpha.html

Issue 2023153002: Add more WebGL pixel tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments fmor kbr. Created 4 years, 6 months 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 2
3 <!-- READ BEFORE UPDATING: 3 <!-- READ BEFORE UPDATING:
4 If this test is updated make sure to increment the "revision" value of the 4 If this test is updated make sure to increment the "revision" value of the
5 associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure 5 associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure
6 that the baseline images are regenerated on the next run. 6 that the baseline images are regenerated on the next run.
7 --> 7 -->
8 8
9 <html> 9 <html>
10 <head> 10 <head>
11 <title>WebGL Test: Green Triangle over Black Background</title> 11 <title>WebGL Test: Green Triangle over Black Background</title>
12 <style type="text/css"> 12 <style type="text/css">
13 .nomargin { 13 .nomargin {
14 margin: 0px auto; 14 margin: 0px auto;
15 } 15 }
16 </style> 16 </style>
17 17
18 <script src="pixel_webgl_util.js"></script> 18 <script src="pixel_webgl_util.js"></script>
19 19
20 <script> 20 <script>
21 var g_swapsBeforeAck = 15; 21 var main = makeMain(true, true);
22 var gl;
23
24 function main()
25 {
26 var canvas = document.getElementById("c");
27 gl = initGL(canvas);
28 if (gl && setup(gl)) {
29 drawSomeFrames();
30 } else {
31 domAutomationController.setAutomationId(1);
32 domAutomationController.send("FAILURE");
33 }
34 }
35
36 function drawSomeFrames()
37 {
38 if (g_swapsBeforeAck == 0) {
39 domAutomationController.setAutomationId(1);
40 domAutomationController.send("SUCCESS");
41 } else {
42 g_swapsBeforeAck--;
43 drawTriangle(gl);
44 window.webkitRequestAnimationFrame(drawSomeFrames);
45 }
46 }
47
48
49
50 </script> 22 </script>
51 </head> 23 </head>
52 <body onload="main()"> 24 <body onload="main()">
53 <div style="position:relative; width:200px; height:200px; background-color:black "></div> 25 <div style="position:relative; width:200px; height:200px; background-color:black "></div>
54 <div style="position:absolute; top:0px; left:0px"> 26 <div style="position:absolute; top:0px; left:0px">
55 <canvas id="c" width="200" height="200" class="nomargin"></canvas> 27 <canvas id="c" width="200" height="200" class="nomargin"></canvas>
56 </div> 28 </div>
57 </body> 29 </body>
58 </html> 30 </html>
OLDNEW
« no previous file with comments | « content/test/data/gpu/pixel_webgl.html ('k') | content/test/data/gpu/pixel_webgl_aa_noalpha.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698