Skip to content

Commit 303c960

Browse files
committed
Bug 2003992 - [wdspec] Add a test case with "locale" equal "undefined" for "emulation.setLocaleOverride". r=whimboo
Differential Revision: https://phabricator.services.mozilla.com/D275042
1 parent 24d78ad commit 303c960

File tree

1 file changed

+9
-0
lines changed
  • testing/web-platform/tests/webdriver/tests/bidi/emulation/set_locale_override

1 file changed

+9
-0
lines changed

testing/web-platform/tests/webdriver/tests/bidi/emulation/set_locale_override/invalid.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
import webdriver.bidi.error as error
4+
from webdriver.bidi.undefined import UNDEFINED
45

56
pytestmark = pytest.mark.asyncio
67

@@ -91,6 +92,14 @@ async def test_params_user_contexts_entry_invalid_value(bidi_session, value):
9192
)
9293

9394

95+
async def test_params_locale_missing(bidi_session, top_context):
96+
with pytest.raises(error.InvalidArgumentException):
97+
await bidi_session.emulation.set_locale_override(
98+
locale=UNDEFINED,
99+
contexts=[top_context["context"]],
100+
)
101+
102+
94103
@pytest.mark.parametrize("value", [False, 42, {}, []])
95104
async def test_params_locale_invalid_type(bidi_session, top_context, value):
96105
with pytest.raises(error.InvalidArgumentException):

0 commit comments

Comments
 (0)