Skip to content

Commit 8133499

Browse files
committed
[js] Remove the unnecessary normalizeProxyConfiguration function
1 parent 8edc13b commit 8133499

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

javascript/node/selenium-webdriver/firefox.js

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -459,39 +459,6 @@ function findInProgramFiles(file) {
459459
});
460460
}
461461

462-
function normalizeProxyConfiguration(config) {
463-
if ('manual' === config.proxyType) {
464-
if (config.ftpProxy && !config.ftpProxyPort) {
465-
let hostAndPort = net.splitHostAndPort(config.ftpProxy);
466-
config.ftpProxy = hostAndPort.host;
467-
config.ftpProxyPort = hostAndPort.port;
468-
}
469-
470-
if (config.httpProxy && !config.httpProxyPort) {
471-
let hostAndPort = net.splitHostAndPort(config.httpProxy);
472-
config.httpProxy = hostAndPort.host;
473-
config.httpProxyPort = hostAndPort.port;
474-
}
475-
476-
if (config.sslProxy && !config.sslProxyPort) {
477-
let hostAndPort = net.splitHostAndPort(config.sslProxy);
478-
config.sslProxy = hostAndPort.host;
479-
config.sslProxyPort = hostAndPort.port;
480-
}
481-
482-
if (config.socksProxy && !config.socksProxyPort) {
483-
let hostAndPort = net.splitHostAndPort(config.socksProxy);
484-
config.socksProxy = hostAndPort.host;
485-
config.socksProxyPort = hostAndPort.port;
486-
}
487-
} else if ('pac' === config.proxyType) {
488-
if (config.proxyAutoconfigUrl && !config.pacUrl) {
489-
config.proxyAutoconfigUrl = config.proxyAutoconfigUrl;
490-
}
491-
}
492-
return config;
493-
}
494-
495462

496463
/** @enum {string} */
497464
const ExtensionCommand = {
@@ -605,12 +572,6 @@ class Driver extends webdriver.WebDriver {
605572
caps = new capabilities.Capabilities(opt_config);
606573
}
607574

608-
if (caps.has(capabilities.Capability.PROXY)) {
609-
let proxy =
610-
normalizeProxyConfiguration(caps.get(capabilities.Capability.PROXY));
611-
caps.set(capabilities.Capability.PROXY, proxy);
612-
}
613-
614575
let executor;
615576
let onQuit;
616577

0 commit comments

Comments
 (0)