Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / chrome / test / data / gpu / webgl_popup.html
blob7f264e4e4c9bbd9acdeaeab8ee725741e72b81d9
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script type="text/javascript">
5 function popup() {
6 var w = window.open("","","width=200,height=200");
7 var canvas = w.document.createElement("canvas");
8 canvas.width = 100;
9 canvas.height = 100;
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");
23 else
24 window.domAutomationController.send("FAILED");
26 </script>
27 </head>
28 <body onload="popup()">
29 </body>
30 </html>