Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / attribs / gl-enable-vertex-attrib.html
blob6425a33a7a9ac68ec200829184b5c7a52320f921
1 <!--
2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
5 -->
7 <!DOCTYPE html>
8 <html>
9 <head>
10 <meta charset="utf-8">
11 <title>WebGL Enable Vertex Attrib Test</title>
12 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
13 <script src="../../js/js-test-pre.js"></script>
14 <script src="../../js/webgl-test-utils.js"> </script>
15 <script src="../../js/tests/invalid-vertex-attrib-test.js"></script>
16 </head>
17 <body>
18 <canvas id="example" width="50" height="50">
19 </canvas>
20 <div id="description"></div>
21 <div id="console"></div>
23 <script>
24 "use strict";
25 description("tests that turning on attribs that have no buffer bound fails to draw");
26 const wtu = WebGLTestUtils;
27 const gl = wtu.create3DContext("example");
29 async function runInvalidAttribTests() {
30 const invalidAttribTestFn = createInvalidAttribTestFn(gl);
32 function drawArrays(gl) {
33 gl.drawArrays(gl.TRIANGLES, 0, 6);
36 function drawElements(gl) {
37 gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);
40 await invalidAttribTestFn(drawArrays);
41 await invalidAttribTestFn(drawElements);
42 finishTest();
44 runInvalidAttribTests();
46 var successfullyParsed = true;
47 </script>
49 </body>
50 </html>