Bug 1586254 - Make sure runUrlbarTest doesn't complain about 'unexpected changed rect' in the non-megabar results panel. r=mak
authorDão Gottwald <dao@mozilla.com>
Wed, 09 Oct 2019 12:15:28 +0000
changeset 496969 f693d9efd28f211d724f8119f089df5e89f32065
parent 496968 e8553b749827dcc7d4b2b75296bd42b290039e1a
child 496970 73358909161395b3908d402b0357aacaa2973f5a
push id36673
push userbtara@mozilla.com
push dateWed, 09 Oct 2019 21:39:14 +0000
treeherdermozilla-central@cad27f93a986 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1586254
milestone71.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 1586254 - Make sure runUrlbarTest doesn't complain about 'unexpected changed rect' in the non-megabar results panel. r=mak Differential Revision: https://phabricator.services.mozilla.com/D48663
browser/base/content/test/performance/head.js
--- a/browser/base/content/test/performance/head.js
+++ b/browser/base/content/test/performance/head.js
@@ -776,47 +776,40 @@ async function runUrlbarTest(
               r.x1 >= urlbarRect.left - SHADOW_SIZE &&
               r.x2 <= urlbarRect.right + SHADOW_SIZE &&
               r.y1 >= urlbarRect.top - SHADOW_SIZE
             )
         );
       },
     };
   } else {
+    // Hide the results as we expect many changes there that we don't want to
+    // detect here.
+    URLBar.view.panel.style.visibility = "hidden";
+
     let dropmarkerRect = URLBar.dropmarker.getBoundingClientRect();
     let textBoxRect = URLBar.querySelector(
       "moz-input-box"
     ).getBoundingClientRect();
-    let resultsRect = {
-      top: URLBar.textbox.closest("toolbar").getBoundingClientRect().bottom,
-      right: win.innerWidth,
-      bottom: win.innerHeight,
-      left: 0,
-    };
     expectedRects = {
       filter: rects =>
         rects.filter(
           r =>
             !// We put text into the urlbar so expect its textbox to change.
             (
               (r.x1 >= textBoxRect.left &&
                 r.x2 <= textBoxRect.right &&
                 r.y1 >= textBoxRect.top &&
                 r.y2 <= textBoxRect.bottom) ||
               // The dropmarker is displayed as active during some of the test.
               // dropmarkerRect.left isn't always an integer, hence the - 1 and + 1
               (r.x1 >= dropmarkerRect.left - 1 &&
                 r.x2 <= dropmarkerRect.right + 1 &&
                 r.y1 >= dropmarkerRect.top &&
-                r.y2 <= dropmarkerRect.bottom) ||
-              // We expect many changes in the results view.
-              (r.x1 >= resultsRect.left &&
-                r.x2 <= resultsRect.right &&
-                r.y1 >= resultsRect.top &&
-                r.y2 <= resultsRect.bottom)
+                r.y2 <= dropmarkerRect.bottom)
             )
         ),
     };
   }
 
   info("First opening");
   await withPerfObserver(
     testFn,