webdriver: Recognize sslProxy and sslProxyPort capabilities.
authorJason Juang <juangj@google.com>
Tue, 11 Apr 2017 14:21:17 +0100
changeset 428139 9e315ddf70188d3afaa640dcfd25d92ac954e597
parent 428138 7fc47a3922a8efc0b7fba5c4a5293b8115e92ec4
child 428140 bb5a9e9b5f8cad087347fa7756159c435e4e052f
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
webdriver: Recognize sslProxy and sslProxyPort capabilities. Source-Repo: https://github.com/mozilla/webdriver-rust Source-Revision: 50a0ee1bc6d37fef72066b8014e2b4fd85fa2f46 committer: jgraham <james@hoppipolla.co.uk>
testing/webdriver/src/capabilities.rs
--- a/testing/webdriver/src/capabilities.rs
+++ b/testing/webdriver/src/capabilities.rs
@@ -169,16 +169,18 @@ impl SpecNewSessionParameters {
                         ErrorStatus::InvalidArgument,
                         "proxyAutoconfigUrl was not a string"
                     ))
                 },
                 "ftpProxy" => try!(SpecNewSessionParameters::validate_host_domain("ftpProxy", "ftp", obj, value)),
                 "ftpProxyPort" => try!(SpecNewSessionParameters::validate_port("ftpProxyPort", value)),
                 "httpProxy" => try!(SpecNewSessionParameters::validate_host_domain("httpProxy", "http", obj, value)),
                 "httpProxyPort" => try!(SpecNewSessionParameters::validate_port("httpProxyPort", value)),
+                "sslProxy" => try!(SpecNewSessionParameters::validate_host_domain("sslProxy", "http", obj, value)),
+                "sslProxyPort" => try!(SpecNewSessionParameters::validate_port("sslProxyPort", value)),
                 "socksProxy" => try!(SpecNewSessionParameters::validate_host_domain("socksProxy", "ssh", obj, value)),
                 "socksProxyPort" => try!(SpecNewSessionParameters::validate_port("socksProxyPort", value)),
                 "socksUsername" => if !value.is_string() {
                     return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
                                                    "socksUsername was not a string"))
                 },
                 "socksPassword" => if !value.is_string() {
                     return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
@@ -542,13 +544,15 @@ mod tests {
         validate_host("ftpProxy", "ftp", "{}", "example.org").unwrap();
         assert!(validate_host("ftpProxy", "ftp", "{}", "ftp://example.org").is_err());
         assert!(validate_host("ftpProxy", "ftp", "{}", "example.org/foo").is_err());
         assert!(validate_host("ftpProxy", "ftp", "{}", "example.org#bar").is_err());
         assert!(validate_host("ftpProxy", "ftp", "{}", "example.org?bar=baz").is_err());
         assert!(validate_host("ftpProxy", "ftp", "{}", "foo:bar@example.org").is_err());
         assert!(validate_host("ftpProxy", "ftp", "{}", "foo@example.org").is_err());
         validate_host("httpProxy", "http", "{}", "example.org:8000").unwrap();
-        validate_host("httpProxy", "http", "{}", "example.org:8000").unwrap();
         validate_host("httpProxy", "http", "{\"ftpProxyPort\": \"1234\"}", "example.org:8000").unwrap();
-        assert!(validate_host("httpProxy", "http", "{\"httpProxyPort\": \"1234\"}", "example.org:8000").is_err())
+        assert!(validate_host("httpProxy", "http", "{\"httpProxyPort\": \"1234\"}", "example.org:8000").is_err());
+        validate_host("sslProxy", "http", "{}", "example.org:8000").unwrap();
+        validate_host("sslProxy", "http", "{\"ftpProxyPort\": \"1234\"}", "example.org:8000").unwrap();
+        assert!(validate_host("sslProxy", "http", "{\"sslProxyPort\": \"1234\"}", "example.org:8000").is_err());
     }
 }