OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
5 body { | 5 body { |
6 outline: 10px solid transparent; /* affects layer sizes */ | 6 outline: 10px solid transparent; /* affects layer sizes */ |
7 } | 7 } |
8 canvas { | 8 canvas { |
9 margin: 20px; | 9 margin: 20px; |
10 width: 200px; | 10 width: 200px; |
11 height: 200px; | 11 height: 200px; |
12 padding: 0 20px; | 12 padding: 0 20px; |
13 } | 13 } |
14 | 14 |
15 .compare { | 15 .compare { |
16 margin-left: 40px; | 16 margin-left: 40px; |
17 margin-top: 20px; | 17 margin-top: 20px; |
18 width: 200px; | 18 width: 200px; |
19 height: 200px; | 19 height: 200px; |
20 background-color: rgba(0, 255, 0, 1.0); | 20 background-color: rgba(0, 255, 0, 1.0); |
21 } | 21 } |
22 </style> | 22 </style> |
23 <script> | 23 <script> |
24 if (window.testRunner) { | 24 if (window.testRunner) { |
25 testRunner.overridePreference("WebKitWebGLEnabled", "1"); | 25 testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
26 testRunner.dumpAsText(true); | 26 testRunner.dumpAsTextWithPixelResults(); |
27 } | 27 } |
28 | 28 |
29 function initWebGL(canvasName, vshader, fshader, attribs, clearColor, cl
earDepth) | 29 function initWebGL(canvasName, vshader, fshader, attribs, clearColor, cl
earDepth) |
30 { | 30 { |
31 var canvas = document.getElementById(canvasName); | 31 var canvas = document.getElementById(canvasName); |
32 var gl = canvas.getContext("experimental-webgl", {alpha: false}); | 32 var gl = canvas.getContext("experimental-webgl", {alpha: false}); |
33 if (!gl) { | 33 if (!gl) { |
34 alert("No WebGL context found"); | 34 alert("No WebGL context found"); |
35 return null; | 35 return null; |
36 } | 36 } |
(...skipping 18 matching lines...) Expand all Loading... |
55 </script> | 55 </script> |
56 </head> | 56 </head> |
57 <body onload="init()"> | 57 <body onload="init()"> |
58 | 58 |
59 <div class="compare"></div> | 59 <div class="compare"></div> |
60 <canvas id="canvas" width="200" height="200"></canvas> | 60 <canvas id="canvas" width="200" height="200"></canvas> |
61 | 61 |
62 <!-- Top and bottom should look the same. --> | 62 <!-- Top and bottom should look the same. --> |
63 </body> | 63 </body> |
64 </html> | 64 </html> |
OLD | NEW |