Bug 1496864 - Move getResolution() into apz_test_native_utils.js. r=kats
authorBotond Ballo <botond@mozilla.com>
Thu, 08 Nov 2018 22:24:48 +0000
changeset 445333 4d51790935602e7a4921daca92f2672cc04d8835
parent 445332 83db18e6c2bfc3a65a82ab0deed7e650e84353bb
child 445334 7dd5ed97088f3c1d08379e70d25563e118499fb7
push id109718
push userrgurzau@mozilla.com
push dateFri, 09 Nov 2018 05:49:16 +0000
treeherdermozilla-inbound@58c02c05d2db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1496864
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496864 - Move getResolution() into apz_test_native_utils.js. r=kats Differential Revision: https://phabricator.services.mozilla.com/D11229
gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js
gfx/layers/apz/test/mochitest/helper_basic_doubletap_zoom.html
gfx/layers/apz/test/mochitest/helper_basic_zoom.html
--- a/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js
+++ b/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js
@@ -1,10 +1,16 @@
 // Utilities for synthesizing of native events.
 
+function getResolution() {
+  let resolution = { value: -1 }; // bogus value in case DWU fails us
+  SpecialPowers.getDOMWindowUtils(window).getResolution(resolution);
+  return resolution.value;
+}
+
 function getPlatform() {
   if (navigator.platform.indexOf("Win") == 0) {
     return "windows";
   }
   if (navigator.platform.indexOf("Mac") == 0) {
     return "mac";
   }
   // Check for Android before Linux
--- a/gfx/layers/apz/test/mochitest/helper_basic_doubletap_zoom.html
+++ b/gfx/layers/apz/test/mochitest/helper_basic_doubletap_zoom.html
@@ -3,21 +3,16 @@
 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=2100"/>
   <title>Sanity check for double-tap zooming</title>
   <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
   <script type="application/javascript" src="apz_test_utils.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
   <script type="application/javascript">
-function getResolution() {
-  let resolution = { value: -1 }; // bogus value in case DWU fails us
-  SpecialPowers.getDOMWindowUtils(window).getResolution(resolution);
-  return resolution.value;
-}
 
 function* test(testDriver) {
   var initial_resolution = getResolution();
   ok(initial_resolution > 0,
       'The initial_resolution is ' + initial_resolution + ', which is some sane value');
 
   // This listener will trigger the test to continue once APZ is done with
   // processing the scroll.
--- a/gfx/layers/apz/test/mochitest/helper_basic_zoom.html
+++ b/gfx/layers/apz/test/mochitest/helper_basic_zoom.html
@@ -3,21 +3,16 @@
 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width">
   <title>Sanity check for zooming</title>
   <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
   <script type="application/javascript" src="apz_test_utils.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
   <script type="application/javascript">
-function getResolution() {
-  let resolution = { value: -1 }; // bogus value in case DWU fails us
-  SpecialPowers.getDOMWindowUtils(window).getResolution(resolution);
-  return resolution.value;
-}
 
 function* test(testDriver) {
   var initial_resolution = getResolution();
   ok(initial_resolution > 0,
       'The initial_resolution is ' + initial_resolution + ', which is some sane value');
 
   // This listener will trigger the test to continue once APZ is done with
   // processing the scroll.