Bug 1586254 - Make sure runUrlbarTest doesn't complain about 'unexpected changed rect' in the non-megabar results panel. r=mak a=test-only
authorDão Gottwald <dao@mozilla.com>
Thu, 10 Oct 2019 19:13:05 +0200
changeset 552372 326356c6bd4e9727ae35a57cbeee82e71b9f0fcb
parent 552371 360c73669bbc473f5a988e1c7548d8d9d69b493d
child 552373 56851c7200076fd03fd35fa865f11c454b1e55a9
push id12158
push userdgottwald@mozilla.com
push dateThu, 10 Oct 2019 17:13:16 +0000
treeherdermozilla-beta@326356c6bd4e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1586254
milestone70.0
Bug 1586254 - Make sure runUrlbarTest doesn't complain about 'unexpected changed rect' in the non-megabar results panel. r=mak a=test-only
browser/base/content/test/performance/head.js
--- a/browser/base/content/test/performance/head.js
+++ b/browser/base/content/test/performance/head.js
@@ -779,47 +779,40 @@ async function runUrlbarTest(
         value: URLBar.value,
       });
       await waitExtra();
     }
 
     await UrlbarTestUtils.promisePopupClose(win);
   };
 
+  // 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,
-  };
   let 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,
     { expectedReflows: expectedReflowsFirstOpen, frames: expectedRects },