promoted-extensions.html (1631B)
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 <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> 18 19 <script> 20 "use strict"; 21 var wtu = WebGLTestUtils; 22 var gl; 23 24 function checkExtensionNotAvailable(extension, extensions) { 25 if (extensions.indexOf(extension) >= 0) { 26 testFailed(extension + " was exposed in the WebGL 2.0 context but should not have been"); 27 } else { 28 testPassed(extension + " was not exposed in the WebGL 2.0 context"); 29 } 30 } 31 32 description("Promoted extensions from WebGL 1.0 should not be exposed in WebGL 2.0"); 33 34 shouldBeNonNull("gl = wtu.create3DContext(undefined, undefined, 2)"); 35 36 var exts = gl.getSupportedExtensions(); 37 38 var promotedExtensions = [ 39 "ANGLE_instanced_arrays", 40 "EXT_blend_minmax", 41 "EXT_frag_depth", 42 "EXT_shader_texture_lod", 43 "EXT_sRGB", 44 "OES_element_index_uint", 45 "OES_standard_derivatives", 46 "OES_texture_float", 47 "OES_texture_half_float", 48 "OES_texture_half_float_linear", 49 "OES_vertex_array_object", 50 "WEBGL_depth_texture", 51 "WEBGL_draw_buffers", 52 ] 53 54 for (var i = 0; i < promotedExtensions.length; ++i) { 55 checkExtensionNotAvailable(promotedExtensions[i], exts); 56 } 57 58 debug("") 59 var successfullyParsed = true; 60 </script> 61 62 <script src="../../js/js-test-post.js"></script> 63 </body> 64 </html>