Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / buffers / index-validation-crash-with-buffer-sub-data.html
blob91873f740f04407f8e90d1bc838711c5bbfd9844
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 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
12 <script src="../../js/js-test-pre.js"></script>
13 <script src="../../js/webgl-test-utils.js"></script>
14 </head>
15 <body>
16 <div id="description"></div>
17 <div id="console"></div>
19 <script>
20 "use strict";
21 description('Verifies that the index validation code which is within bufferSubData does not crash.')
23 var wtu = WebGLTestUtils;
24 var gl = wtu.create3DContext();
26 var elementBuffer = gl.createBuffer();
27 gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
28 gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, gl.STATIC_DRAW);
29 var data = new Uint8Array(127);
30 gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 63, data);
31 testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
33 var successfullyParsed = true;
34 </script>
36 <script src="../../js/js-test-post.js"></script>
37 </body>
38 </html>