Bug 1308057 - Update tests. - r=ethlin a=gchang
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Fri, 04 Nov 2016 15:55:34 -0700
changeset 352954 fba9f42b93cfb99238d53f61834817ca0f6a1c3a
parent 352953 1f6791e014b85ce383f49eb2ae3eb2c0225334b2
child 352955 f1eabab447ab9435d2588304271c4a66408a805f
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersethlin, gchang
bugs1308057
milestone52.0a2
Bug 1308057 - Update tests. - r=ethlin a=gchang MozReview-Commit-ID: Fl3ofikbPdP
dom/canvas/test/webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html
dom/canvas/test/webgl-mochitest/ensure-exts/test_common.html
dom/canvas/test/webgl-mochitest/mochitest.ini
dom/canvas/test/webgl-mochitest/test_webgl_disjoint_timer_query.html
--- 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
@@ -77,17 +77,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>