Bug 1346772 - Pass wpt hostnames to firefox when starting webdriver tests, r=ato draft
authorJames Graham <james@hoppipolla.co.uk>
Wed, 08 Mar 2017 17:15:52 +0000
changeset 497535 e1906968685c55c8defaaf4cf5bbbb553fc80b9e
parent 497534 181ce62d67db66f2f16b94833d05ec0746c8f578
child 497536 0f3c28bccc38250d611082c04a157318f1af338c
push id48933
push userbmo:james@hoppipolla.co.uk
push dateMon, 13 Mar 2017 13:53:04 +0000
reviewersato
bugs1346772
milestone55.0a1
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
testing/web-platform/harness/wptrunner/browsers/firefox.py
--- 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",