Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mozilla/geckodriver.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Skupin <mail@hskupin.info>2021-01-14 13:59:31 +0300
committerGitHub <noreply@github.com>2021-01-14 13:59:31 +0300
commit8f937644a28cb91427050e1c0ff2dcc84e9280e7 (patch)
tree5e2dc46ca8c455bc3eb5ac3d2bd6983677cce57d
parent2acb733de5bda81ed30b6f4e90be27fee6f62ff7 (diff)
Import of v0.29.0 (#1829)v0.29.0
-rw-r--r--CHANGES.md34
-rw-r--r--Cargo.toml12
-rw-r--r--build.rs14
-rw-r--r--doc/Capabilities.md46
-rw-r--r--doc/Flags.md24
-rw-r--r--doc/Support.md5
-rw-r--r--doc/Testing.md5
-rw-r--r--mach_commands.py26
-rw-r--r--marionette/src/common.rs4
-rw-r--r--marionette/src/error.rs4
-rw-r--r--marionette/src/lib.rs4
-rw-r--r--marionette/src/marionette.rs4
-rw-r--r--marionette/src/message.rs4
-rw-r--r--marionette/src/result.rs4
-rw-r--r--marionette/src/test.rs4
-rw-r--r--marionette/src/webdriver.rs4
-rw-r--r--src/build.rs4
-rw-r--r--src/capabilities.rs92
-rw-r--r--src/command.rs4
-rw-r--r--src/logging.rs4
-rw-r--r--src/marionette.rs4
-rw-r--r--src/prefs.rs4
-rw-r--r--src/test.rs4
23 files changed, 258 insertions, 56 deletions
diff --git a/CHANGES.md b/CHANGES.md
index eb7902c..ed684cf 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,6 +3,32 @@ Change log
All notable changes to this program are documented in this file.
+0.29.0 (2021-01-14, `cf6956a5ec8e`)
+--------------------
+
+### Known problems
+
+- _macOS 10.15 (Catalina):_
+
+ Due to the requirement from Apple that all programs must be
+ notarized, geckodriver will not work on Catalina if you manually
+ download it through another notarized program, such as Firefox.
+
+ Whilst we are working on a repackaging fix for this problem, you can
+ find more details on how to work around this issue in the [macOS
+ notarization] section of the documentation.
+
+### Added
+
+- Introduced the new boolean capability `moz:debuggerAddress` that can be used
+ to opt-in to the experimental Chrome DevTools Protocol (CDP) implementation.
+ A string capability with the same name will be returned by [`NewSession`],
+ which contains the `host:port` combination of the HTTP server that can be
+ used to query for websockets of available targets.
+
+ Note: For this experimental feature the site-isolation support of
+ Firefox aka [Fission] will be not available.
+
0.28.0 (2020-11-03, `c00d2b6acd3f`)
--------------------
@@ -21,8 +47,8 @@ All notable changes to this program are documented in this file.
### Added
- The command line flag `--android-storage` has been added, to allow geckodriver
-to also control Firefox on root-less Android devices. See the [documentation][Flags]
-for available values.
+ to also control Firefox on root-less Android devices.
+ See the [documentation][Flags] for available values.
### Fixed
@@ -1368,10 +1394,10 @@ and greater.
[Browser Toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox
[WebDriver conformance]: https://wpt.fyi/results/webdriver/tests?label=experimental
[`moz:firefoxOptions`]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions
+[`moz:debuggerAddress`]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html#moz-debuggeraddress
[Microsoft Visual Studio redistributable runtime]: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
[GeckoView]: https://wiki.mozilla.org/Mobile/GeckoView
-[Firefox Preview]: https://play.google.com/store/apps/details?id=org.mozilla.fenix
-[Firefox Reality]: https://play.google.com/store/apps/details?id=org.mozilla.vrbrowser
+[Fission]: https://wiki.mozilla.org/Project_Fission
[Capabilities]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html
[Flags]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Flags.html
[enable remote debugging on the Android device]: https://developers.google.com/web/tools/chrome-devtools/remote-debugging
diff --git a/Cargo.toml b/Cargo.toml
index a5d4a27..06ea304 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "geckodriver"
-version = "0.28.0"
+version = "0.29.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"
@@ -17,17 +17,17 @@ hyper = "0.13"
lazy_static = "1.0"
log = { version = "0.4", features = ["std"] }
marionette = { path = "./marionette" }
-mozdevice = "0.3.0"
-mozprofile = "0.7.0"
-mozrunner = "0.12.0"
-mozversion = "0.4.0"
+mozdevice = "0.3.1"
+mozprofile = "0.7.1"
+mozrunner = "0.12.1"
+mozversion = "0.4.1"
regex = { version="1.0", default-features = false, features = ["perf", "std"] }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
serde_yaml = "0.8"
uuid = { version = "0.8", features = ["v4"] }
-webdriver = "0.42.0"
+webdriver = "0.43.0"
zip = { version = "0.4", default-features = false, features = ["deflate"] }
[[bin]]
diff --git a/build.rs b/build.rs
index 58d2726..2fca20d 100644
--- a/build.rs
+++ b/build.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
// Writes build information to ${OUT_DIR}/build-info.rs which is included in
// the program during compilation:
//
@@ -42,13 +46,11 @@ fn get_build_info(dir: &Path) -> Box<dyn BuildInfo> {
Box::new(Hg {})
} else if Path::exists(&dir.join(".git")) {
Box::new(Git {})
+ } else if let Some(parent) = dir.parent() {
+ get_build_info(parent)
} else {
- if let Some(parent) = dir.parent() {
- get_build_info(parent)
- } else {
- eprintln!("unable to detect vcs");
- Box::new(Noop {})
- }
+ eprintln!("unable to detect vcs");
+ Box::new(Noop {})
}
}
diff --git a/doc/Capabilities.md b/doc/Capabilities.md
index 383a362..feec2cb 100644
--- a/doc/Capabilities.md
+++ b/doc/Capabilities.md
@@ -8,6 +8,52 @@ We additionally have some capabilities that largely are implementation
concerns that normal users should not care about:
+`moz:debuggerAddress`
+--------------------
+
+A boolean value to indicate if Firefox has to be started with the
+[Remote Protocol] enabled, which is a low-level debugging interface that
+implements a subset of the [Chrome DevTools Protocol] (CDP).
+
+When enabled the returned `moz:debuggerAddress` capability of the `New Session`
+command is the `host:port` combination of a server that supports the following
+HTTP endpoints:
+
+### GET /json/version
+
+The browser version metadata:
+
+ {
+ "Browser": "Firefox/84.0a1",
+ "Protocol-Version": "1.0",
+ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/84.0",
+ "V8-Version": "1.0",
+ "WebKit-Version": "1.0",
+ "webSocketDebuggerUrl": "ws://localhost:9222/devtools/browser/fe507083-2960-a442-bbd7-7dfe1f111c05"
+ }
+
+### GET /json/list
+
+A list of all available websocket targets:
+
+ [ {
+ "description": "",
+ "devtoolsFrontendUrl": null,
+ "faviconUrl": "",
+ "id": "ecbf9028-676a-1b40-8596-a5edc0e2875b",
+ "type": "page",
+ "url": "https://www.mozilla.org/en-US/",
+ "browsingContextId": 29,
+ "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/ecbf9028-676a-1b40-8596-a5edc0e2875b"
+ } ]
+
+The contained `webSocketDebuggerUrl` entries can be used to connect to the
+websocket and interact with the browser by using the CDP protocol.
+
+[Remote Protocol]: /testing/remote/doc/
+[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
+
+
`moz:useNonSpecCompliantPointerOrigin`
--------------------------------------
diff --git a/doc/Flags.md b/doc/Flags.md
index 8889e8b..1fc6285 100644
--- a/doc/Flags.md
+++ b/doc/Flags.md
@@ -1,7 +1,7 @@
Flags
=====
-#### <code>--android-storage <var>ANDROID_STORAGE</var></code>
+#### <code>&#x2D;&#x2D;android-storage <var>ANDROID_STORAGE</var></code>
Selects the test data location on the Android device, eg. the Firefox profile.
By default `auto` is used.
@@ -47,7 +47,7 @@ By default `auto` is used.
</table>
-#### <code>-b <var>BINARY</var></code> / <code>--binary <var>BINARY</var></code>
+#### <code>-b <var>BINARY</var></code> / <code>&#x2D;&#x2D;binary <var>BINARY</var></code>
Path to the Firefox binary to use. By default geckodriver tries to
find and use the system installation of Firefox, but that behaviour
@@ -74,7 +74,7 @@ scanning the Windows registry.
[whereis(1)]: http://www.manpagez.com/man/1/whereis/
-#### <code>--connect-existing</code>
+#### <code>&#x2D;&#x2D;connect-existing</code>
Connect geckodriver to an existing Firefox instance. This means
geckodriver will abstain from the default of starting a new Firefox
@@ -85,29 +85,29 @@ To enable the remote protocol in Firefox, you can pass the
`-marionette` flag. Unless the `marionette.port` preference
has been user-set, Marionette will listen on port 2828. So when
using `--connect-existing` it is likely you will also have to use
-[`--marionette-port`] to set the correct port.
+`--marionette-port` to set the correct port.
-[`--marionette-port`]: #marionette-port
+[`&#x2D;&#x2D;marionette-port`]: #marionette-port
-#### <code>--host <var>HOST</var></code>
+#### <code>&#x2D;&#x2D;host <var>HOST</var></code>
Host to use for the WebDriver server. Defaults to 127.0.0.1.
-#### <code>--log <var>LEVEL</var></code>
+#### <code>&#x2D;&#x2D;log <var>LEVEL</var></code>
Set the Gecko and geckodriver log level. Possible values are `fatal`,
`error`, `warn`, `info`, `config`, `debug`, and `trace`.
-#### <code>--marionette-host <var>HOST</var></code>
+#### <code>&#x2D;&#x2D;marionette-host <var>HOST</var></code>
Selects the host for geckodriver’s connection to the [Marionette]
remote protocol. Defaults to 127.0.0.1.
-#### <code>--marionette-port <var>PORT</var></code>
+#### <code>&#x2D;&#x2D;marionette-port <var>PORT</var></code>
Selects the port for geckodriver’s connection to the [Marionette]
remote protocol.
@@ -116,13 +116,13 @@ In the default mode where geckodriver starts and manages the Firefox
process, it will pick a free port assigned by the system and set the
`marionette.port` preference in the profile.
-When [`--connect-existing`] is used and the Firefox process is not
+When `--connect-existing` is used and the Firefox process is not
under geckodriver’s control, it will simply connect to <var>PORT</var>.
[`--connect-existing`]: #connect-existing
-#### <code>-p <var>PORT</var></code> / <code>--port <var>PORT</var></code>
+#### <code>-p <var>PORT</var></code> / <code>&#x2D;&#x2D;port <var>PORT</var></code>
Port to use for the WebDriver server. Defaults to 4444.
@@ -130,7 +130,7 @@ A helpful trick is that it is possible to bind to 0 to get the
system to atomically assign a free port.
-#### <code>--jsdebugger</code>
+#### <code>&#x2D;&#x2D;jsdebugger</code>
Attach [browser toolbox] debugger when Firefox starts. This is
useful for debugging [Marionette] internals.
diff --git a/doc/Support.md b/doc/Support.md
index a7478d4..94afa54 100644
--- a/doc/Support.md
+++ b/doc/Support.md
@@ -24,6 +24,11 @@ and required versions of Selenium and Firefox:
</thead>
<tr>
+ <td>0.29.0
+ <td>≥ 3.11 (3.14 Python)
+ <td>60
+ <td>n/a
+ <tr>
<td>0.28.0
<td>≥ 3.11 (3.14 Python)
<td>60
diff --git a/doc/Testing.md b/doc/Testing.md
index f8dfae0..f14aff6 100644
--- a/doc/Testing.md
+++ b/doc/Testing.md
@@ -14,9 +14,10 @@ tell mach to build these by adding the following line to your [mozconfig]:
ac_add_options --enable-rust-tests
-Tests can then be run like this:
+Tests can then be run by using `cargo test` in the specific source folder:
- % ./mach test testing/geckodriver
+ % cd testing/geckodriver/src
+ % cargo test
To run the more extensive WPT tests you can use mach, but first
make sure you have built Firefox:
diff --git a/mach_commands.py b/mach_commands.py
index beb4b93..bf5fe59 100644
--- a/mach_commands.py
+++ b/mach_commands.py
@@ -125,29 +125,3 @@ class GeckoDriver(MachCommandBase):
args = [self.debuggerInfo.path] + self.debuggerInfo.args + args
return self.run_process(args=args, ensure_exit_code=False, pass_thru=True)
-
-
-@CommandProvider
-class GeckoDriverTest(MachCommandBase):
- @Command(
- "geckodriver-test",
- category="post-build",
- description="Run geckodriver unit tests.",
- )
- @CommandArgument(
- "-v",
- "--verbose",
- action="store_true",
- help="Verbose output for what" " commands the build is running.",
- )
- def test(self, verbose=False, **kwargs):
- from mozbuild.controller.building import BuildDriver
-
- self.log_manager.enable_all_structured_loggers()
-
- driver = self._spawn(BuildDriver)
- return driver.build(
- what=["testing/geckodriver/check"],
- verbose=verbose,
- mach_context=self._mach_context,
- )
diff --git a/marionette/src/common.rs b/marionette/src/common.rs
index b051e66..78bf3af 100644
--- a/marionette/src/common.rs
+++ b/marionette/src/common.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde::ser::SerializeMap;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use serde_json::Value;
diff --git a/marionette/src/error.rs b/marionette/src/error.rs
index 512aae6..5db502e 100644
--- a/marionette/src/error.rs
+++ b/marionette/src/error.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use std::error;
use std::fmt;
diff --git a/marionette/src/lib.rs b/marionette/src/lib.rs
index 30ef48d..80817c5 100644
--- a/marionette/src/lib.rs
+++ b/marionette/src/lib.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
pub mod error;
pub mod common;
diff --git a/marionette/src/marionette.rs b/marionette/src/marionette.rs
index 35d0fc0..c06e2d6 100644
--- a/marionette/src/marionette.rs
+++ b/marionette/src/marionette.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde::{Deserialize, Serialize};
use crate::common::BoolValue;
diff --git a/marionette/src/message.rs b/marionette/src/message.rs
index 8ccb816..33741ca 100644
--- a/marionette/src/message.rs
+++ b/marionette/src/message.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde::de::{self, SeqAccess, Unexpected, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_json::{Map, Value};
diff --git a/marionette/src/result.rs b/marionette/src/result.rs
index 0f10269..95817c1 100644
--- a/marionette/src/result.rs
+++ b/marionette/src/result.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde::de;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_json::Value;
diff --git a/marionette/src/test.rs b/marionette/src/test.rs
index b6309a2..3b20bb0 100644
--- a/marionette/src/test.rs
+++ b/marionette/src/test.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
pub static ELEMENT_KEY: &'static str = "element-6066-11e4-a52e-4f735466cecf";
pub fn assert_ser_de<T>(data: &T, json: serde_json::Value)
diff --git a/marionette/src/webdriver.rs b/marionette/src/webdriver.rs
index a15e1cf..b1069ed 100644
--- a/marionette/src/webdriver.rs
+++ b/marionette/src/webdriver.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde::{Deserialize, Serialize};
use serde_json::Value;
diff --git a/src/build.rs b/src/build.rs
index c959033..7ba3144 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use serde_json::Value;
use std::fmt;
diff --git a/src/capabilities.rs b/src/capabilities.rs
index ab4ed68..e21651e 100644
--- a/src/capabilities.rs
+++ b/src/capabilities.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use crate::command::LogOptions;
use crate::logging::Level;
use base64;
@@ -313,6 +317,14 @@ impl<'a> BrowserCapabilities for FirefoxCapabilities<'a> {
));
}
}
+ "moz:debuggerAddress" => {
+ if !value.is_boolean() {
+ return Err(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "moz:debuggerAddress is not a boolean",
+ ));
+ }
+ }
_ => {
return Err(WebDriverError::new(
ErrorStatus::InvalidArgument,
@@ -397,6 +409,35 @@ impl FirefoxOptions {
rv.profile = FirefoxOptions::load_profile(&options)?;
}
+ if let Some(json) = matched.remove("moz:debuggerAddress") {
+ let use_web_socket = json.as_bool().ok_or_else(|| {
+ WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "moz:debuggerAddress is not a boolean",
+ )
+ })?;
+
+ if use_web_socket {
+ let mut remote_args = Vec::new();
+ remote_args.push("--remote-debugging-port".to_owned());
+ remote_args.push("0".to_owned());
+
+ if let Some(ref mut args) = rv.args {
+ args.append(&mut remote_args);
+ } else {
+ rv.args = Some(remote_args);
+ }
+
+ // Force Fission disabled until Remote Agent is compatible,
+ // and preference hasn't been already set
+ let has_fission_pref = rv.prefs.iter().find(|&x| x.0 == "fission.autostart");
+ if has_fission_pref.is_none() {
+ rv.prefs
+ .push(("fission.autostart".to_owned(), Pref::new(false)));
+ }
+ }
+ }
+
Ok(rv)
}
@@ -755,6 +796,57 @@ mod tests {
}
#[test]
+ fn fx_options_from_capabilities_with_debugger_address_not_set() {
+ let mut caps = Capabilities::new();
+
+ let opts = FirefoxOptions::from_capabilities(None, AndroidStorageInput::Auto, &mut caps)
+ .expect("Valid Firefox options");
+
+ assert!(
+ opts.args.is_none(),
+ "CLI arguments for Firefox unexpectedly found"
+ );
+ }
+
+ #[test]
+ fn fx_options_from_capabilities_with_debugger_address_false() {
+ let mut caps = Capabilities::new();
+ caps.insert("moz:debuggerAddress".into(), json!(false));
+
+ let opts = FirefoxOptions::from_capabilities(None, AndroidStorageInput::Auto, &mut caps)
+ .expect("Valid Firefox options");
+
+ assert!(
+ opts.args.is_none(),
+ "CLI arguments for remote protocol unexpectedly found"
+ );
+ }
+
+ #[test]
+ fn fx_options_from_capabilities_with_debugger_address_true() {
+ let mut caps = Capabilities::new();
+ caps.insert("moz:debuggerAddress".into(), json!(true));
+
+ let opts = FirefoxOptions::from_capabilities(None, AndroidStorageInput::Auto, &mut caps)
+ .expect("Valid Firefox options");
+
+ if let Some(args) = opts.args {
+ let mut iter = args.iter();
+ assert!(iter
+ .find(|&arg| arg == &"--remote-debugging-port".to_owned())
+ .is_some());
+ assert_eq!(iter.next(), Some(&"0".to_owned()));
+ } else {
+ assert!(false, "CLI arguments for remote protocol not found");
+ }
+
+ assert!(opts
+ .prefs
+ .iter()
+ .any(|pref| pref == &("fission.autostart".to_owned(), Pref::new(false))));
+ }
+
+ #[test]
fn fx_options_from_capabilities_with_invalid_caps() {
let mut caps = Capabilities::new();
caps.insert("moz:firefoxOptions".into(), json!(42));
diff --git a/src/command.rs b/src/command.rs
index 5e3a6f3..f5bc27a 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use crate::logging;
use base64;
use hyper::Method;
diff --git a/src/logging.rs b/src/logging.rs
index 7c0117d..7721bb7 100644
--- a/src/logging.rs
+++ b/src/logging.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
//! Gecko-esque logger implementation for the [`log`] crate.
//!
//! The [`log`] crate provides a single logging API that abstracts over the
diff --git a/src/marionette.rs b/src/marionette.rs
index 7074cf3..99a82f3 100644
--- a/src/marionette.rs
+++ b/src/marionette.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use crate::android::AndroidHandler;
use crate::command::{
AddonInstallParameters, AddonUninstallParameters, GeckoContextParameters,
diff --git a/src/prefs.rs b/src/prefs.rs
index 17e882c..075d0c6 100644
--- a/src/prefs.rs
+++ b/src/prefs.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
use mozprofile::preferences::Pref;
// ALL CHANGES TO THIS FILE MUST HAVE REVIEW FROM A GECKODRIVER PEER!
diff --git a/src/test.rs b/src/test.rs
index 71cacee..e664aad 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -1,3 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
pub fn assert_de<T>(data: &T, json: serde_json::Value)
where
T: std::fmt::Debug,