From 94908e024a90343f12cdbb1b4af2de60aa9af265 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 1 Jun 2019 03:25:46 +0000 Subject: [PATCH] Bug 1488871 - Add an explicit style flush to make sure the added textbox and popupset is styled before proceeding tests in browser_UrlbarInput_unit.js. r=adw Differential Revision: https://phabricator.services.mozilla.com/D22641 --HG-- extra : moz-landing-system : lando --- .../urlbar/tests/browser/browser_UrlbarInput_unit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js b/browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js index 4b9866d13635..643f86778a7c 100644 --- a/browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js +++ b/browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js @@ -93,6 +93,10 @@ async function withNewWindow(callback) { let input = new UrlbarInput(inputOptions); + // Flush pending styles explicitely to make sure the added textbox and + // popupset are styled before proceeding test. See bug 1488871 comment 26. + doc.documentElement.getBoundingClientRect(); + await callback(input); await BrowserTestUtils.closeWindow(win);