Bug 1497554 - Split new test into test_group_touchevents-4.html; r=kats
authorEdgar Chen <echen@mozilla.com>
Wed, 10 Oct 2018 20:34:44 +0000
changeset 488974 01894c0196cb83376acc4bfce32f9d4a176d3b4e
parent 488973 ae464c376e720fce7701ee625ec912467468a264
child 488975 4530cf55b7b4d86e41080dae86a2ec85f0b29edf
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewerskats
bugs1497554
milestone64.0a1
Bug 1497554 - Split new test into test_group_touchevents-4.html; r=kats Differential Revision: https://phabricator.services.mozilla.com/D8288
gfx/layers/apz/test/mochitest/mochitest.ini
gfx/layers/apz/test/mochitest/test_group_touchevents-2.html
gfx/layers/apz/test/mochitest/test_group_touchevents-3.html
gfx/layers/apz/test/mochitest/test_group_touchevents-4.html
gfx/layers/apz/test/mochitest/test_group_touchevents.html
--- a/gfx/layers/apz/test/mochitest/mochitest.ini
+++ b/gfx/layers/apz/test/mochitest/mochitest.ini
@@ -21,16 +21,18 @@
 [test_group_pointerevents.html]
   skip-if = os == 'win' && os_version == '10.0' # Bug 1404836
 [test_group_touchevents.html]
   skip-if = (verify && debug && (os == 'win'))
 [test_group_touchevents-2.html]
   skip-if = (verify && debug && (os == 'win'))
 [test_group_touchevents-3.html]
   skip-if = (verify && debug && (os == 'win'))
+[test_group_touchevents-4.html]
+  skip-if = (verify && debug && (os == 'win'))
 [test_group_wheelevents.html]
   skip-if = (toolkit == 'android') # wheel events not supported on mobile
 [test_group_zoom.html]
   skip-if = (os == 'win') || webrender # zooming is not supported yet on WebRender; see bug 1495580 for Windows
 [test_interrupted_reflow.html]
 [test_group_keyboard.html]
 [test_layerization.html]
   skip-if = (os == 'android') # wheel events not supported on mobile
--- a/gfx/layers/apz/test/mochitest/test_group_touchevents-2.html
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents-2.html
@@ -33,17 +33,17 @@ var subtests = [
   // end up waiting.
   {'file': 'helper_tap_passive.html', 'prefs': [["apz.content_response_timeout", 24 * 60 * 60 * 1000],
                                                 ["apz.test.fails_with_native_injection", isWindows]]},
 
   {'file': 'helper_tap_default_passive.html', 'prefs': [["apz.content_response_timeout", 24 * 60 * 60 * 1000],
                                                         ["apz.test.fails_with_native_injection", isWindows],
                                                         ["dom.event.default_to_passive_touch_listeners", true]]},
 
-  // Add new subtests to test_group_touch_events-3.html, not this file.
+  // Add new subtests to test_group_touch_events-4.html, not this file.
 ];
 
 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);
   }
--- a/gfx/layers/apz/test/mochitest/test_group_touchevents-3.html
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents-3.html
@@ -18,21 +18,18 @@ var touch_action_prefs = [
 var subtests = [
   // Simple test to exercise touch-action CSS property
   {'file': 'helper_touch_action.html', 'prefs': touch_action_prefs},
   // More complex touch-action tests, with overlapping regions and such
   {'file': 'helper_touch_action_complex.html', 'prefs': touch_action_prefs},
   // Tests that touch-action CSS properties are handled in APZ without waiting
   // on the main-thread, when possible
   {'file': 'helper_touch_action_regions.html', 'prefs': touch_action_prefs},
-  // touch-action tests with :active::after CSS property
-  {'file': 'helper_bug1473108.html'},
-  // Add new subtests here. If this starts timing out because it's taking too
-  // long, create a test_group_touchevents-4.html file. Refer to 1423011#c57
-  // for more details.
+
+  // Add new subtests to test_group_touch_events-4.html, not this file.
 ];
 
 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);
   }
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents-4.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <meta charset="utf-8">
+  <title>Various touch tests that spawn in new windows (4)</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
+  <script type="application/javascript" src="apz_test_utils.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+
+var subtests = [
+  // touch-action tests with :active::after CSS property
+  {'file': 'helper_bug1473108.html'},
+  // Add new subtests here. If this starts timing out because it's taking too
+  // long, create a test_group_touchevents-5.html file. Refer to 1423011#c57
+  // for more details.
+];
+
+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, SimpleTest.finish);
+  };
+}
+
+  </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
@@ -22,17 +22,17 @@ var subtests = [
   // Tapping, but with a full-zoom applied
   {'file': 'helper_tap_fullzoom.html'},
 
   // For the following two tests, disable displayport suppression to make sure it
   // doesn't interfere with the test by scheduling paints non-deterministically.
   {'file': 'helper_scrollto_tap.html?true', 'prefs': [["apz.paint_skipping.enabled", true]], 'dp_suppression': false},
   {'file': 'helper_scrollto_tap.html?false', 'prefs': [["apz.paint_skipping.enabled", false]], 'dp_suppression': false},
 
-  // Add new subtests to test_group_touch_events-3.html, not this file.
+  // Add new subtests to test_group_touch_events-4.html, not this file.
 ];
 
 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);
   }