Bug 1368034 - Update default values for urlbar searches in Marionette r=whimboo
Search suggestions create unneccessary network requests and the suggestions
opt-in notification interferes with tests that don't expect it to be there.
So, this patch updates the default settings in Marionette to disable both.
MozReview-Commit-ID: 8X8SYPq19tj
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -1,12 +1,12 @@
use mozprofile::preferences::Pref;
lazy_static! {
- pub static ref DEFAULT: [(&'static str, Pref); 80] = [
+ pub static ref DEFAULT: [(&'static str, Pref); 82] = [
// Disable automatic downloading of new releases
("app.update.auto", Pref::new(false)),
// Disable automatically upgrading Firefox
("app.update.enabled", Pref::new(false)),
// Increase the APZ content response timeout in tests to 1
// minute. This is to accommodate the fact that test environments
@@ -100,16 +100,24 @@ 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)),
+ // Turn off search suggestions in the location bar so as not to trigger
+ // network connections.
+ ("browser.urlbar.suggest.searches", Pref::new(false)),
+
+ // Turn off the location bar search suggestions opt-in. It interferes with
+ // tests that don't expect it to be there.
+ ("browser.urlbar.userMadeSearchSuggestionsChoice", Pref::new(true)),
+
// 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
@@ -470,16 +470,24 @@ 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,
+ # Turn off search suggestions in the location bar so as not to trigger network
+ # connections.
+ "browser.urlbar.suggest.searches": False,
+
+ # Turn off the location bar search suggestions opt-in. It interferes with
+ # tests that don't expect it to be there.
+ "browser.urlbar.userMadeSearchSuggestionsChoice": True,
+
# 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
@@ -157,16 +157,24 @@ 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],
+ // Turn off search suggestions in the location bar so as not to trigger
+ // network connections.
+ ["browser.urlbar.suggest.searches", false],
+
+ // Turn off the location bar search suggestions opt-in. It interferes with
+ // tests that don't expect it to be there.
+ ["browser.urlbar.userMadeSearchSuggestionsChoice", true],
+
// Do not show datareporting policy notifications which can
// interfere with tests
[
"datareporting.healthreport.about.reportUrl",
"http://%(server)s/dummy/abouthealthreport/",
],
[
"datareporting.healthreport.documentServerURI",