Backed out changeset 8fc3326bce7f (bug 1943032) for causing failures at browser_tab_g...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / extra / simulated-attrib-0-bug-test.html
blob83564e824ac838537409f058a38dd1e53aee6fc3
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 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>Simulated Attrib 0 Bug Test</title>
11 <script src="../js/js-test-pre.js"></script>
12 <script src="../js/webgl-test-utils.js"></script>
13 </head>
14 <body>
15 <div>Simulated Attrib 0 Bug Test</div>
16 <div id="description"></div>
17 <div id="console"></div>
18 <script>
19 "use strict";
20 var wtu = WebGLTestUtils;
21 var context = wtu.create3DContext();
22 var program = wtu.loadStandardProgram(context);
24 context.useProgram(program);
25 debug("This line attempts to draw with 0x7FFFFFFF triangles with attrib 0 off");
26 debug("A buggy simulated attrib 0 impl will probably mult 0x7FFFFFFF * sizeof(vec4)");
27 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7fffffff);", "undefined");
28 debug("This line attempts to draw with 0x7ffffff triangles.");
29 debug("A buggy simulated attrib 0 impl will probably pass 0x7FFFFFF0 to glBufferData and then not check that it failed");
30 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7ffffff);", "undefined");
31 debug("")
32 debug("NOTE!: You may not see any manifestation here. Check your impl for these issues");
33 </script>
34 </body>
35 </html>