diff options
author | Andreas Tolfsen <ato@sny.no> | 2018-06-15 23:42:41 +0300 |
---|---|---|
committer | Andreas Tolfsen <ato@sny.no> | 2018-06-15 23:42:41 +0300 |
commit | ef8ff936221d4599f94c687a7ca0c6810279b39e (patch) | |
tree | 9f79d1ae8dc882431a5b178e4e7e0ea602c273f4 | |
parent | 5a056ef29d802a0bcbdd2f5868b45663ec9d765e (diff) |
import of 0.21.0
-rw-r--r-- | .hgignore | 1 | ||||
-rw-r--r-- | CHANGES.md | 71 | ||||
-rw-r--r-- | Cargo.lock | 713 | ||||
-rw-r--r-- | Cargo.toml | 12 | ||||
-rw-r--r-- | README.md | 59 | ||||
-rw-r--r-- | doc/CrashReports.md | 71 | ||||
-rw-r--r-- | doc/index.rst | 1 | ||||
-rw-r--r-- | moz.build | 2 | ||||
-rw-r--r-- | src/marionette.rs | 335 | ||||
-rw-r--r-- | src/prefs.rs | 113 |
10 files changed, 372 insertions, 1006 deletions
diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 2f7896d..0000000 --- a/.hgignore +++ /dev/null @@ -1 +0,0 @@ -target/ @@ -3,6 +3,77 @@ Change log All notable changes to this program is documented in this file. + +0.21.0 (2018-06-15) +------------------- + +Note that with this release of geckodriver the minimum recommended +Firefox and Selenium versions have changed: + + - Firefox 57 (and greater) + - Selenium 3.11 (and greater) + +### Added + +- Support for the chrome element identifier from Firefox. + +- The `unhandledPromptBehavior` capability now accepts `accept and + notify`, `dismiss and notify`, and `ignore` options. + + Note that the unhandled prompt handler is not fully supported in + Firefox at the time of writing. + +### Changed + +- Firefox will now be started with the `-foreground` and `-no-remote` + flags if they have not already been specified by the user in + `moz:firefoxOptions`. + + `-foreground` will ensure the application window gets focus when + Firefox is started, and `-no-remote` will prevent remote commands + to this instance of Firefox and also ensure we always start a new + instance. + +- WebDriver commands that do not have a return value now correctly + return `{value: null}` instead of an empty dictionary. + +- The HTTP server now accepts `Keep-Alive` connections. + +- Firefox remote protocol command mappings updated. + + All Marionette commands changed to make use of the `WebDriver:` + prefixes introduced with Firefox 56. + +- Overhaul of Firefox preferences. + + Already deprecated preferences in Firefox versions earlier than + 57 got removed. + +- [webdriver crate] upgraded to 0.36.0. + +### Fixed + +- Force use of IPv4 network stack. + + On certain system configurations, where `localhost` resolves to + an IPv6 address, geckodriver would attempt to connect to Firefox + on the wrong IP stack, causing the connection attempt to time out + after 60 seconds. We now ensure that geckodriver uses IPv4 + consistently to both connect to Firefox and for allocating a free + port. + +- geckodriver failed to locate the correct Firefox binary if it was + found under a _firefox_ or _firefox-bin_ directory, depending on + the system, because it thought the parent directory was the + executable. + +- On Unix systems (macOS, Linux), geckodriver falsely reported + non-executable files as valid binaries. + +- When stdout and stderr is redirected by geckodriver, a bug prevented + the redirections from taking effect. + + 0.20.1 (2018-04-06) ------------------- diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index a4c19ce..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,713 +0,0 @@ -[[package]] -name = "adler32" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "aho-corasick" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "build_const" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bzip2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cc" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "chrono" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clap" -version = "2.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crc" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "flate2" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "geckodriver" -version = "0.20.1" -dependencies = [ - "chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mozrunner 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mozversion 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "webdriver 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zip 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.10.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "log" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "matches" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz_oxide" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz_oxide_c_api" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mozprofile" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mozrunner" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.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.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mozversion" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-ini 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "msdos_time" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num_cpus" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "podio" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rust-ini" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "safemem" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "semver" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "strsim" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "term_size" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ucd-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-segmentation" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "url" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "uuid" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "version_check" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "webdriver" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winreg" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "zip" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45" -"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" -"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" -"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" -"checksum build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9" -"checksum byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "73b5bdfe7ee3ad0b99c9801d58807a9dbc9e09196365b0203853b99889ab3c87" -"checksum bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3eafc42c44e0d827de6b1c131175098fe7fb53b8ce8a47e65cb3ea94688be24" -"checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" -"checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00" -"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" -"checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb" -"checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7" -"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" -"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" -"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" -"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" -"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -"checksum miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aaa2d3ad070f428fffbd7d3ca2ea20bb0d8cffe9024405c44e1840bc1418b398" -"checksum miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "92d98fdbd6145645828069b37ea92ca3de225e000d80702da25c20d3584b38a5" -"checksum mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a17b8bbde1dc0fbf1c8b073192d7c6f89baa932173ece7c1447de5e9cc7cd7e" -"checksum mozrunner 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dad7393575ae9a3e559f843fc37d0e579620573d49e8024fd1a873e79e8e36d8" -"checksum mozversion 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "597412c9031cfa14e823ace4aa80d0cc19596f2a65d5de960fdeb00ebe285861" -"checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" -"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" -"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" -"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" -"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" -"checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" -"checksum regex-syntax 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b2550876c31dc914696a6c2e01cbce8afba79a93c8ae979d2fe051c0230b3756" -"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -"checksum rust-ini 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a654c5bda722c699be6b0fe4c0d90de218928da5b724c3e467fc48865c37263" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327" -"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" -"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" -"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" -"checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f" -"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum webdriver 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed276b0ce328478121cac7d113901f3d8e3c9f854d3c9ba493b2f6ee211f619e" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9338067aba07889a38beaad4dbb77fa2e62e87c423b770824b3bdf412874bd2c" -"checksum zip 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "10931e278527cea65682696481e6d840371d581079df529ebfee186e0eaad719" @@ -1,6 +1,6 @@ [package] name = "geckodriver" -version = "0.20.1" +version = "0.21.0" description = "Proxy for using WebDriver clients to interact with Gecko-based browsers." keywords = ["webdriver", "w3c", "httpd", "mozilla", "firefox"] repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver" @@ -14,13 +14,13 @@ clap = { version = "^2.19", default-features = false, features = ["suggestions", hyper = "0.10" lazy_static = "1.0" log = { version = "0.4", features = ["std"] } -mozprofile = "0.3.0" -mozrunner = "0.6.1" -mozversion = "0.1.3" -regex = "0.2" +mozprofile = { path = "../mozbase/rust/mozprofile" } +mozrunner = { path = "../mozbase/rust/mozrunner" } +mozversion = { path = "../mozbase/rust/mozversion" } +regex = "1.0" rustc-serialize = "0.3" uuid = "0.1.18" -webdriver = "0.35.0" +webdriver = { path = "../webdriver" } zip = "0.3" [[bin]] @@ -33,33 +33,34 @@ the [Testing :: GeckoDriver] component. Supported clients ================= -[Selenium] users must update to [version 3.5] or later to +[Selenium] users must update to [version 3.11] or later to use geckodriver. Other clients that follow the [W3C WebDriver specification] are also supported. -[version 3.5]: https://github.com/SeleniumHQ/selenium/releases/tag/selenium-3.5.0 +[version 3.11]: https://github.com/SeleniumHQ/selenium/releases/tag/selenium-3.11.0 [W3C WebDriver specification]: https://w3c.github.io/webdriver/webdriver-spec.html Supported Firefoxen =================== -geckodriver is not yet feature complete. This means that it does not -yet offer full conformance with the [WebDriver] standard or complete -compatibility with [Selenium]. You can track the [implementation -status] of the latest [Firefox Nightly](http://whattrainisitnow.com/) -on [MDN]. We also keep track of known [Selenium], [remote protocol], -and [specification] problems in our [issue tracker]. - -Support is best in Firefox 55 and greater, although generally the more -recent the Firefox version, the better the experience as they have more -bug fixes and features. Some features will only be available in the -most recent Firefox versions, and we strongly advise using the latest -[Firefox Nightly] with geckodriver. Since Windows XP support in Firefox -was dropped with Firefox 53, we do not support this platform. - -[implementation status]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver/status -[MDN]: https://developer.mozilla.org/ +geckodriver is not yet feature complete. This means that it does +not yet offer full conformance with the [WebDriver] standard or +complete compatibility with [Selenium]. You can track the +[implementation status] of the latest [Firefox Nightly] on MDN. We +also keep track of known [Selenium], [remote protocol], and +[specification] problems in our [issue tracker]. + +Support is best in Firefox 57 and greater, although generally the +more recent the Firefox version, the better the experience as they +have more bug fixes and features. Some features will only be +available in the most recent Firefox versions, and we strongly +advise using the latest [Firefox Nightly] with geckodriver. Since +Windows XP support in Firefox was dropped with Firefox 53, we do +not support this platform. + +[implementation status]: https://bugzilla.mozilla.org/showdependencytree.cgi?id=721859&hide_resolved=1 +[Firefox Nightly]: https://whattrainisitnow.com/ [selenium]: https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Aselenium [remote protocol]: https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Amarionette [specification]: https://github.com/mozilla/geckodriver/issues?q=is%3Aissue+is%3Aopen+label%3Aspec @@ -87,8 +88,8 @@ geckodriver supports a number of [capabilities]: <tr> <td><code>acceptInsecureCerts</code> <td>boolean - <td>Boolean initially set to false, - indicating the session will not implicitly trust untrusted + <td>false + <td>Indicates the session will not implicitly trust untrusted or self-signed TLS certificates on navigation. <td> </tr> @@ -96,6 +97,7 @@ geckodriver supports a number of [capabilities]: <tr> <td><code>pageLoadStrategy</code> <td>string + <td>`normal` <td>Defines the page load strategy to use for the duration of the session. Setting a page load strategy will cause navigation @@ -203,8 +205,9 @@ Firefox capabilities geckodriver has a few capabilities that are specific to Firefox. -moz:firefoxOptions ------------------- + +`moz:firefoxOptions` +-------------------- A dictionary used to define options which control how Firefox gets started and run. It may contain any of the following fields: @@ -281,8 +284,9 @@ and run. It may contain any of the following fields: </tr> </table> -moz:useNonSpecCompliantPointerOrigin ------------------------------------- + +`moz:useNonSpecCompliantPointerOrigin` +-------------------------------------- A boolean value to indicate how the pointer origin for an action command will be calculated. @@ -298,8 +302,9 @@ for this capability. Please note that this capability exists only temporarily, and that it will be removed once all Selenium bindings can handle the new behavior. -moz:webdriverClick ------------------- + +`moz:webdriverClick` +-------------------- A boolean value to indicate which kind of interactability checks to run when performing a click or sending keys to an elements. For Firefoxen prior to @@ -322,6 +327,7 @@ for this capability. Please note that this capability exists only temporarily, and that it will be removed once the interactability checks have been stabilized. + `log` object ------------ @@ -343,6 +349,7 @@ removed once the interactability checks have been stabilized. <code>info</code>, <code>warn</code>, <code>error</code>, and <code>fatal</code>. If left undefined the default is <code>info</code>. + The value is treated case-insensitively. </tr> </table> diff --git a/doc/CrashReports.md b/doc/CrashReports.md new file mode 100644 index 0000000..98820ca --- /dev/null +++ b/doc/CrashReports.md @@ -0,0 +1,71 @@ +Analyzing crash data of Firefox +=============================== + +It's not uncommon that under some special platform configurations and while +running automated tests via Selenium and geckodriver Firefox could crash. In +those cases it is very helpful to retrieve the generated crash data aka +minidump files, and report these to us. + +Retrieve the crash data +----------------------- + +Because geckodriver creates a temporary user profile for Firefox, it also +automatically removes all its folders once the tests have been finished. That +also means that if Firefox crashed the created minidump files are lost. To +prevent that a custom profile has to be used instead. The following code +shows an example by using the Python Selenium bindings on Mac OS: + + import tempfile + + from selenium import webdriver + from selenium.webdriver.firefox.options import Options + + # Custom profile folder to keep the minidump files + profile = tempfile.mkdtemp(".selenium") + print("*** Using profile: {}".format(profile)) + + # Use the above folder as custom profile + opts = Options() + opts.add_argument("-profile") + opts.add_argument(profile) + opts.binary = "/Applications/Firefox.app/Contents/MacOS/firefox" + + driver = webdriver.Firefox(options=opts, + # hard-code the Marionette port so geckodriver can connect + service_args=["--marionette-port", "2828"]) + + # Your test code which crashes Firefox + +Executing the test with Selenium now, which triggers the crash of Firefox +will leave all the files from the user profile around in the above path. + +To retrieve the minidump files navigate to that folder and look for a sub +folder with the name `minidumps`. It should contain at least one series of +files. One file with the `.dmp` extension and another one with `.extra`. +Both of those files are needed. If more crash files are present grab them all. + +Attach the files as best archived as zip file to the created [geckodriver issue] +on Github. + +[geckodriver issue]: https://github.com/mozilla/geckodriver/issues/new + + +Getting details of the crash +---------------------------- + +More advanced users can upload the generated minidump files themselves and +receive details information about the crash. Therefore find the [crash reporter] +folder and copy all the generated minidump files into the `pending` sub directory. +Make sure that both the `.dmp` and `.extra` files are present. + +Once done you can also [view the crash reports]. + +If you submitted a crash please do not forget to also add the link of the +crash report to the geckodriver issue. + +[crash reporter]: https://support.mozilla.org/kb/mozillacrashreporter#w_viewing-reports-outside-of-firefox +[view crash reports]: https://support.mozilla.orgkb/mozillacrashreporter#w_viewing-crash-reports + + + + diff --git a/doc/index.rst b/doc/index.rst index 42b0730..8cc7871 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,6 +17,7 @@ For users :maxdepth: 1 TraceLogs.md + CrashReports.md For developers @@ -6,7 +6,7 @@ RUST_PROGRAMS += ["geckodriver"] # https://bugzil.la/1425365 if CONFIG["OS_ARCH"] != "WINNT": - RustTest("geckodriver") + RUST_TESTS = ["geckodriver"] with Files("**"): BUG_COMPONENT = ("Testing", "Marionette") diff --git a/src/marionette.rs b/src/marionette.rs index 600a65f..f19c564 100644 --- a/src/marionette.rs +++ b/src/marionette.rs @@ -54,7 +54,12 @@ use capabilities::{FirefoxCapabilities, FirefoxOptions}; use logging; use prefs; -const DEFAULT_HOST: &'static str = "localhost"; +// localhost may be routed to the IPv6 stack on certain systems, +// and nsIServerSocket in Marionette only supports IPv4 +const DEFAULT_HOST: &'static str = "127.0.0.1"; + +const CHROME_ELEMENT_KEY: &'static str = "chromeelement-9fc5-4b51-a3c8-01716eedeb04"; +const LEGACY_ELEMENT_KEY: &'static str = "ELEMENT"; pub fn extension_routes() -> Vec<(Method, &'static str, GeckoExtensionRoute)> { return vec![(Method::Get, "/session/{sessionId}/moz/context", GeckoExtensionRoute::GetContext), @@ -419,7 +424,7 @@ impl MarionetteHandler { logging::set_max_level(l); } - let port = self.settings.port.unwrap_or(try!(get_free_port())); + let port = self.settings.port.unwrap_or(get_free_port()?); if !self.settings.connect_existing { try!(self.start_browser(port, options)); } @@ -601,7 +606,7 @@ impl WebDriverHandler<GeckoExtensionRoute> for MarionetteHandler { // TODO(https://bugzil.la/1443922): // Use toolkit.asyncshutdown.crash_timout pref match runner.wait(time::Duration::from_secs(70)) { - Ok(x) => debug!("Browser process stopped with exit status {}", x), + Ok(x) => debug!("Browser process stopped: {}", x), Err(e) => error!("Failed to stop browser process: {}", e), } } @@ -647,25 +652,26 @@ impl MarionetteSession { } fn to_web_element(&self, json_data: &Json) -> WebDriverResult<WebElement> { - let data = try_opt!(json_data.as_object(), - ErrorStatus::UnknownError, - "Failed to convert data to an object"); + let data = try_opt!( + json_data.as_object(), + ErrorStatus::UnknownError, + "Failed to convert data to an object" + ); + + let web_element = data.get(ELEMENT_KEY); + let chrome_element = data.get(CHROME_ELEMENT_KEY); + let legacy_element = data.get(LEGACY_ELEMENT_KEY); + + let value = try_opt!( + web_element.or(chrome_element).or(legacy_element), + ErrorStatus::UnknownError, + "Failed to extract web element from Marionette response" + ); let id = try_opt!( - try_opt!( - match data.get("ELEMENT") { - Some(id) => Some(id), - None => { - match data.get(ELEMENT_KEY) { - Some(id) => Some(id), - None => None - } - } - }, - ErrorStatus::UnknownError, - "Failed to extract Web Element from response").as_string(), + value.as_string(), ErrorStatus::UnknownError, - "Failed to convert id value to string" - ).to_string(); + "Failed to convert web element reference value to string" + ).to_string(); Ok(WebElement::new(id)) } @@ -1008,165 +1014,179 @@ impl MarionetteCommand { msg: &WebDriverMessage<GeckoExtensionRoute>) -> WebDriverResult<MarionetteCommand> { let (opt_name, opt_parameters) = match msg.command { - NewSession(_) => { - let caps = capabilities.expect("Tried to create new session without processing capabilities"); - + Status => panic!("Got status command that should already have been handled"), + AcceptAlert => { + // Needs to be updated to "WebDriver:AcceptAlert" for Firefox 63 + (Some("WebDriver:AcceptDialog"), None) + } + AddCookie(ref x) => (Some("WebDriver:AddCookie"), Some(x.to_marionette())), + CloseWindow => (Some("WebDriver:CloseWindow"), None), + DeleteCookie(ref x) => { let mut data = BTreeMap::new(); - for (k, v) in caps.iter() { - data.insert(k.to_string(), v.to_json()); - } - - // duplicate in capabilities.desiredCapabilities for legacy compat - let mut legacy_caps = BTreeMap::new(); - legacy_caps.insert("desiredCapabilities".to_string(), caps.to_json()); - data.insert("capabilities".to_string(), legacy_caps.to_json()); - - (Some("newSession"), Some(Ok(data))) - }, + data.insert("name".to_string(), x.to_json()); + (Some("WebDriver:DeleteCookie"), Some(Ok(data))) + } + DeleteCookies => (Some("WebDriver:DeleteAllCookies"), None), DeleteSession => { let mut body = BTreeMap::new(); body.insert("flags".to_owned(), vec!["eForceQuit".to_json()].to_json()); - (Some("quit"), Some(Ok(body))) - }, - Status => panic!("Got status command that should already have been handled"), - Get(ref x) => (Some("get"), Some(x.to_marionette())), - GetCurrentUrl => (Some("getCurrentUrl"), None), - GoBack => (Some("goBack"), None), - GoForward => (Some("goForward"), None), - Refresh => (Some("refresh"), None), - GetTitle => (Some("getTitle"), None), - GetPageSource => (Some("getPageSource"), None), - GetWindowHandle => (Some("getWindowHandle"), None), - GetWindowHandles => (Some("getWindowHandles"), None), - CloseWindow => (Some("close"), None), - GetTimeouts => (Some("getTimeouts"), None), - SetTimeouts(ref x) => (Some("setTimeouts"), Some(x.to_marionette())), - SetWindowRect(ref x) => (Some("setWindowRect"), Some(x.to_marionette())), - GetWindowRect => (Some("getWindowRect"), None), - MinimizeWindow => (Some("WebDriver:MinimizeWindow"), None), - MaximizeWindow => (Some("maximizeWindow"), None), - FullscreenWindow => (Some("fullscreen"), None), - SwitchToWindow(ref x) => (Some("switchToWindow"), Some(x.to_marionette())), - SwitchToFrame(ref x) => (Some("switchToFrame"), Some(x.to_marionette())), - SwitchToParentFrame => (Some("switchToParentFrame"), None), - FindElement(ref x) => (Some("findElement"), Some(x.to_marionette())), - FindElements(ref x) => (Some("findElements"), Some(x.to_marionette())), + (Some("Marionette:Quit"), Some(Ok(body))) + } + DismissAlert => (Some("WebDriver:DismissAlert"), None), + ElementClear(ref x) => (Some("WebDriver:ElementClear"), Some(x.to_marionette())), + ElementClick(ref x) => (Some("WebDriver:ElementClick"), Some(x.to_marionette())), + ElementSendKeys(ref e, ref x) => { + let mut data = BTreeMap::new(); + data.insert("id".to_string(), e.id.to_json()); + data.insert("text".to_string(), x.text.to_json()); + data.insert( + "value".to_string(), + x.text + .chars() + .map(|x| x.to_string()) + .collect::<Vec<String>>() + .to_json(), + ); + (Some("WebDriver:ElementSendKeys"), Some(Ok(data))) + } + ElementTap(ref x) => (Some("singleTap"), Some(x.to_marionette())), + ExecuteAsyncScript(ref x) => ( + Some("WebDriver:ExecuteAsyncScript"), + Some(x.to_marionette()), + ), + ExecuteScript(ref x) => (Some("WebDriver:ExecuteScript"), Some(x.to_marionette())), + FindElement(ref x) => (Some("WebDriver:FindElement"), Some(x.to_marionette())), FindElementElement(ref e, ref x) => { let mut data = try!(x.to_marionette()); data.insert("element".to_string(), e.id.to_json()); - (Some("findElement"), Some(Ok(data))) - }, + (Some("WebDriver:FindElement"), Some(Ok(data))) + } + FindElements(ref x) => (Some("WebDriver:FindElements"), Some(x.to_marionette())), FindElementElements(ref e, ref x) => { let mut data = try!(x.to_marionette()); data.insert("element".to_string(), e.id.to_json()); - (Some("findElements"), Some(Ok(data))) - }, - GetActiveElement => (Some("getActiveElement"), None), - IsDisplayed(ref x) => (Some("isElementDisplayed"), Some(x.to_marionette())), - IsSelected(ref x) => (Some("isElementSelected"), Some(x.to_marionette())), + (Some("WebDriver:FindElements"), Some(Ok(data))) + } + FullscreenWindow => (Some("WebDriver:FullscreenWindow"), None), + Get(ref x) => (Some("WebDriver:Navigate"), Some(x.to_marionette())), + GetAlertText => (Some("WebDriver:GetAlertText"), None), + GetActiveElement => (Some("WebDriver:GetActiveElement"), None), + GetCookies | GetNamedCookie(_) => (Some("WebDriver:GetCookies"), None), + GetCurrentUrl => (Some("WebDriver:GetCurrentURL"), None), + GetCSSValue(ref e, ref x) => { + let mut data = BTreeMap::new(); + data.insert("id".to_string(), e.id.to_json()); + data.insert("propertyName".to_string(), x.to_json()); + (Some("WebDriver:GetElementCSSValue"), Some(Ok(data))) + } GetElementAttribute(ref e, ref x) => { let mut data = BTreeMap::new(); data.insert("id".to_string(), e.id.to_json()); data.insert("name".to_string(), x.to_json()); - (Some("getElementAttribute"), Some(Ok(data))) - }, + (Some("WebDriver:GetElementAttribute"), Some(Ok(data))) + } GetElementProperty(ref e, ref x) => { let mut data = BTreeMap::new(); data.insert("id".to_string(), e.id.to_json()); data.insert("name".to_string(), x.to_json()); - (Some("getElementProperty"), Some(Ok(data))) - }, - GetCSSValue(ref e, ref x) => { - let mut data = BTreeMap::new(); - data.insert("id".to_string(), e.id.to_json()); - data.insert("propertyName".to_string(), x.to_json()); - (Some("getElementValueOfCssProperty"), Some(Ok(data))) - }, - GetElementText(ref x) => (Some("getElementText"), Some(x.to_marionette())), - GetElementTagName(ref x) => (Some("getElementTagName"), Some(x.to_marionette())), - GetElementRect(ref x) => (Some("getElementRect"), Some(x.to_marionette())), - IsEnabled(ref x) => (Some("isElementEnabled"), Some(x.to_marionette())), - PerformActions(ref x) => (Some("performActions"), Some(x.to_marionette())), - ReleaseActions => (Some("releaseActions"), None), - ElementClick(ref x) => (Some("clickElement"), Some(x.to_marionette())), - ElementTap(ref x) => (Some("singleTap"), Some(x.to_marionette())), - ElementClear(ref x) => (Some("clearElement"), Some(x.to_marionette())), - ElementSendKeys(ref e, ref x) => { - let mut data = BTreeMap::new(); - data.insert("id".to_string(), e.id.to_json()); - data.insert("text".to_string(), x.text.to_json()); - data.insert("value".to_string(), - x.text - .chars() - .map(|x| x.to_string()) - .collect::<Vec<String>>() - .to_json()); - (Some("sendKeysToElement"), Some(Ok(data))) - }, - ExecuteScript(ref x) => (Some("executeScript"), Some(x.to_marionette())), - ExecuteAsyncScript(ref x) => (Some("executeAsyncScript"), Some(x.to_marionette())), - GetCookies | GetNamedCookie(_) => (Some("getCookies"), None), - DeleteCookies => (Some("deleteAllCookies"), None), - DeleteCookie(ref x) => { + (Some("WebDriver:GetElementProperty"), Some(Ok(data))) + } + GetElementRect(ref x) => (Some("WebDriver:GetElementRect"), Some(x.to_marionette())), + GetElementTagName(ref x) => { + (Some("WebDriver:GetElementTagName"), Some(x.to_marionette())) + } + GetElementText(ref x) => (Some("WebDriver:GetElementText"), Some(x.to_marionette())), + GetPageSource => (Some("WebDriver:GetPageSource"), None), + GetTimeouts => (Some("WebDriver:GetTimeouts"), None), + GetTitle => (Some("WebDriver:GetTitle"), None), + GetWindowHandle => (Some("WebDriver:GetWindowHandle"), None), + GetWindowHandles => (Some("WebDriver:GetWindowHandles"), None), + GetWindowRect => (Some("WebDriver:GetWindowRect"), None), + GoBack => (Some("WebDriver:Back"), None), + GoForward => (Some("WebDriver:Forward"), None), + IsDisplayed(ref x) => ( + Some("WebDriver:IsElementDisplayed"), + Some(x.to_marionette()), + ), + IsEnabled(ref x) => (Some("WebDriver:IsElementEnabled"), Some(x.to_marionette())), + IsSelected(ref x) => (Some("WebDriver:IsElementSelected"), Some(x.to_marionette())), + MaximizeWindow => (Some("WebDriver:MaximizeWindow"), None), + MinimizeWindow => (Some("WebDriver:MinimizeWindow"), None), + NewSession(_) => { + let caps = capabilities + .expect("Tried to create new session without processing capabilities"); + let mut data = BTreeMap::new(); - data.insert("name".to_string(), x.to_json()); - (Some("deleteCookie"), Some(Ok(data))) - }, - AddCookie(ref x) => (Some("addCookie"), Some(x.to_marionette())), - DismissAlert => (Some("dismissDialog"), None), - AcceptAlert => (Some("acceptDialog"), None), - GetAlertText => (Some("getTextFromDialog"), None), + for (k, v) in caps.iter() { + data.insert(k.to_string(), v.to_json()); + } + + // duplicate in capabilities.desiredCapabilities for legacy compat + let mut legacy_caps = BTreeMap::new(); + legacy_caps.insert("desiredCapabilities".to_string(), caps.to_json()); + data.insert("capabilities".to_string(), legacy_caps.to_json()); + + (Some("WebDriver:NewSession"), Some(Ok(data))) + } + PerformActions(ref x) => (Some("WebDriver:PerformActions"), Some(x.to_marionette())), + Refresh => (Some("WebDriver:Refresh"), None), + ReleaseActions => (Some("WebDriver:ReleaseActions"), None), SendAlertText(ref x) => { let mut data = BTreeMap::new(); data.insert("text".to_string(), x.text.to_json()); - data.insert("value".to_string(), - x.text - .chars() - .map(|x| x.to_string()) - .collect::<Vec<String>>() - .to_json()); - (Some("sendKeysToDialog"), Some(Ok(data))) - }, - TakeScreenshot => { + data.insert( + "value".to_string(), + x.text + .chars() + .map(|x| x.to_string()) + .collect::<Vec<String>>() + .to_json(), + ); + (Some("WebDriver:SendAlertText"), Some(Ok(data))) + } + SetTimeouts(ref x) => (Some("WebDriver:SetTimeouts"), Some(x.to_marionette())), + SetWindowRect(ref x) => (Some("WebDriver:SetWindowRect"), Some(x.to_marionette())), + SwitchToFrame(ref x) => (Some("WebDriver:SwitchToFrame"), Some(x.to_marionette())), + SwitchToParentFrame => (Some("WebDriver:SwitchToParentFrame"), None), + SwitchToWindow(ref x) => (Some("WebDriver:SwitchToWindow"), Some(x.to_marionette())), + TakeElementScreenshot(ref e) => { let mut data = BTreeMap::new(); - data.insert("id".to_string(), Json::Null); + data.insert("id".to_string(), e.id.to_json()); data.insert("highlights".to_string(), Json::Array(vec![])); data.insert("full".to_string(), Json::Boolean(false)); - (Some("takeScreenshot"), Some(Ok(data))) - }, - TakeElementScreenshot(ref e) => { + (Some("WebDriver:TakeScreenshot"), Some(Ok(data))) + } + TakeScreenshot => { let mut data = BTreeMap::new(); - data.insert("id".to_string(), e.id.to_json()); + data.insert("id".to_string(), Json::Null); data.insert("highlights".to_string(), Json::Array(vec![])); data.insert("full".to_string(), Json::Boolean(false)); - (Some("takeScreenshot"), Some(Ok(data))) - }, - Extension(ref extension) => { - match extension { - &GeckoExtensionCommand::GetContext => (Some("getContext"), None), - &GeckoExtensionCommand::SetContext(ref x) => { - (Some("setContext"), Some(x.to_marionette())) - }, - &GeckoExtensionCommand::XblAnonymousChildren(ref e) => { - let mut data = BTreeMap::new(); - data.insert("using".to_owned(), "anon".to_json()); - data.insert("value".to_owned(), Json::Null); - data.insert("element".to_string(), e.id.to_json()); - (Some("findElements"), Some(Ok(data))) - }, - &GeckoExtensionCommand::XblAnonymousByAttribute(ref e, ref x) => { - let mut data = try!(x.to_marionette()); - data.insert("element".to_string(), e.id.to_json()); - (Some("findElement"), Some(Ok(data))) - }, - &GeckoExtensionCommand::InstallAddon(ref x) => { - (Some("addon:install"), Some(x.to_marionette())) - }, - &GeckoExtensionCommand::UninstallAddon(ref x) => { - (Some("addon:uninstall"), Some(x.to_marionette())) - } - } + (Some("WebDriver:TakeScreenshot"), Some(Ok(data))) } + Extension(ref extension) => match extension { + &GeckoExtensionCommand::GetContext => (Some("Marionette:GetContext"), None), + &GeckoExtensionCommand::InstallAddon(ref x) => { + (Some("Addon:Install"), Some(x.to_marionette())) + } + &GeckoExtensionCommand::SetContext(ref x) => { + (Some("Marionette:SetContext"), Some(x.to_marionette())) + } + &GeckoExtensionCommand::UninstallAddon(ref x) => { + (Some("Addon:Uninstall"), Some(x.to_marionette())) + } + &GeckoExtensionCommand::XblAnonymousByAttribute(ref e, ref x) => { + let mut data = try!(x.to_marionette()); + data.insert("element".to_string(), e.id.to_json()); + (Some("WebDriver:FindElement"), Some(Ok(data))) + } + &GeckoExtensionCommand::XblAnonymousChildren(ref e) => { + let mut data = BTreeMap::new(); + data.insert("using".to_owned(), "anon".to_json()); + data.insert("value".to_owned(), Json::Null); + data.insert("element".to_string(), e.id.to_json()); + (Some("WebDriver:FindElements"), Some(Ok(data))) + } + }, }; let name = try_opt!(opt_name, @@ -1300,7 +1320,7 @@ impl Into<WebDriverError> for MarionetteError { } fn get_free_port() -> IoResult<u16> { - TcpListener::bind(&("localhost", 0)) + TcpListener::bind((DEFAULT_HOST, 0)) .and_then(|stream| stream.local_addr()) .map(|x| x.port()) } @@ -1325,7 +1345,12 @@ impl MarionetteConnection { let poll_interval = time::Duration::from_millis(100); let now = time::Instant::now(); - debug!("Waiting {}s to connect to browser", timeout.as_secs()); + debug!( + "Waiting {}s to connect to browser on {}:{}", + timeout.as_secs(), + DEFAULT_HOST, + self.port + ); loop { // immediately abort connection attempts if process disappears if let &mut Some(ref mut runner) = browser { @@ -1418,7 +1443,6 @@ impl MarionetteConnection { fn send(&mut self, msg: Json) -> WebDriverResult<String> { let data = self.encode_msg(msg); - trace!("-> {}", data); match self.stream { Some(ref mut stream) => { @@ -1491,10 +1515,7 @@ impl MarionetteConnection { } // TODO(jgraham): Need to handle the error here - let data = String::from_utf8(payload).unwrap(); - trace!("<- {}", data); - - Ok(data) + Ok(String::from_utf8(payload).unwrap()) } } diff --git a/src/prefs.rs b/src/prefs.rs index d2dd0c2..abec079 100644 --- a/src/prefs.rs +++ b/src/prefs.rs @@ -8,7 +8,7 @@ use mozprofile::preferences::Pref; // a Testing :: Marionette peer before you make any changes to this file. lazy_static! { - pub static ref DEFAULT: [(&'static str, Pref); 80] = [ + pub static ref DEFAULT: [(&'static str, Pref); 53] = [ // Make sure Shield doesn't hit the network. ("app.normandy.api_url", Pref::new("")), @@ -18,38 +18,10 @@ lazy_static! { // 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 - // tends to be slower than production environments (with the - // b2g emulator being the slowest of them all), resulting in the - // production timeout value sometimes being exceeded and causing - // false-positive test failures. - // - // (bug 1176798, bug 1177018, bug 1210465) - ("apz.content_response_timeout", Pref::new(60000)), - // Enable the dump function, which sends messages to the system // console ("browser.dom.window.dump.enabled", Pref::new(true)), - // Indicate that the download panel has been shown once so - // that whichever download test runs first does not show the popup - // inconsistently - ("browser.download.panel.shown", Pref::new(true)), - - // Implicitly accept license - ("browser.EULA.override", Pref::new(true)), - - // Never start the browser in offline mode - ("browser.offline", Pref::new(false)), - - // Background thumbnails in particular cause grief, and disabling - // thumbnails in general cannot hurt - ("browser.pagethumbnails.capturing_disabled", Pref::new(true)), - - // Avoid performing Reader Mode intros during tests - ("browser.reader.detectedFirstArticle", Pref::new(true)), - // Disable safebrowsing components ("browser.safebrowsing.blockedURIs.enabled", Pref::new(false)), ("browser.safebrowsing.downloads.enabled", Pref::new(false)), @@ -57,9 +29,6 @@ lazy_static! { ("browser.safebrowsing.malware.enabled", Pref::new(false)), ("browser.safebrowsing.phishing.enabled", Pref::new(false)), - // Disable updates to search engines - ("browser.search.update", Pref::new(false)), - // Do not restore the last open set of tabs if the browser crashed ("browser.sessionstore.resume_from_crash", Pref::new(false)), @@ -67,6 +36,7 @@ lazy_static! { ("browser.shell.checkDefaultBrowser", Pref::new(false)), // Do not warn when quitting with multiple tabs + // TODO: Remove once minimum supported Firefox release is 61. ("browser.showQuitWarning", Pref::new(false)), // Disable Android snippets @@ -81,41 +51,19 @@ lazy_static! { // Start with a blank page (about:blank) ("browser.startup.page", Pref::new(0)), - // Disable tab animation - ("browser.tabs.animate", Pref::new(false)), - - // Do not warn when quitting a window with multiple tabs + // Do not close the window when the last tab gets closed + // TODO: Remove once minimum supported Firefox release is 61. ("browser.tabs.closeWindowWithLastTab", Pref::new(false)), - // Do not allow background tabs to be zombified, otherwise for - // tests that open additional tabs, the test harness tab itself - // might get unloaded - ("browser.tabs.disableBackgroundZombification", Pref::new(false)), - - // Do not warn on exit when multiple tabs are open + // Do not warn when closing all open tabs + // TODO: Remove once minimum supported Firefox release is 61. ("browser.tabs.warnOnClose", Pref::new(false)), - // Do not warn when closing all other open tabs - ("browser.tabs.warnOnCloseOtherTabs", Pref::new(false)), - - // Do not warn when multiple tabs will be opened - ("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 + // TODO: Remove once minimum supported Firefox release is 61. ("browser.warnOnQuit", Pref::new(false)), // Do not show datareporting policy notifications which can @@ -130,43 +78,29 @@ lazy_static! { ("datareporting.policy.dataSubmissionPolicyAccepted", Pref::new(false)), ("datareporting.policy.dataSubmissionPolicyBypassNotification", Pref::new(true)), - // Disable popup-blocker - ("dom.disable_open_during_load", Pref::new(false)), - - // Enabling the support for File object creation in the content process - ("dom.file.createInChild", Pref::new(true)), - // Disable the ProcessHangMonitor ("dom.ipc.reportProcessHangs", Pref::new(false)), - // Disable slow script dialogues - ("dom.max_chrome_script_run_time", Pref::new(0)), - ("dom.max_script_run_time", Pref::new(0)), - // Only load extensions from the application and user profile // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION ("extensions.autoDisableScopes", Pref::new(0)), ("extensions.enabledScopes", Pref::new(5)), - // Disable metadata caching for installed add-ons by default - ("extensions.getAddons.cache.enabled", Pref::new(false)), - // Disable intalling any distribution extensions or add-ons ("extensions.installDistroAddons", Pref::new(false)), // Make sure Shield doesn't hit the network. - // Removed in Firefox 60. + // TODO: Remove once minimum supported Firefox release is 60. ("extensions.shield-recipe-client.api_url", Pref::new("")), + // Disable extensions compatibility dialogue. + // TODO: Remove once minimum supported Firefox release is 61. ("extensions.showMismatchUI", Pref::new(false)), // Turn off extension updates so they do not bother tests ("extensions.update.enabled", Pref::new(false)), ("extensions.update.notifyUser", Pref::new(false)), - // Make sure opening about:addons will not hit the network - ("extensions.webservice.discoverURL", Pref::new("http://%(server)s/dummy/discoveryURL")), - // Allow the application to have focus even it runs in the // background ("focusmanager.testmode", Pref::new(true)), @@ -187,19 +121,10 @@ lazy_static! { // Show chrome errors and warnings in the error console ("javascript.options.showInConsole", Pref::new(true)), - // Make sure the disk cache does not get auto disabled - ("network.http.bypass-cachelock-threshold", Pref::new(200000)), - // Do not prompt with long usernames or passwords in URLs + // TODO: Remove once minimum supported Firefox release is 61. ("network.http.phishy-userpass-length", Pref::new(255)), - // Do not prompt for temporary redirects - ("network.http.prompt-temp-redirect", Pref::new(false)), - - // Disable speculative connections so they are not reported as - // leaking when they are hanging around - ("network.http.speculative-parallel-limit", Pref::new(0)), - // Do not automatically switch between offline and online ("network.manage-offline-status", Pref::new(false)), @@ -211,25 +136,9 @@ lazy_static! { // c.f. https://github.com/mozilla/geckodriver/issues/225. ("plugin.state.flash", Pref::new(0)), - // Local documents have access to all other local docments, - // including directory listings. - ("security.fileuri.strict_origin_policy", Pref::new(false)), - - // Tests don't wait for the notification button security delay - ("security.notification_enable_delay", Pref::new(0)), - // Ensure blocklist updates don't hit the network ("services.settings.server", Pref::new("http://%(server)s/dummy/blocklist/")), - // Do not automatically fill sign-in forms with known usernames - // and passwords - ("signon.autofillForms", Pref::new(false)), - - // Disable password capture, so that tests that include forms - // are not influenced by the presence of the persistent doorhanger - // notification - ("signon.rememberSignons", Pref::new(false)), - // Disable first run pages ("startup.homepage_welcome_url", Pref::new("about:blank")), ("startup.homepage_welcome_url.additional", Pref::new("")), |