Bug 1368034 - Disable the search suggestion for urlbar in Marionette draft
authorRaajit Raj <raajit.raj@gmail.com>
Sun, 04 Jun 2017 12:47:21 +0530
changeset 589737 e3c25bafb7586ba9b02de2d11e998aa2bc5091db
parent 589544 4dd1d17ba22660b8f5869a707f2e4e9f9dd5be5b
child 589738 97750bd308926648d3bddb06ec0264013a8cfbad
child 591091 8899166905aff457daaf741ee235f11eda06f9dd
push id62487
push userbmo:raajit.raj@gmail.com
push dateTue, 06 Jun 2017 18:14:26 +0000
bugs1368034
milestone55.0a1
Bug 1368034 - Disable the search suggestion for urlbar in Marionette MozReview-Commit-ID: 8YCGoe49BaU
testing/geckodriver/src/prefs.rs
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/server.js
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -101,16 +101,20 @@ lazy_static! {
         ("browser.tabs.warnOnOpen", Pref::new(false)),
 
         // Disable first run splash page on Windows 10
         ("browser.usedOnWindows10.introURL", Pref::new("")),
 
         // Disable the UI tour
         ("browser.uitour.enabled", Pref::new(false)),
 
+        // Disable the URL bar search suggestions
+        ("browser.urlbar.userMadeSearchSuggestionsChoice", Pref::new(true)),
+        "browser.urlbar.suggest.searches", Pref::new(false),
+
         // Do not warn on quitting Firefox
         ("browser.warnOnQuit", Pref::new(false)),
 
         // Do not show datareporting policy notifications which can
         // interfere with tests
         ("datareporting.healthreport.about.reportUrl", Pref::new("http://%(server)s/dummy/abouthealthreport/")),
         ("datareporting.healthreport.documentServerURI", Pref::new("http://%(server)s/dummy/healthreport/")),
         ("datareporting.healthreport.logging.consoleEnabled", Pref::new(false)),
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -468,16 +468,20 @@ class DesktopInstance(GeckoInstance):
         # Do not warn when closing all other open tabs
         "browser.tabs.warnOnCloseOtherTabs": False,
         # Do not warn when multiple tabs will be opened
         "browser.tabs.warnOnOpen": False,
 
         # Disable the UI tour
         "browser.uitour.enabled": False,
 
+        # Disable the URL bar search suggestions
+        "browser.urlbar.userMadeSearchSuggestionsChoice": True,
+        "browser.urlbar.suggest.searches": False,
+
         # Disable first-run welcome page
         "startup.homepage_welcome_url": "about:blank",
         "startup.homepage_welcome_url.additional": "",
     }
 
     def __init__(self, *args, **kwargs):
         super(DesktopInstance, self).__init__(*args, **kwargs)
         self.required_prefs.update(DesktopInstance.desktop_prefs)
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -151,16 +151,19 @@ const RECOMMENDED_PREFS = new Map([
   // Disable first run splash page on Windows 10
   ["browser.usedOnWindows10.introURL", ""],
 
   // Disable the UI tour.
   //
   // Should be set in profile.
   ["browser.uitour.enabled", false],
 
+  // Disable the URL bar search suggestions
+  ["browser.urlbar.userMadeSearchSuggestionsChoice", true],
+  ["browser.urlbar.suggest.searches", false],
   // Do not show datareporting policy notifications which can
   // interfere with tests
   ["datareporting.healthreport.about.reportUrl", "http://%(server)s/dummy/abouthealthreport/"],
   ["datareporting.healthreport.documentServerURI", "http://%(server)s/dummy/healthreport/"],
   ["datareporting.healthreport.logging.consoleEnabled", false],
   ["datareporting.healthreport.service.enabled", false],
   ["datareporting.healthreport.service.firstRun", false],
   ["datareporting.healthreport.uploadEnabled", false],