Bug 1346772 - Pass wpt hostnames to firefox when starting webdriver tests, r=ato
Ensure that the webdriver tests can access the web-platform.test
hostnames in the same way as other tests by setting the necessary
Firefox pref as part of the capabilities.
MozReview-Commit-ID: At5ENJY7UXA
--- a/testing/web-platform/harness/wptrunner/browsers/firefox.py
+++ b/testing/web-platform/harness/wptrunner/browsers/firefox.py
@@ -77,16 +77,19 @@ def executor_kwargs(test_type, server_co
executor_kwargs["timeout_multiplier"] = 3
if test_type == "wdspec":
executor_kwargs["webdriver_binary"] = kwargs.get("webdriver_binary")
fxOptions = {}
if kwargs["binary"]:
fxOptions["binary"] = kwargs["binary"]
if kwargs["binary_args"]:
fxOptions["args"] = kwargs["binary_args"]
+ fxOptions["prefs"] = {
+ "network.dns.localDomains": ",".join(hostnames)
+ }
capabilities = {"moz:firefoxOptions": fxOptions}
executor_kwargs["capabilities"] = capabilities
return executor_kwargs
def env_options():
return {"host": "127.0.0.1",
"external_host": "web-platform.test",