Bug 967613 - Tighten up timing of touch injection calls to avoid the 100msec interval Windows enforces. r=mbrubeck, a=test-only
authorJim Mathies <jmathies@mozilla.com>
Thu, 06 Mar 2014 16:23:23 -0600
changeset 183207 2c13252f2d7f3e6ccffd4c68987a9d9685fe7a37
parent 183206 648c6c5f89e76d504820ee8da304659673e8aa7e
child 183208 6249bc120eb62e5002cacc92e65cb509ecf8fba2
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck, test-only
bugs967613
milestone29.0a2
Bug 967613 - Tighten up timing of touch injection calls to avoid the 100msec interval Windows enforces. r=mbrubeck, a=test-only
browser/metro/base/tests/mochiperf/browser_apzc.js
--- a/browser/metro/base/tests/mochiperf/browser_apzc.js
+++ b/browser/metro/base/tests/mochiperf/browser_apzc.js
@@ -22,16 +22,21 @@ function setup() {
   BookmarksTestHelper.setup();
   HistoryTestHelper.setup();
 }
 
 function tearDown() {
   PanelUI.hide();
   BookmarksTestHelper.restore();
   HistoryTestHelper.restore();
+  Browser.selectedTab
+         .browser
+         .contentWindow
+         .QueryInterface(Ci.nsIInterfaceRequestor)
+         .getInterface(Ci.nsIDOMWindowUtils).clearNativeTouchSequence();
 }
 
 /*
  * short up/down touch scroll. This test isn't affected by
  * skate or stationary apzc prefs provided the display port
  * is twice the height of the screen. Measures apzc/composition
  * perf since the display port (should) only render once.
  */
@@ -80,17 +85,17 @@ gTests.push({
     yield hideContextUI();
     yield hideNavBar();
 
     let stopwatch = new StopWatch();
     let win = Browser.selectedTab.browser.contentWindow;
     let domUtils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
     var touchdrag = new TouchDragAndHold();
     touchdrag.useNativeEvents = true;
-    touchdrag.stepTimeout = 20;
+    touchdrag.stepTimeout = 5;
     touchdrag.numSteps = 20;
 
     stopwatch.start();
     let recordingHandle = domUtils.startFrameTimeRecording();
     for (let count = 0; count < 5; count++) {
       yield touchdrag.start(win, 100, (win.innerHeight - 50), 100, 50);
       touchdrag.end();
     }
@@ -117,17 +122,17 @@ gTests.push({
     yield hideContextUI();
     yield hideNavBar();
 
     let stopwatch = new StopWatch();
     let win = Browser.selectedTab.browser.contentWindow;
     let domUtils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
     var touchdrag = new TouchDragAndHold();
     touchdrag.useNativeEvents = true;
-    touchdrag.stepTimeout = 20;
+    touchdrag.stepTimeout = 5;
     touchdrag.numSteps = 10;
 
     let iterations = 3;
     let sets = [];
     for (let count = 0; count < iterations; count++) {
       let obsPromise = waitForObserver("apzc-transform-end", 30000);
       stopwatch.start();
       let recordingHandle = domUtils.startFrameTimeRecording();