Bug 1308057 - Update tests. - r=ethlin
MozReview-Commit-ID: Fl3ofikbPdP
--- 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
@@ -5,15 +5,13 @@
<script src='/tests/SimpleTest/SimpleTest.js'></script>
<link rel='stylesheet' href='/tests/SimpleTest/test.css'>
<script src='ensure-ext.js'></script>
</head>
<body>
<script>
'use strict';
-Lastly_WithDraftExtsEnabled(function() {
- EnsureExtFor('webgl', 'EXT_disjoint_timer_query');
-});
+EnsureExt('EXT_disjoint_timer_query');
</script>
</body>
</html>
--- a/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
+++ b/dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
@@ -14,16 +14,17 @@
var ENSURE = 'ENSURE'; // Works on all test machines.
var FORBID = 'FORBID'; // Should not work on any test machine.
var MACHINE_SPECIFIC = 'MACHINE_SPECIFIC';
var defaultExts = [
// Ratified
['ANGLE_instanced_arrays' , [MACHINE_SPECIFIC, FORBID ]],
['EXT_blend_minmax' , [MACHINE_SPECIFIC, FORBID ]],
+ ['EXT_disjoint_timer_query' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
['EXT_frag_depth' , [MACHINE_SPECIFIC, FORBID ]],
['EXT_shader_texture_lod' , [MACHINE_SPECIFIC, FORBID ]],
['EXT_texture_filter_anisotropic', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
['OES_element_index_uint' , [ENSURE , FORBID ]],
['OES_standard_derivatives' , [MACHINE_SPECIFIC, FORBID ]],
['OES_texture_float' , [ENSURE , FORBID ]],
['OES_texture_float_linear' , [ENSURE , ENSURE ]],
['OES_texture_half_float' , [ENSURE , FORBID ]],
@@ -42,17 +43,16 @@ var defaultExts = [
['EXT_sRGB' , [MACHINE_SPECIFIC, FORBID ]],
['WEBGL_color_buffer_float' , [MACHINE_SPECIFIC, FORBID ]],
['WEBGL_compressed_texture_atc' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
['WEBGL_compressed_texture_etc1' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
['WEBGL_compressed_texture_pvrtc', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
];
var draftExts = [
- ['EXT_disjoint_timer_query' , [MACHINE_SPECIFIC, MACHINE_SPECIFIC]], // TODO: Actually Community Approved now.
['WEBGL_compressed_texture_es3', [MACHINE_SPECIFIC, MACHINE_SPECIFIC]],
];
var nonImplementedExts = [
'OES_fbo_render_mipmap',
'WEBGL_compressed_texture_astc',
'WEBGL_security_sensitive_resources',
'WEBGL_shared_resources',
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -10,17 +10,17 @@ support-files =
[ensure-exts/test_ANGLE_instanced_arrays.html]
fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6')
[ensure-exts/test_EXT_blend_minmax.html]
fail-if = (os == 'android')
[ensure-exts/test_EXT_color_buffer_half_float.html]
fail-if = (os == 'android')
[ensure-exts/test_EXT_disjoint_timer_query.html]
-fail-if = (os == 'android') || (os == 'mac') || (os == 'win' && os_version == '5.1')
+fail-if = (os == 'android') || (os == 'mac')
[ensure-exts/test_EXT_frag_depth.html]
fail-if = (os == 'android')
[ensure-exts/test_EXT_sRGB.html]
fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6') || (os == 'win')
[ensure-exts/test_EXT_shader_texture_lod.html]
fail-if = (os == 'android')
[ensure-exts/test_EXT_texture_filter_anisotropic.html]
fail-if = (os == 'android') || (os == 'linux')
@@ -80,17 +80,16 @@ skip-if = android_version == '18' #Andro
[test_uninit_data.html]
[test_webgl_available.html]
#[test_webgl_color_buffer_float.html]
# We haven't cleaned up the Try results yet, but let's get this on the books first.
[test_webgl_conformance.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl_compressed_texture_es3.html]
[test_webgl_disjoint_timer_query.html]
-fail-if = (os == 'win' && (os_version == '6.1' || os_version == '6.2' || os_version == '10.0'))
[test_webgl_force_enable.html]
[test_webgl_request_context.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl_request_mismatch.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl2_not_exposed.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl2_invalidate_framebuffer.html]
--- a/dom/canvas/test/webgl-mochitest/test_webgl_disjoint_timer_query.html
+++ b/dom/canvas/test/webgl-mochitest/test_webgl_disjoint_timer_query.html
@@ -26,20 +26,21 @@ function doTest() {
return;
}
ok(!ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT),
"No query is active initially.");
var elapsedQuery = ext.createQueryEXT();
ok(elapsedQuery, "Query creation works.");
- ok(ext.isQueryEXT(elapsedQuery), "New query is valid after creation.");
+ ok(!ext.isQueryEXT(elapsedQuery), "isQuery fails after creation but before bind.");
ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, elapsedQuery);
- is(ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT), elapsedQuery,
+ ok(ext.isQueryEXT(elapsedQuery), "isQuery fails after bind.");
+ ok(ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT) == elapsedQuery,
"Query is active after beginQueryEXT.");
ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
gl.flush();
ok(!ext.getQueryEXT(ext.TIME_ELAPSED_EXT, ext.CURRENT_QUERY_EXT),
"Query is inactive after endQueryEXT.");
defer(function() {
@@ -60,23 +61,22 @@ function doTest() {
defer(function() {
ok(ext.getQueryObjectEXT(timestampQuery, ext.QUERY_RESULT_AVAILABLE_EXT),
"Timestamp query should be available immediately after flush and event loop tick.");
ok(ext.getQueryEXT(ext.TIMESTAMP_EXT, ext.QUERY_COUNTER_BITS_EXT) >= 30,
"Time elapsed must be at least 30 bits to hold at least 1 second of timing.");
SimpleTest.finish();
-
- });
+ });
} else {
SimpleTest.finish();
}
});
}
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [['webgl.enable-draft-extensions', true]]}, doTest);
+doTest();
</script>
</body>
</html>