diff --git a/dom/canvas/test/webgl-mochitest.ini b/dom/canvas/test/webgl-mochitest.ini index d6cd17dd6b4e..2fe2009587ca 100644 --- a/dom/canvas/test/webgl-mochitest.ini +++ b/dom/canvas/test/webgl-mochitest.ini @@ -3,10 +3,51 @@ subsuite = webgl skip-if = ((os == 'linux') && (buildapp == 'b2g')) support-files = + webgl-mochitest/ensure-exts/ensure-ext.js webgl-mochitest/driver-info.js webgl-mochitest/es3-data.js webgl-mochitest/webgl-util.js +[webgl-mochitest/ensure-exts/test_ANGLE_instanced_arrays.html] +fail-if = (os == 'android') || (os == 'mac') +[webgl-mochitest/ensure-exts/test_EXT_blend_minmax.html] +fail-if = (os == 'android') +[webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html] +fail-if = (os == 'android') +[webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win') +[webgl-mochitest/ensure-exts/test_EXT_frag_depth.html] +fail-if = (os == 'android') +[webgl-mochitest/ensure-exts/test_EXT_sRGB.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win') +[webgl-mochitest/ensure-exts/test_EXT_shader_texture_lod.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') +[webgl-mochitest/ensure-exts/test_EXT_texture_filter_anisotropic.html] +fail-if = (os == 'android') || (os == 'linux') +[webgl-mochitest/ensure-exts/test_OES_standard_derivatives.html] +fail-if = (os == 'android') +[webgl-mochitest/ensure-exts/test_WEBGL_color_buffer_float.html] +fail-if = (os == 'android') +[webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win') +[webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win') +[webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc1.html] +# Win7 is 6.1 +fail-if = (os == 'linux') || (os == 'mac') || (os == 'win' && os_version == '6.1') +[webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_pvrtc.html] +fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win') +[webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_s3tc.html] +fail-if = (os == 'android') || (os == 'linux') +[webgl-mochitest/ensure-exts/test_WEBGL_depth_texture.html] +fail-if = (os == 'mac') +[webgl-mochitest/ensure-exts/test_WEBGL_draw_buffers.html] +# Win7 is 6.1 +fail-if = (os == 'android') || (os == 'win' && os_version == '6.1') + +[webgl-mochitest/ensure-exts/test_common.html] + + [webgl-mochitest/test_backbuffer_channels.html] fail-if = (os == 'b2g') [webgl-mochitest/test_depth_readpixels.html] diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/ensure-ext.js b/dom/canvas/test/webgl-mochitest/ensure-exts/ensure-ext.js new file mode 100644 index 000000000000..798067d5e423 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/ensure-ext.js @@ -0,0 +1,32 @@ +'use strict'; + +function EnsureExt(name, shouldBe = true) { + var c = document.createElement('canvas'); + var gl = c.getContext('experimental-webgl'); + + if (shouldBe) { + ok(gl.getExtension(name), 'Should have extension ' + name + '.'); + } else { + ok(!gl.getExtension(name), 'Should not have extension ' + name + '.'); + } +} + +function EnsureDraftExt(name, shouldBe = true) { + SimpleTest.waitForExplicitFinish(); + + var fnEnsure = function() { + EnsureExt(name, shouldBe); + SimpleTest.finish(); + }; + + if ('SpecialPowers' in window) { + var prefStateList = [ + ['webgl.enable-draft-extensions', true], + ]; + var prefEnv = {'set': prefStateList}; + SpecialPowers.pushPrefEnv(prefEnv, fnEnsure); + } else { + console.log('Couldn\'t use SpecialPowers to enable draft extensions.'); + fnEnsure(); + } +} diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_ANGLE_instanced_arrays.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_ANGLE_instanced_arrays.html new file mode 100644 index 000000000000..04b24d90c109 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_ANGLE_instanced_arrays.html @@ -0,0 +1,17 @@ + + +
+ + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_blend_minmax.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_blend_minmax.html new file mode 100644 index 000000000000..903269e6b663 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_blend_minmax.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html new file mode 100644 index 000000000000..3ac21299c686 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html new file mode 100644 index 000000000000..e0b90adbbb5b --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_frag_depth.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_frag_depth.html new file mode 100644 index 000000000000..3c7f38679178 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_frag_depth.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_sRGB.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_sRGB.html new file mode 100644 index 000000000000..da5aa0a3fbfb --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_sRGB.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_shader_texture_lod.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_shader_texture_lod.html new file mode 100644 index 000000000000..e64ff94848c5 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_shader_texture_lod.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_filter_anisotropic.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_filter_anisotropic.html new file mode 100644 index 000000000000..877c4440bf30 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_texture_filter_anisotropic.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_OES_standard_derivatives.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_OES_standard_derivatives.html new file mode 100644 index 000000000000..3e7b7a396226 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_OES_standard_derivatives.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_color_buffer_float.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_color_buffer_float.html new file mode 100644 index 000000000000..aeb8f271ea05 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_color_buffer_float.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html new file mode 100644 index 000000000000..6d68f0b4e2b2 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_atc.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html new file mode 100644 index 000000000000..21c824ad8546 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc1.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc1.html new file mode 100644 index 000000000000..327625c01848 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc1.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_pvrtc.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_pvrtc.html new file mode 100644 index 000000000000..c95481398421 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_pvrtc.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_s3tc.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_s3tc.html new file mode 100644 index 000000000000..6ad800110648 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_s3tc.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_depth_texture.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_depth_texture.html new file mode 100644 index 000000000000..957171c160e3 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_depth_texture.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_draw_buffers.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_draw_buffers.html new file mode 100644 index 000000000000..18774d0d68a0 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_draw_buffers.html @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html b/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html new file mode 100644 index 000000000000..3b5907a8a886 --- /dev/null +++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html @@ -0,0 +1,75 @@ + + + + + + + + + + +