Bug 1369708 - Avoid setting of default preferences by mozrunner. r=ato
authorHenrik Skupin <mail@hskupin.info>
Fri, 02 Jun 2017 14:40:29 +0200
changeset 412967 4eff5f82fe40e01b28772ddddc72e9191a481c17
parent 412966 cc0069335c6d0eccda9501ff9a5cf94eb1b5d587
child 412968 278354d1b831c0f3c89e46f7638f95fbb868a240
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1369708
milestone55.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 1369708 - Avoid setting of default preferences by mozrunner. r=ato Update dependencies for mozrunner (0.4) and mozprofile (0.3) to stop setting default preferences by mozrunner. This will also allow to overwrite all preferences now via the moz:firefoxOptions capability. MozReview-Commit-ID: IU0oKzRnnfG
testing/geckodriver/Cargo.lock
testing/geckodriver/Cargo.toml
third_party/rust/mozprofile/.cargo-checksum.json
third_party/rust/mozprofile/Cargo.toml
third_party/rust/mozprofile/src/lib.rs
third_party/rust/mozprofile/src/prefdata.rs
third_party/rust/mozrunner/.cargo-checksum.json
third_party/rust/mozrunner/Cargo.toml
third_party/rust/mozrunner/src/runner.rs
--- a/testing/geckodriver/Cargo.lock
+++ b/testing/geckodriver/Cargo.lock
@@ -2,18 +2,18 @@
 name = "geckodriver"
 version = "0.16.1"
 dependencies = [
  "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.24.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.10.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozrunner 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozrunner 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozversion 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog-atomic 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog-stdlog 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog-stream 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -283,30 +283,29 @@ version = "0.1.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mozprofile"
-version = "0.2.1"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mozrunner"
-version = "0.3.4"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "winreg 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mozversion"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -713,18 +712,18 @@ dependencies = [
 "checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417"
 "checksum lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"
 "checksum libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "684f330624d8c3784fb9558ca46c4ce488073a8d22450415c5eb4f4cfb0d11b5"
 "checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
 "checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
 "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
 "checksum mime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8"
 "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726"
-"checksum mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4981de229fba7d949465a2f564e2b46906c6e876516040416956a54021a84165"
-"checksum mozrunner 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "91c54a746e7430326d2bc48a5b10ba7e9cd2294306773cb9f232835abe791f02"
+"checksum mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a17b8bbde1dc0fbf1c8b073192d7c6f89baa932173ece7c1447de5e9cc7cd7e"
+"checksum mozrunner 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a568168329fc285ad6d04dfbe058ea20ff842f4301fe9205c6cbd4ed3be85378"
 "checksum mozversion 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9fb3a40135553611560d3eb4a49479beaf0c91c5a93f723338c5b0edddf08f26"
 "checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958"
 "checksum num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40"
 "checksum num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5"
 "checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
 "checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
 "checksum num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"
 "checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
--- a/testing/geckodriver/Cargo.toml
+++ b/testing/geckodriver/Cargo.toml
@@ -12,18 +12,18 @@ readme = "README.md"
 license = "MPL-2.0"
 
 [dependencies]
 chrono = "^0.2"
 clap = {version = "^2.19", default-features = false, features = ["suggestions", "wrap_help"]}
 hyper = "0.10"
 lazy_static = "0.1"
 log = "0.3"
-mozprofile = "0.2"
-mozrunner = "0.3"
+mozprofile = "0.3"
+mozrunner = "0.4"
 mozversion = "0.1"
 regex = "0.2"
 rustc-serialize = "0.3"
 slog = "1"
 slog-atomic = "0.4"
 slog-stdlog = "1"
 slog-stream = "1"
 uuid = "0.1.18"
--- a/third_party/rust/mozprofile/.cargo-checksum.json
+++ b/third_party/rust/mozprofile/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"1e814cdffc5c7c21f30adb6baab40494c1697821baa95b6f15b14b81731fe689","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/lib.rs":"8d7d5bd14f58269edc5cb56d0218c854a3efa6a7155ffa14bd3e5486c355977b","src/prefdata.rs":"f3157c44e3d395331dd9ac8f2a065fe0512b4090804b14d044b70ae2f688fcdf","src/preferences.rs":"96e6fd609c48f3dcf1c945c7c095d5f33a13fc39f0d7c56a30924a59bd8f54f6","src/prefreader.rs":"84e357411164ebd8b11ab95962a1a5474bc7e79b8f1461f674a2b19868c39ddd","src/profile.rs":"0686a64b55afa928477a72ff1135939e68903305e26f47ddfb65e62409b2ea12"},"package":"4981de229fba7d949465a2f564e2b46906c6e876516040416956a54021a84165"}
\ No newline at end of file
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"9efdea9a6a5a92ba613ed754bbd4c7c1737e02f6eb1eee55b1e2a42c07265c18","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/lib.rs":"737568246693facce8c453a250b2bd93863364344bc155a7cea858ee5de5958a","src/preferences.rs":"96e6fd609c48f3dcf1c945c7c095d5f33a13fc39f0d7c56a30924a59bd8f54f6","src/prefreader.rs":"84e357411164ebd8b11ab95962a1a5474bc7e79b8f1461f674a2b19868c39ddd","src/profile.rs":"0686a64b55afa928477a72ff1135939e68903305e26f47ddfb65e62409b2ea12"},"package":"1a17b8bbde1dc0fbf1c8b073192d7c6f89baa932173ece7c1447de5e9cc7cd7e"}
\ No newline at end of file
--- a/third_party/rust/mozprofile/Cargo.toml
+++ b/third_party/rust/mozprofile/Cargo.toml
@@ -1,11 +1,10 @@
 [package]
 name = "mozprofile"
-version = "0.2.1"
+version = "0.3.0"
 authors = ["Mozilla Tools and Automation <auto-tools@mozilla.com>"]
 description = "Library for working with Mozilla profiles."
 repository = "https://github.com/jgraham/rust_mozprofile"
 license = "MPL-2.0"
 
 [dependencies]
 tempdir = "0.3.4"
-lazy_static = "0.1"
--- a/third_party/rust/mozprofile/src/lib.rs
+++ b/third_party/rust/mozprofile/src/lib.rs
@@ -1,17 +1,14 @@
-#[macro_use]
-extern crate lazy_static;
-
 extern crate tempdir;
 
 pub mod profile;
 pub mod preferences;
 pub mod prefreader;
-pub mod prefdata;
+
 
 #[cfg(test)]
 mod test {
 //    use std::fs::File;
 //    use profile::Profile;
     use prefreader::{parse, tokenize, serialize};
     use prefreader::{PrefToken, Position};
     use preferences::Pref;
deleted file mode 100644
--- a/third_party/rust/mozprofile/src/prefdata.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-#![allow(dead_code)]
-use preferences::Pref;
-
-lazy_static! {
-    pub static ref FIREFOX_PREFERENCES: [(&'static str, Pref); 17] = [
-        // Don't automatically update the application
-        ("app.update.enabled", Pref::new(false)),
-        // Don't restore the last open set of tabs if the browser has crashed
-        ("browser.sessionstore.resume_from_crash", Pref::new(false)),
-        // Don't check for the default web browser during startup
-        ("browser.shell.checkDefaultBrowser", Pref::new(false)),
-        // Don't warn on exit when multiple tabs are open
-        ("browser.tabs.warnOnClose", Pref::new(false)),
-        // Don't warn when exiting the browser
-        ("browser.warnOnQuit", Pref::new(false)),
-        // Don't send Firefox health reports to the production server
-        //"datareporting.healthreport.documentServerURI", "http://%(server)s/healthreport/",
-        // Only install add-ons from the profile and the application scope
-        // Also ensure that those are not getting disabled.
-        // see: https://developer.mozilla.org/en/Installing_extensions
-        ("extensions.enabledScopes", Pref::new(5)),
-        ("extensions.autoDisableScopes", Pref::new(10)),
-        // Don't send the list of installed addons to AMO
-        ("extensions.getAddons.cache.enabled", Pref::new(false)),
-        // Don't install distribution add-ons from the app folder
-        ("extensions.installDistroAddons", Pref::new(false)),
-        // Dont' run the add-on compatibility check during start-up
-        ("extensions.showMismatchUI", Pref::new(false)),
-        // Don't automatically update add-ons
-        ("extensions.update.enabled", Pref::new(false)),
-        // Don't open a dialog to show available add-on updates
-        ("extensions.update.notifyUser", Pref::new(false)),
-        // Enable test mode to run multiple tests in parallel
-        ("focusmanager.testmode", Pref::new(true)),
-        // Enable test mode to not raise an OS level dialog for location sharing
-        ("geo.provider.testing", Pref::new(true)),
-        // Suppress delay for main action in popup notifications
-        ("security.notification_enable_delay", Pref::new(0)),
-        // Suppress automatic safe mode after crashes
-        ("toolkit.startup.max_resumed_crashes", Pref::new(-1)),
-        // Don't report telemetry information
-        ("toolkit.telemetry.enabled", Pref::new(false)),
-    ];
-}
--- a/third_party/rust/mozrunner/.cargo-checksum.json
+++ b/third_party/rust/mozrunner/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"61ed94f83de70e690fd840ac055f3c7307bd92a14efc33f1f8297e89c52e83bc","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/bin/firefox-default-path.rs":"21f1aa96a4ffb368a4266e294bc4b1b17ff8229f2418af6679783f6d9c0280df","src/lib.rs":"3ed528f2069e810adb6f2ea0b248c4542de95f1cc305154f440877d4ee6d550c","src/runner.rs":"a54c399eb67136d437f0a51795de5d2c510b3feb44ff56f059e1d411e583a7ee"},"package":"91c54a746e7430326d2bc48a5b10ba7e9cd2294306773cb9f232835abe791f02"}
\ No newline at end of file
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"25af4086ef96f79688c6888d88df053fc04d0ff8e3c4353a6aea91605afc58ef","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/bin/firefox-default-path.rs":"21f1aa96a4ffb368a4266e294bc4b1b17ff8229f2418af6679783f6d9c0280df","src/lib.rs":"3ed528f2069e810adb6f2ea0b248c4542de95f1cc305154f440877d4ee6d550c","src/runner.rs":"ed095febfb54c87648fecb4818e7726702f6e46053119ffd9316c664b7e93b3e"},"package":"a568168329fc285ad6d04dfbe058ea20ff842f4301fe9205c6cbd4ed3be85378"}
\ No newline at end of file
--- a/third_party/rust/mozrunner/Cargo.toml
+++ b/third_party/rust/mozrunner/Cargo.toml
@@ -1,17 +1,17 @@
 [package]
 name = "mozrunner"
-version = "0.3.4"
+version = "0.4.0"
 authors = ["Mozilla Tools and Automation <auto-tools@mozilla.com>"]
 description = "Library for starting Firefox binaries."
 repository = "https://github.com/jgraham/rust_mozrunner"
 license = "MPL-2.0"
 
 [dependencies]
 log = "0.3"
-mozprofile = "0.2"
+mozprofile = "0.3"
 
 [target.'cfg(target_os = "windows")'.dependencies]
 winreg = "0.3.5"
 
 [[bin]]
 name = "firefox-default-path"
\ No newline at end of file
--- a/third_party/rust/mozrunner/src/runner.rs
+++ b/third_party/rust/mozrunner/src/runner.rs
@@ -1,9 +1,8 @@
-use mozprofile::prefdata::FIREFOX_PREFERENCES;
 use mozprofile::prefreader::PrefReaderError;
 use mozprofile::profile::Profile;
 use std::convert::From;
 use std::env;
 use std::error::Error;
 use std::fmt;
 use std::io::{Result as IoResult, Error as IoError, ErrorKind};
 use std::path::{Path, PathBuf};
@@ -92,19 +91,17 @@ impl FirefoxRunner {
     }
 }
 
 impl Runner for FirefoxRunner {
     fn start(&mut self) -> Result<(), RunnerError> {
         let mut cmd = Command::new(&self.binary);
         self.build_command(&mut cmd);
 
-        let mut prefs = try!(self.profile.user_prefs());
-        prefs.insert_slice(&FIREFOX_PREFERENCES[..]);
-
+        let prefs = try!(self.profile.user_prefs());
         try!(prefs.write());
 
         let process = try!(cmd.spawn());
         self.process = Some(process);
         Ok(())
     }
 
     fn args(&mut self) -> &mut Vec<String> {