Bug 1397728 - Use waitForCondition to avoid intermittent failures in browser_searchbar_openpopup.js. r=florian

MozReview-Commit-ID: K62zPje3Hnj

--HG--
extra : rebase_source : 7d6c3c1438065c5ff6ae03ec50099f605518fae0
This commit is contained in:
Mark Banner 2017-09-25 16:52:52 +01:00
Родитель d5ae4622ac
Коммит 0578f18627
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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");