Bug 1372595 - Let resource URL protocol be configurable; r=jgraham
The url fixture is used to access hosted files on the wptserve instance.
This patch makes it possible to choose between different wptserve HTTPDs
based on the protocol.
The default remains the HTTP protocol.
MozReview-Commit-ID: FvtMMUSlB4M
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -220636,17 +220636,17 @@
"5a31a3917a5157516c10951a3b3d5ffb43b992d9",
"support"
],
"webdriver/support/asserts.py": [
"68bde3a7b3e3fe3ecd45e43c9fbc3c1317828e08",
"support"
],
"webdriver/support/fixtures.py": [
- "6e3aa3d4ba89b4acd2e18af60ad1d7034b2a4e5f",
+ "82f0f3b1c668040fa7a0187f00501a2b0f2e2565",
"support"
],
"webdriver/support/http_request.py": [
"01c4b525c27f77d253c75031a9cee3f17aca8df0",
"support"
],
"webdriver/support/inline.py": [
"bc85126e5637145e81f27d037f3a9090747130c8",
--- a/testing/web-platform/tests/webdriver/support/fixtures.py
+++ b/testing/web-platform/tests/webdriver/support/fixtures.py
@@ -167,17 +167,14 @@ def new_session(configuration, request):
end()
request.addfinalizer(end)
return create_session
def url(server_config):
- def inner(path, query="", fragment=""):
- rv = urlparse.urlunsplit(("http",
- "%s:%s" % (server_config["host"],
- server_config["ports"]["http"][0]),
- path,
- query,
- fragment))
- return rv
+ def inner(path, protocol="http", query="", fragment=""):
+ port = server_config["ports"][protocol][0]
+ host = "%s:%s" % (server_config["host"], port)
+ return urlparse.urlunsplit((protocol, host, path, query, fragment))
+
return inner