Bug 1926721 [wpt PR 48789] - Check the processed capabilities of always supported capabilities, a=testonly

Automatic update from web-platform-tests
Check the processed capabilities of always supported capabilities

--

wpt-commits: c013a0c1498540ac2f417b2a5c38f0446b24e679
wpt-pr: 48789
This commit is contained in:
Sam Sneddon 2024-10-28 22:10:18 +00:00 committed by moz-wptsync-bot
parent fdb0dde006
commit 00d953aa7f
2 changed files with 14 additions and 0 deletions

View File

@ -13,3 +13,10 @@ def test_valid(new_session, add_browser_capabilities, key, value):
response, _ = new_session({"capabilities": {
"alwaysMatch": add_browser_capabilities({key: value})}})
assert_success(response)
response_capabilities = response.body["value"]["capabilities"]
if ":" not in key and value is not None:
if key == "timeouts":
for timeout_key, timeout_value in value.items():
assert response_capabilities[key][timeout_key] == timeout_value
else:
assert response_capabilities[key] == value

View File

@ -14,3 +14,10 @@ def test_valid(new_session, add_browser_capabilities, key, value):
response, _ = new_session({"capabilities": {
"firstMatch": [add_browser_capabilities({key: value})]}})
assert_success(response)
response_capabilities = response.body["value"]["capabilities"]
if ":" not in key and value is not None:
if key == "timeouts":
for timeout_key, timeout_value in value.items():
assert response_capabilities[key][timeout_key] == timeout_value
else:
assert response_capabilities[key] == value