From 0578f186279a1c9e3995b65c71a9f0886c1b62e9 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Mon, 25 Sep 2017 16:52:52 +0100 Subject: [PATCH] Bug 1397728 - Use waitForCondition to avoid intermittent failures in browser_searchbar_openpopup.js. r=florian MozReview-Commit-ID: K62zPje3Hnj --HG-- extra : rebase_source : 7d6c3c1438065c5ff6ae03ec50099f605518fae0 --- .../components/search/test/browser_searchbar_openpopup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/components/search/test/browser_searchbar_openpopup.js b/browser/components/search/test/browser_searchbar_openpopup.js index 1638579dcd34..5c1fe68d15a0 100644 --- a/browser/components/search/test/browser_searchbar_openpopup.js +++ b/browser/components/search/test/browser_searchbar_openpopup.js @@ -479,7 +479,10 @@ add_task(async function dont_consume_clicks() { // Dropping text to the searchbar should open the popup add_task(async function drop_opens_popup() { let promise = promiseEvent(searchPopup, "popupshown"); - EventUtils.synthesizeDrop(searchIcon, textbox.inputField, [[ {type: "text/plain", data: "foo" } ]], "move", window); + // Use a source for the drop that is outside of the search bar area, to avoid + // it receiving a mousedown and causing the popup to sometimes open. + let homeButton = document.getElementById("home-button"); + EventUtils.synthesizeDrop(homeButton, textbox.inputField, [[ {type: "text/plain", data: "foo" } ]], "move", window); await promise; isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");