diff options
Diffstat (limited to 'testing/web-platform/mozilla/tests/webdriver/bidi/browsing_context/set_viewport/invalid.py')
-rw-r--r-- | testing/web-platform/mozilla/tests/webdriver/bidi/browsing_context/set_viewport/invalid.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/webdriver/bidi/browsing_context/set_viewport/invalid.py b/testing/web-platform/mozilla/tests/webdriver/bidi/browsing_context/set_viewport/invalid.py new file mode 100644 index 0000000000..b837b86416 --- /dev/null +++ b/testing/web-platform/mozilla/tests/webdriver/bidi/browsing_context/set_viewport/invalid.py @@ -0,0 +1,19 @@ +import pytest +from webdriver.bidi import error + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "viewport", + [ + {"width": 10000001, "height": 100}, + {"width": 100, "height": 10000001}, + ], + ids=["width exceeded", "height exceeded"], +) +async def test_params_viewport_invalid_value(bidi_session, new_tab, viewport): + with pytest.raises(error.UnsupportedOperationException): + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], viewport=viewport + ) |