Bug 1945965 – remove new tab April Fools logo. r=home-newtab-reviewers,reemhamz
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / more / functions / bindBuffer.html
blob9011d76168ac7dc562ca943e9f4f3a5b439f444c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <!--
6 Copyright (c) 2019 The Khronos Group Inc.
7 Use of this source code is governed by an MIT-style license that can be
8 found in the LICENSE.txt file.
9 -->
10 <link rel="stylesheet" type="text/css" href="../unit.css" />
11 <script type="application/javascript" src="../unit.js"></script>
12 <script type="application/javascript" src="../util.js"></script>
13 <script type="application/javascript">
15 Tests.startUnit = function () {
16 var canvas = document.getElementById('gl');
17 var gl = wrapGLContext(getGLContext(canvas));
18 return [gl];
21 Tests.testBindBufferARRAY_BUFFER = function(gl) {
22 var b = gl.createBuffer();
23 assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
24 gl.bindBuffer(gl.ARRAY_BUFFER, b);
25 assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
26 gl.bindBuffer(gl.ARRAY_BUFFER, null);
27 assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
28 gl.deleteBuffer(b);
29 assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
32 Tests.testBindBufferELEMENT_ARRAY_BUFFER = function(gl) {
33 var b = gl.createBuffer();
34 assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
35 gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, b);
36 assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
37 gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
38 assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
39 gl.deleteBuffer(b);
40 assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
43 </script>
45 <style>canvas{ position:absolute; }</style>
46 </head><body>
47 <canvas id="gl" width="1" height="1"></canvas>
48 </body></html>