Backed out changesets ffdc2bc309b7 and 435bc55b9c14 (bug 1379808) for failing browser-chrome's accessible/tests/browser/bounds/browser_test_zoom_text.js on Windows. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 11 Sep 2017 19:55:48 +0200
changeset 429595 1852c4dfd856e5adcf98d00da8204c7f2ee250ac
parent 429594 0495d0052c24fcc9fb7f3d6d96b06314e8fd3234
child 429596 85157b4b361ab9fdf7b3c3d7cf129bd3d422feac
child 429597 e40d55e7a132cd5e3133b6e372acfd0dce5317eb
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1379808
milestone57.0a1
backs outffdc2bc309b730a65eb9bad813dab0165a4a2096
435bc55b9c14052b4206dd5734de0049fe70eb53
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
Backed out changesets ffdc2bc309b7 and 435bc55b9c14 (bug 1379808) for failing browser-chrome's accessible/tests/browser/bounds/browser_test_zoom_text.js on Windows. r=backout
accessible/tests/browser/bounds/browser.ini
accessible/tests/mochitest/common.js
accessible/tests/mochitest/layout.js
--- a/accessible/tests/browser/bounds/browser.ini
+++ b/accessible/tests/browser/bounds/browser.ini
@@ -3,8 +3,9 @@ support-files =
   head.js
   !/accessible/tests/browser/events.js
   !/accessible/tests/browser/shared-head.js
   !/accessible/tests/mochitest/*.js
   !/accessible/tests/mochitest/letters.gif
 
 [browser_test_zoom.js]
 [browser_test_zoom_text.js]
+skip-if = true # Bug 1372296, Bug 1379808, Bug 1391453
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -186,28 +186,16 @@ function isObject(aObj, aExpectedObj, aM
     return;
   }
 
   ok(false,
      aMsg + " - got '" + prettyName(aObj) +
             "', expected '" + prettyName(aExpectedObj) + "'");
 }
 
-/**
- * is() function checking the expected value is within the range.
- */
-function isWithin(aExpected, aGot, aWithin, aMsg) {
-  if (Math.abs(aGot - aExpected) <= aWithin) {
-    ok(true, `${aMsg} - Got ${aGot}`);
-  } else {
-    ok(false,
-       `${aMsg} - Got ${aGot}, expected ${aExpected} with error of ${aWithin}`);
-  }
-}
-
 // //////////////////////////////////////////////////////////////////////////////
 // Helpers for getting DOM node/accessible
 
 /**
  * Return the DOM node by identifier (may be accessible, DOM node or ID).
  */
 function getNode(aAccOrNodeOrID, aDocument) {
   if (!aAccOrNodeOrID)
--- a/accessible/tests/mochitest/layout.js
+++ b/accessible/tests/mochitest/layout.js
@@ -145,39 +145,33 @@ function testTextPos(aID, aOffset, aPoin
  */
 function testTextBounds(aID, aStartOffset, aEndOffset, aRect, aCoordOrigin) {
   var [expectedX, expectedY, expectedWidth, expectedHeight] = aRect;
 
   var xObj = {}, yObj = {}, widthObj = {}, heightObj = {};
   var hyperText = getAccessible(aID, [nsIAccessibleText]);
   hyperText.getRangeExtents(aStartOffset, aEndOffset,
                             xObj, yObj, widthObj, heightObj, aCoordOrigin);
-
-  // x
   is(xObj.value, expectedX,
      "Wrong x coordinate of text between offsets (" + aStartOffset + ", " +
      aEndOffset + ") for " + prettyName(aID));
+  is(yObj.value, expectedY,
+     "Wrong y coordinate of text between offsets (" + aStartOffset + ", " +
+     aEndOffset + ") for " + prettyName(aID));
 
-  // y
-  isWithin(yObj.value, expectedY, 1,
-           `y coord of text between offsets (${aStartOffset}, ${aEndOffset}) ` +
-           `for ${prettyName(aID)}`);
-
-  // Width
   var msg = "Wrong width of text between offsets (" + aStartOffset + ", " +
     aEndOffset + ") for " + prettyName(aID);
   if (widthObj.value == expectedWidth)
     ok(true, msg);
   else
     todo(false, msg); // fails on some windows machines
 
-  // Height
-  isWithin(heightObj.value, expectedHeight, 1,
-           `height of text between offsets (${aStartOffset}, ${aEndOffset}) ` +
-           `for ${prettyName(aID)}`);
+  is(heightObj.value, expectedHeight,
+     "Wrong height of text between offsets (" + aStartOffset + ", " +
+     aEndOffset + ") for " + prettyName(aID));
 }
 
 /**
  * Return the accessible coordinates relative to the screen in device pixels.
  */
 function getPos(aID) {
   var accessible = getAccessible(aID);
   var x = {}, y = {};