Bug 1331601 - RDM browser_device_change.js fix for subpixel size. r=jryans
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 19 Jan 2017 16:28:50 -0600
changeset 375312 bdfebb742afe2d328e63fefb08ba283cc95718e7
parent 375311 0de2f57ed353e10176053d1e83f95d42f031c1be
child 375313 ea5dac2d3a458a09bf0df4ee8e8b8c8c07a0b7d7
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1331601
milestone53.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 1331601 - RDM browser_device_change.js fix for subpixel size. r=jryans MozReview-Commit-ID: 4fzMjF2O338
devtools/client/responsive.html/test/browser/head.js
--- a/devtools/client/responsive.html/test/browser/head.js
+++ b/devtools/client/responsive.html/test/browser/head.js
@@ -187,18 +187,18 @@ function getElRect(selector, win) {
  * Drag an element identified by 'selector' by [x,y] amount. Returns
  * the rect of the dragged element as it was before drag.
  */
 function dragElementBy(selector, x, y, win) {
   let React = win.require("devtools/client/shared/vendor/react");
   let { Simulate } = React.addons.TestUtils;
   let rect = getElRect(selector, win);
   let startPoint = {
-    clientX: rect.left + Math.floor(rect.width / 2),
-    clientY: rect.top + Math.floor(rect.height / 2),
+    clientX: Math.floor(rect.left + rect.width / 2),
+    clientY: Math.floor(rect.top + rect.height / 2),
   };
   let endPoint = [ startPoint.clientX + x, startPoint.clientY + y ];
 
   let elem = win.document.querySelector(selector);
 
   // mousedown is a React listener, need to use its testing tools to avoid races
   Simulate.mouseDown(elem, startPoint);