Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <head>
4 <meta charset="UTF-8">
6 <script type="text/javascript" src="webgl-utils.js"></script>
7 <script type="text/javascript">
8 /* Orientation Test
9 *
10 * Clear the canvas to black, and clear the upper-left quadrant
11 * to white. If this doesn't pass, but the Clear test does, then
12 * likely y-flip is wrong.
13 */
15 "use strict";
17 function renderGL(gl) {
18 gl.clearColor(0.0, 0.0, 0.0, 1.0);
19 gl.clear(gl.COLOR_BUFFER_BIT);
21 gl.enable(gl.SCISSOR_TEST);
22 gl.scissor(0, 128, 128, 128);
23 gl.clearColor(1.0, 1.0, 1.0, 1.0);
24 gl.clear(gl.COLOR_BUFFER_BIT);
26 gl.finish();
27 }
29 function renderFailure(canvas) {
30 // This will also trigger RAF for us.
31 var context = canvas.getContext("2d");
32 context.fillText('WebGL failed.', 64, 64);
33 }
35 function runTest() {
36 var canvas = document.getElementById("canvas");
37 var gl = initGL(canvas);
39 if (gl)
40 renderGL(gl);
41 else
42 renderFailure(canvas);
44 waitForComposite(testComplete);
45 }
47 function testComplete() {
48 document.documentElement.removeAttribute("class");
49 }
50 </script>
51 </head>
53 <body onload="rAF(runTest);">
54 <canvas id="canvas" width="256" height="256"></canvas>
55 </body>
57 </html>