Bug 1250710 - Call SimpleTest.finish() when skipping due to lack of WebGL2.
authorJeff Gilbert <jgilbert@mozilla.com>
Sun, 17 Jul 2016 21:37:07 -0700
changeset 388864 b658098634b8ae8de414d5baac04b4645bf4c525
parent 388863 e8b72c8f59f987148823e53fbafbbe3cfde05090
child 388865 3b513116f83951f19f70a1ff816733190043a1ad
child 388902 0cd6f350309eb1125c3d85a98b717365ff8ee674
push id23247
push userbmo:jgilbert@mozilla.com
push dateMon, 18 Jul 2016 06:13:58 +0000
bugs1250710
milestone50.0a1
Bug 1250710 - Call SimpleTest.finish() when skipping due to lack of WebGL2. MozReview-Commit-ID: BRWbAVdEw1k
dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html
--- a/dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html
+++ b/dom/canvas/test/webgl-mochitest/test_pixel_pack_buffer.html
@@ -257,29 +257,32 @@ function Test() {
     ShouldBe(gl.getParameter(enumVal), initialVal, 'Reverted ' + enumStr);
     EnsureNoError(gl);
   }
 
   TestPackState('PACK_ALIGNMENT', 4, 1);
   TestPackState('PACK_ROW_LENGTH', 0, 16);
   TestPackState('PACK_SKIP_PIXELS', 0, 3);
   TestPackState('PACK_SKIP_ROWS', 0, 3);
+}
 
+function RunTest() {
+  Test();
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 
 try {
   var prefArrArr = [
     ['webgl.force-enabled', true],
     ['webgl.disable-angle', true],
   ];
   var prefEnv = {'set': prefArrArr};
-  SpecialPowers.pushPrefEnv(prefEnv, Test);
+  SpecialPowers.pushPrefEnv(prefEnv, RunTest);
 } catch (e) {
   todo(false, 'No SpecialPowers, but trying anyway...');
-  Test();
+  RunTest();
 }
 
     </script>
   </body>
 </html>