OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript"> |
| 4 function runTest() { |
| 5 var canvas = document.getElementById("canvas1"); |
| 6 if (!canvas) |
| 7 return false; |
| 8 var gl = canvas.getContext("experimental-webgl"); |
| 9 if (!gl) |
| 10 gl = canvas.getContext("webgl"); |
| 11 if (!gl) |
| 12 return false; |
| 13 var extension = gl.getExtension("WEBGL_debug_renderer_info") != null; |
| 14 |
| 15 var query = /query=(.*)/.exec(window.location.href); |
| 16 if (!query) |
| 17 return false; |
| 18 if (query[1] != "enabled" && query[1] != "disabled" && |
| 19 query[1] != "bypassed") |
| 20 return false; |
| 21 var enabled = query[1] == "enabled"; |
| 22 return extension == enabled; |
| 23 } |
| 24 |
| 25 function onLoad() { |
| 26 if (runTest()) |
| 27 window.domAutomationController.send("SUCCESS"); |
| 28 else |
| 29 window.domAutomationController.send("FAILURE"); |
| 30 } |
| 31 </script> |
| 32 </head> |
| 33 <body onload="onLoad()"> |
| 34 <canvas id="canvas1" width="16px" height="16px"> |
| 35 </canvas> |
| 36 </body> |
| 37 </html> |
OLD | NEW |