4 <script type=
"text/javascript">
6 var w
= window
.open("","","width=200,height=200");
7 var canvas
= w
.document
.createElement("canvas");
10 w
.document
.body
.appendChild(canvas
);
12 var gl
= canvas
.getContext("experimental-webgl");
13 gl
.clearColor(1.0, 0.0, 0.0, 1.0);
14 gl
.clear(gl
.COLOR_BUFFER_BIT
| gl
.DEPTH_BUFFER_BIT
);
16 var a
= new Uint8Array(4);
17 gl
.readPixels(50, 50, 1, 1, gl
.RGBA
, gl
.UNSIGNED_BYTE
, a
);
18 document
.title
= a
[0] + ", " + a
[1] + ", " + a
[2];
20 window
.domAutomationController
.setAutomationId(1);
21 if (a
[0] == 255 && a
[1] == 0 && a
[2] == 0)
22 window
.domAutomationController
.send("SUCCESS");
24 window
.domAutomationController
.send("FAILED");
28 <body onload=
"popup()">