tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

compressed-tex-from-pbo-crash.html (1248B)


      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 
      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";
     22 
     23 var wtu = WebGLTestUtils;
     24 description();
     25 
     26 var gl = wtu.create3DContext("example", undefined, 2);
     27 
     28 var tex = gl.createTexture();
     29 gl.bindTexture(gl.TEXTURE_2D, tex);
     30 
     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);
     35 
     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>
     42 
     43 </body>
     44 </html>