OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html><head> |
| 3 <meta charset="utf-8"> |
| 4 <link rel="stylesheet" type="text/css" href="../unit.css" /> |
| 5 <script type="application/x-javascript" src="../unit.js"></script> |
| 6 <script type="application/x-javascript" src="../util.js"></script> |
| 7 <script type="application/x-javascript"> |
| 8 |
| 9 Tests.startUnit = function () { |
| 10 var canvas = document.getElementById('gl'); |
| 11 var gl = canvas.getContext(GL_CONTEXT_ID); |
| 12 return [gl]; |
| 13 } |
| 14 |
| 15 Tests.testDeleteBuffer = function(gl) { |
| 16 assertThrowNoGLError(gl, "number ", function(){ gl.deleteBuffer(1); }); |
| 17 assertGLError(gl, gl.NO_ERROR, "null", function(){ gl.deleteBuffer(null); }); |
| 18 assertThrowNoGLError(gl, "0", function(){ gl.deleteBuffer(0); }); |
| 19 assertThrowNoGLError(gl, "false", function(){ gl.deleteBuffer(false); }); |
| 20 assertThrowNoGLError(gl, "true", function(){ gl.deleteBuffer(true); }); |
| 21 assertThrowNoGLError(gl, "{}", function(){ gl.deleteBuffer({}); }); |
| 22 var tex = gl.createTexture(); |
| 23 assertThrowNoGLError(gl, "tex as buf", function(){ gl.deleteBuffer(tex); }); |
| 24 var buf = gl.createBuffer(); |
| 25 assertOk(function(){ gl.deleteBuffer(buf); }); |
| 26 assertOk(function(){ gl.deleteBuffer(buf); }); |
| 27 assertOk(function(){ gl.deleteBuffer(buf); }); |
| 28 assertOk(function(){ gl.deleteTexture(tex); }); |
| 29 } |
| 30 |
| 31 Tests.endUnit = function(gl) { |
| 32 } |
| 33 |
| 34 </script> |
| 35 <style>canvas{ position:absolute; }</style> |
| 36 </head><body> |
| 37 <canvas id="gl" width="16" height="16"></canvas> |
| 38 </body></html> |
OLD | NEW |