Backed out changeset 0511fcd323f3 (bug 1359056) for browser_searchbar_openpopup.js failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 22 May 2017 13:35:38 -0700
changeset 394045 64096bfc5a89e6c92911a3257fdca0f169418022
parent 394044 5de3b1528ca0947dfde7b1aef7a42f5984b5ee89
child 394046 16c20bf328da5fcd6060395fd0fb320f3b8a1146
push id7340
push userkwierso@gmail.com
push dateMon, 22 May 2017 20:35:50 +0000
treeherdermozilla-beta@64096bfc5a89 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1359056
milestone54.0
backs out0511fcd323f3a43ffbdae0e41353b9af776cfc37
Backed out changeset 0511fcd323f3 (bug 1359056) for browser_searchbar_openpopup.js failures a=backout
browser/components/search/content/search.xml
browser/components/search/test/browser_searchbar_openpopup.js
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -692,23 +692,16 @@
       <!--
         This method overrides the autocomplete binding's openPopup (essentially
         duplicating the logic from the autocomplete popup binding's
         openAutocompletePopup method), modifying it so that the popup is aligned with
         the inner textbox, but sized to not extend beyond the search bar border.
       -->
       <method name="openPopup">
         <body><![CDATA[
-          // Entering customization mode after the search bar had focus causes
-          // the popup to appear again, due to focus returning after the
-          // hamburger panel closes. Don't open in that spurious event.
-          if (document.documentElement.getAttribute("customizing") == "true") {
-            return;
-          }
-
           var popup = this.popup;
           if (!popup.mPopupOpen) {
             // Initially the panel used for the searchbar (PopupSearchAutoComplete
             // in browser.xul) is hidden to avoid impacting startup / new
             // window performance. The base binding's openPopup would normally
             // call the overriden openAutocompletePopup in
             // browser-search-autocomplete-result-popup binding to unhide the popup,
             // but since we're overriding openPopup we need to unhide the panel
--- a/browser/components/search/test/browser_searchbar_openpopup.js
+++ b/browser/components/search/test/browser_searchbar_openpopup.js
@@ -37,36 +37,16 @@ function* synthesizeNativeMouseClick(aEl
 
     aElement.addEventListener("mouseup", eventOccurred, true);
 
     utils.sendNativeMouseEvent(x * scale, y * scale, mouseDown, 0, null);
     utils.sendNativeMouseEvent(x * scale, y * scale, mouseUp, 0, null);
   });
 }
 
-function* endCustomizing(aWindow = window) {
-  if (aWindow.document.documentElement.getAttribute("customizing") != "true") {
-    return true;
-  }
-  yield SpecialPowers.pushPrefEnv({set: [["browser.uiCustomization.disableAnimation", true]]});
-  let eventPromise = BrowserTestUtils.waitForEvent(aWindow.gNavToolbox, "aftercustomization");
-  aWindow.gCustomizeMode.exit();
-  return eventPromise;
-}
-
-function* startCustomizing(aWindow = window) {
-  if (aWindow.document.documentElement.getAttribute("customizing") == "true") {
-    return true;
-  }
-  yield SpecialPowers.pushPrefEnv({set: [["browser.uiCustomization.disableAnimation", true]]});
-  let eventPromise = BrowserTestUtils.waitForEvent(aWindow.gNavToolbox, "customizationready");
-  aWindow.gCustomizeMode.enter();
-  return eventPromise;
-}
-
 add_task(function* init() {
   yield promiseNewEngine("testEngine.xml");
 
   // First cleanup the form history in case other tests left things there.
   yield new Promise((resolve, reject) => {
     info("cleanup the search history");
     searchbar.FormHistory.update({op: "remove", fieldname: "searchbar-history"},
                                  {handleCompletion: resolve,
@@ -535,36 +515,8 @@ add_task(function* dont_rollup_oncaretmo
 
   // Close the popup again
   promise = promiseEvent(searchPopup, "popuphidden");
   EventUtils.synthesizeKey("VK_ESCAPE", {});
   yield promise;
 
   textbox.value = "";
 });
-
-// Entering customization mode shouldn't open the popup.
-add_task(async function dont_open_in_customization() {
-  gURLBar.focus();
-  textbox.value = "foo";
-
-  let promise = promiseEvent(searchPopup, "popupshown");
-  EventUtils.synthesizeKey("VK_TAB", {});
-  await promise;
-  isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");
-
-  info("Entering customization mode");
-  let sawPopup = false;
-  function listener() {
-    sawPopup = true;
-  }
-  searchPopup.addEventListener("popupshowing", listener);
-  await PanelUI.show();
-  promise =  promiseEvent(searchPopup, "popuphidden");
-  await startCustomizing();
-  await promise;
-
-  searchPopup.removeEventListener("popupshowing", listener);
-  ok(!sawPopup, "Shouldn't have seen the suggestions popup");
-
-  await endCustomizing();
-  textbox.value = "";
-});