Backed out changeset 8fc3326bce7f (bug 1943032) for causing failures at browser_tab_g...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / textures / misc / compressed-tex-from-pbo-crash.html
blob74444d32fb84a3fe9f4b9b11e69f0d2cdfee4256
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>Regression test for compressedTex with PBO</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 </head>
16 <body>
17 <canvas id="example" width="24" height="24"></canvas>
18 <div id="description"></div>
19 <div id="console"></div>
20 <script>
21 "use strict";
23 var wtu = WebGLTestUtils;
24 description();
26 var gl = wtu.create3DContext("example", undefined, 2);
28 var tex = gl.createTexture();
29 gl.bindTexture(gl.TEXTURE_2D, tex);
31 // The following statement caused a crash in Chrome. See crbug.com/690335.
32 // Because no PBO is bound, the last parameter is interprected as a pointer
33 // to the client side data.
34 gl.compressedTexImage2D(gl.TEXTURE_2D, 0, 0, 4, 4, 0, 8, 3);
36 wtu.glErrorShouldBe(gl, [gl.INVALID_ENUM, gl.INVALID_VALUE, gl.INVALID_OPERATION],
37 "should not crash and generate a GL error");
38 debug("");
39 var successfullyParsed = true;
40 </script>
41 <script src="../../../js/js-test-post.js"></script>
43 </body>
44 </html>