Skip to content

Commit cc793b8

Browse files
committed
WdspecExecutor should set capabilities from the ExecutorBrowser
This makes it match what executorwebdriver.WebDriverProtocol does.
1 parent 7b1f63a commit cc793b8

File tree

1 file changed

+20
-1
lines changed
  • tools/wptrunner/wptrunner/executors

1 file changed

+20
-1
lines changed

tools/wptrunner/wptrunner/executors/base.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from . import pytestrunner
1818
from .actions import actions
1919
from .asyncactions import async_actions
20-
from .protocol import Protocol, WdspecProtocol
20+
from .protocol import Protocol, WdspecProtocol, merge_dicts
2121

2222

2323
here = os.path.dirname(__file__)
@@ -687,6 +687,25 @@ def __init__(self, logger, browser, server_config, webdriver_binary,
687687
os_map = {"win": "windows"}
688688
self.target_platform = os_map.get(target_platform, target_platform)
689689

690+
# See also: executorwebdriver.py
691+
if hasattr(browser, "capabilities"):
692+
if self.capabilities is None:
693+
self.capabilities = browser.capabilities
694+
else:
695+
merge_dicts(self.capabilities, browser.capabilities)
696+
697+
pac = browser.pac
698+
if pac is not None:
699+
if self.capabilities is None:
700+
self.capabilities = {}
701+
merge_dicts(self.capabilities, {"proxy":
702+
{
703+
"proxyType": "pac",
704+
"proxyAutoconfigUrl": urljoin(self.server_url("http"), pac)
705+
}
706+
})
707+
708+
690709
def setup(self, runner, protocol=None):
691710
assert protocol is None, "Switch executor not allowed for wdspec tests."
692711
self.protocol = self.protocol_cls(self, self.browser)

0 commit comments

Comments
 (0)