Bug 1191520: Hide the search settings footer in non-nightly builds. r=adw
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 05 Aug 2015 15:11:15 -0700
changeset 288264 b5168cc893e880f0fa3acf6daf5825b46a0bae74
parent 288263 fda85fc07f423f4063d953da85333dc34941ed88
child 288265 213cb104d7b1b05e618238f69fc8e69da22e7781
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1191520
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1191520: Hide the search settings footer in non-nightly builds. r=adw
browser/base/content/browser.xul
browser/base/content/test/general/browser_urlbar_searchsettings.js
browser/base/moz.build
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -142,20 +142,22 @@
     <!-- for search and content formfill/pw manager -->
     <panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
 
     <!-- for search with one-off buttons -->
     <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>
 
     <!-- for url bar autocomplete -->
     <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true">
+#ifdef NIGHTLY_BUILD
       <hbox id="urlbar-search-footer" flex="1" align="stretch" pack="end">
         <button id="urlbar-search-settings" label="&changeSearchSettings.button;"
                 oncommand="BrowserUITelemetry.countSearchSettingsEvent('urlbar'); openPreferences('paneSearch')"/>
       </hbox>
+#endif
     </panel>
 
     <!-- for select dropdowns. The menupopup is what shows the list of options,
          and the popuponly menulist makes things like the menuactive attributes
          work correctly on the menupopup. ContentSelectDropdown expects the
          popuponly menulist to be its immediate parent. -->
     <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
       <menupopup rolluponmousewheel="true"
--- a/browser/base/content/test/general/browser_urlbar_searchsettings.js
+++ b/browser/base/content/test/general/browser_urlbar_searchsettings.js
@@ -1,24 +1,30 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 add_task(function*() {
+  let button = document.getElementById("urlbar-search-settings");
+  if (!button) {
+    ok("Skipping test");
+    return;
+  }
+
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* () {
     let popupopened = BrowserTestUtils.waitForEvent(gURLBar.popup, "popupshown");
 
     gURLBar.focus();
     EventUtils.synthesizeKey("a", {});
     yield popupopened;
 
     // Since the current tab is blank the preferences pane will load there
     let loaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
     let popupclosed = BrowserTestUtils.waitForEvent(gURLBar.popup, "popuphidden");
-    EventUtils.synthesizeMouseAtCenter(document.getElementById("urlbar-search-settings"), {});
+    EventUtils.synthesizeMouseAtCenter(button, {});
     yield loaded;
     yield popupclosed;
 
     is(gBrowser.selectedBrowser.currentURI.spec, "about:preferences#search",
        "Should have loaded the right page");
   });
 });
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -22,16 +22,18 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/popupNotifications/browser.ini',
     'content/test/referrer/browser.ini',
     'content/test/social/browser.ini',
 ]
 
 DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
 
+DEFINES['NIGHTLY_BUILD'] = CONFIG['NIGHTLY_BUILD']
+
 DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1
     DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
     DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1