| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <script type="text/javascript"> |
| function popup() { |
| var w = window.open("","","width=200,height=200"); |
| var canvas = w.document.createElement("canvas"); |
| canvas.width = 100; |
| canvas.height = 100; |
| w.document.body.appendChild(canvas); |
| |
| var gl = canvas.getContext("experimental-webgl"); |
| gl.clearColor(1.0, 0.0, 0.0, 1.0); |
| gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); |
| |
| var a = new Uint8Array(4); |
| gl.readPixels(50, 50, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, a); |
| document.title = a[0] + ", " + a[1] + ", " + a[2]; |
| |
| if (a[0] == 255 && a[1] == 0 && a[2] == 0) |
| window.domAutomationController.send("SUCCESS"); |
| else |
| window.domAutomationController.send("FAILED"); |
| } |
| </script> |
| </head> |
| <body onload="popup()"> |
| </body> |
| </html> |