Bug 1440164 - Call SimpleTest.finish() in runSubtestsSeriallyInFreshWindows(), instead of relying on its caller to call it. r=kats draft
authorBotond Ballo <botond@mozilla.com>
Fri, 23 Feb 2018 21:51:33 -0500
changeset 759338 810fe6ad8d04be918074867567d3a2bde6695779
parent 759337 3e3b11bb535d6943f2ebcb4a4721b31936796b6a
child 759339 7393203aeda767abf0fe41186b30b12464b9ba57
push id100338
push userbballo@mozilla.com
push dateSat, 24 Feb 2018 03:09:58 +0000
reviewerskats
bugs1440164
milestone60.0a1
Bug 1440164 - Call SimpleTest.finish() in runSubtestsSeriallyInFreshWindows(), instead of relying on its caller to call it. r=kats MozReview-Commit-ID: FeCVtMqkovQ
gfx/layers/apz/test/mochitest/apz_test_utils.js
gfx/layers/apz/test/mochitest/test_group_hittest.html
gfx/layers/apz/test/mochitest/test_group_mouseevents.html
gfx/layers/apz/test/mochitest/test_group_overrides.html
gfx/layers/apz/test/mochitest/test_group_pointerevents.html
gfx/layers/apz/test/mochitest/test_group_touchevents.html
gfx/layers/apz/test/mochitest/test_group_wheelevents.html
gfx/layers/apz/test/mochitest/test_group_zoom.html
--- a/gfx/layers/apz/test/mochitest/apz_test_utils.js
+++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js
@@ -242,17 +242,17 @@ function runSubtestsSeriallyInFreshWindo
           w = spawnTest(test.file);
         });
       } else {
         w = spawnTest(test.file);
       }
     }
 
     advanceSubtestExecution();
-  });
+  }).then(SimpleTest.finish);
 }
 
 function pushPrefs(prefs) {
   return SpecialPowers.pushPrefEnv({'set': prefs});
 }
 
 function waitUntilApzStable() {
   return new Promise(function(resolve, reject) {
--- a/gfx/layers/apz/test/mochitest/test_group_hittest.html
+++ b/gfx/layers/apz/test/mochitest/test_group_hittest.html
@@ -29,18 +29,17 @@ var prefs = [
 var subtests = [
   {'file': 'helper_hittest_basic.html', 'prefs': prefs},
   {'file': 'helper_hittest_subframe_float.html', 'prefs': prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_mouseevents.html
+++ b/gfx/layers/apz/test/mochitest/test_group_mouseevents.html
@@ -20,18 +20,17 @@ var subtests = [
   {'file': 'helper_drag_scroll.html'},
   // Test for dragging the scrollbar with a fixed-pos element overlaying it
   {'file': 'helper_bug1346632.html'}
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_overrides.html
+++ b/gfx/layers/apz/test/mochitest/test_group_overrides.html
@@ -20,18 +20,17 @@ var prefs = [
 var subtests = [
   {'file': 'helper_override_root.html', 'prefs': prefs},
   {'file': 'helper_override_subdoc.html', 'prefs': prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_pointerevents.html
+++ b/gfx/layers/apz/test/mochitest/test_group_pointerevents.html
@@ -14,18 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   var subtests = [
     {'file': 'helper_bug1285070.html', 'prefs': [["dom.w3c_pointer_events.enabled", true]]},
     {'file': 'helper_bug1299195.html', 'prefs': [["dom.w3c_pointer_events.enabled", true]]}
   ];
 
   if (isApzEnabled()) {
     SimpleTest.waitForExplicitFinish();
     window.onload = function() {
-      runSubtestsSeriallyInFreshWindows(subtests)
-      .then(SimpleTest.finish);
+      runSubtestsSeriallyInFreshWindows(subtests);
     };
   }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_touchevents.html
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents.html
@@ -88,18 +88,17 @@ if (isApzEnabled()) {
   ok(window.TouchEvent, "Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)");
   if (getPlatform() == "android") {
     // This has a lot of subtests, and Android emulators are slow.
     SimpleTest.requestLongerTimeout(2);
   }
 
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
+++ b/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
@@ -33,18 +33,17 @@ var subtests = [
   {'file': 'helper_scroll_inactive_zindex.html', 'prefs': prefs},
   {'file': 'helper_scroll_over_scrollbar.html', 'prefs': scrollbar_prefs},
   {'file': 'helper_scroll_tables_perspective.html', 'prefs': prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>
--- a/gfx/layers/apz/test/mochitest/test_group_zoom.html
+++ b/gfx/layers/apz/test/mochitest/test_group_zoom.html
@@ -28,18 +28,17 @@ var prefs = [
 var subtests = [
   {'file': 'helper_bug1280013.html', 'prefs': prefs},
   {'file': 'helper_basic_zoom.html', 'prefs': prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
   window.onload = function() {
-    runSubtestsSeriallyInFreshWindows(subtests)
-    .then(SimpleTest.finish);
+    runSubtestsSeriallyInFreshWindows(subtests);
   };
 }
 
   </script>
 </head>
 <body>
 </body>
 </html>