Bug 1397728 - Use waitForCondition to avoid intermittent failures in browser_searchbar_openpopup.js. r?florian draft
authorMark Banner <standard8@mozilla.com>
Mon, 25 Sep 2017 16:52:52 +0100
changeset 670277 c9571444ce20b65ca86a233b5b314b3764973031
parent 670182 e6b3498a39b94616ba36798fe0b71a3090b1b14c
child 733201 5795675a21dfb097cd9f6c5df120f5f3fe5b4d11
push id81593
push userbmo:standard8@mozilla.com
push dateTue, 26 Sep 2017 08:47:33 +0000
reviewersflorian
bugs1397728
milestone58.0a1
Bug 1397728 - Use waitForCondition to avoid intermittent failures in browser_searchbar_openpopup.js. r?florian MozReview-Commit-ID: K62zPje3Hnj
browser/components/search/test/browser_searchbar_openpopup.js
--- a/browser/components/search/test/browser_searchbar_openpopup.js
+++ b/browser/components/search/test/browser_searchbar_openpopup.js
@@ -477,17 +477,18 @@ add_task(async function dont_consume_cli
 });
 
 // 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);
   await promise;
 
-  isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");
+  BrowserTestUtils.waitForCondition(() => searchPopup.getAttribute("showonlysettings") != "true",
+    "Should show the full popup");
   is(Services.focus.focusedElement, textbox.inputField, "Should have focused the search bar");
   promise = promiseEvent(searchPopup, "popuphidden");
   searchPopup.hidePopup();
   await promise;
 
   textbox.value = "";
 });