mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-14 15:28:57 +00:00
add WebGLRenderingContext test
This commit is contained in:
@@ -27,3 +27,60 @@
|
||||
testing.expectEqual(ctx.fillStyle, "#663399");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id=WebGLRenderingContext#getSupportedExtensions>
|
||||
{
|
||||
const element = document.createElement("canvas");
|
||||
const ctx = element.getContext("webgl");
|
||||
testing.expectEqual(true, ctx instanceof WebGLRenderingContext);
|
||||
|
||||
const supportedExtensions = ctx.getSupportedExtensions();
|
||||
// The order Chrome prefer.
|
||||
const expectedExtensions = [
|
||||
"ANGLE_instanced_arrays",
|
||||
"EXT_blend_minmax",
|
||||
"EXT_clip_control",
|
||||
"EXT_color_buffer_half_float",
|
||||
"EXT_depth_clamp",
|
||||
"EXT_disjoint_timer_query",
|
||||
"EXT_float_blend",
|
||||
"EXT_frag_depth",
|
||||
"EXT_polygon_offset_clamp",
|
||||
"EXT_shader_texture_lod",
|
||||
"EXT_texture_compression_bptc",
|
||||
"EXT_texture_compression_rgtc",
|
||||
"EXT_texture_filter_anisotropic",
|
||||
"EXT_texture_mirror_clamp_to_edge",
|
||||
"EXT_sRGB",
|
||||
"KHR_parallel_shader_compile",
|
||||
"OES_element_index_uint",
|
||||
"OES_fbo_render_mipmap",
|
||||
"OES_standard_derivatives",
|
||||
"OES_texture_float",
|
||||
"OES_texture_float_linear",
|
||||
"OES_texture_half_float",
|
||||
"OES_texture_half_float_linear",
|
||||
"OES_vertex_array_object",
|
||||
"WEBGL_blend_func_extended",
|
||||
"WEBGL_color_buffer_float",
|
||||
"WEBGL_compressed_texture_astc",
|
||||
"WEBGL_compressed_texture_etc",
|
||||
"WEBGL_compressed_texture_etc1",
|
||||
"WEBGL_compressed_texture_pvrtc",
|
||||
"WEBGL_compressed_texture_s3tc",
|
||||
"WEBGL_compressed_texture_s3tc_srgb",
|
||||
"WEBGL_debug_renderer_info",
|
||||
"WEBGL_debug_shaders",
|
||||
"WEBGL_depth_texture",
|
||||
"WEBGL_draw_buffers",
|
||||
"WEBGL_lose_context",
|
||||
"WEBGL_multi_draw",
|
||||
"WEBGL_polygon_mode"
|
||||
];
|
||||
|
||||
testing.expectEqual(expectedExtensions.length, supportedExtensions.length);
|
||||
for (let i = 0; i < expectedExtensions.length; i++) {
|
||||
testing.expectEqual(expectedExtensions[i], supportedExtensions[i]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user