diff --git a/webdriver/tests/bidi/script/call_function/exception_details.py b/webdriver/tests/bidi/script/call_function/exception_details.py index 97f38d5aaae60a..df751f2df3188a 100644 --- a/webdriver/tests/bidi/script/call_function/exception_details.py +++ b/webdriver/tests/bidi/script/call_function/exception_details.py @@ -131,9 +131,16 @@ async def test_invalid_function(bidi_session, top_context): ("new WeakMap()", {"type": "weakmap", },), ("new WeakSet()", {"type": "weakset", },), ("new Error('SOME_ERROR_TEXT')", {"type": "error"},), - # TODO(sadym): add `iterator` test. - # TODO(sadym): add `generator` test. - # TODO(sadym): add `proxy` test. + ("([1, 2][Symbol.iterator]())", { + "type": "iterator", + }), + ("new Proxy({}, {})", { + "type": "proxy" + }), + # generator + ("(function*() { yield 'a'; })", { + "type": "generator" + }), ("Promise.resolve()", {"type": "promise", },), ("new Int32Array()", {"type": "typedarray", },), ("new ArrayBuffer()", {"type": "arraybuffer", },), diff --git a/webdriver/tests/bidi/script/call_function/result.py b/webdriver/tests/bidi/script/call_function/result.py index df989c407ee7db..8546776cb6aece 100644 --- a/webdriver/tests/bidi/script/call_function/result.py +++ b/webdriver/tests/bidi/script/call_function/result.py @@ -4,6 +4,7 @@ pytestmark = pytest.mark.asyncio + @pytest.mark.parametrize("await_promise", [True, False]) @pytest.mark.parametrize( "expression, expected", @@ -119,9 +120,16 @@ async def test_primitive_values(bidi_session, top_context, await_promise, expres ("new WeakMap()", {"type": "weakmap"}), ("new WeakSet()", {"type": "weakset"}), ("new Error('SOME_ERROR_TEXT')", {"type": "error"}), - # TODO(sadym): add `iterator` test. - # TODO(sadym): add `generator` test. - # TODO(sadym): add `proxy` test. + ("([1, 2][Symbol.iterator]())", { + "type": "iterator", + }), + ("new Proxy({}, {})", { + "type": "proxy" + }), + # generator + ("(function*() { yield 'a'; })", { + "type": "generator" + }), ("new Int32Array()", {"type": "typedarray"}), ("new ArrayBuffer()", {"type": "arraybuffer"}), ("window", {"type": "window"}), diff --git a/webdriver/tests/bidi/script/evaluate/exception_details.py b/webdriver/tests/bidi/script/evaluate/exception_details.py index fa5d5c4ae2ce34..b14b6122223125 100644 --- a/webdriver/tests/bidi/script/evaluate/exception_details.py +++ b/webdriver/tests/bidi/script/evaluate/exception_details.py @@ -131,9 +131,16 @@ async def test_invalid_script(bidi_session, top_context): ("new WeakMap()", {"type": "weakmap", },), ("new WeakSet()", {"type": "weakset", },), ("new Error('SOME_ERROR_TEXT')", {"type": "error"},), - # TODO(sadym): add `iterator` test. - # TODO(sadym): add `generator` test. - # TODO(sadym): add `proxy` test. + ("([1, 2][Symbol.iterator]())", { + "type": "iterator", + }), + ("new Proxy({}, {})", { + "type": "proxy" + }), + # generator + ("(function*() { yield 'a'; })", { + "type": "generator" + }), ("Promise.resolve()", {"type": "promise", },), ("new Int32Array()", {"type": "typedarray", },), ("new ArrayBuffer()", {"type": "arraybuffer", },), diff --git a/webdriver/tests/bidi/script/evaluate/result.py b/webdriver/tests/bidi/script/evaluate/result.py index faea80a86b60fa..a86f2f495d1a74 100644 --- a/webdriver/tests/bidi/script/evaluate/result.py +++ b/webdriver/tests/bidi/script/evaluate/result.py @@ -122,9 +122,16 @@ async def test_primitive_values(bidi_session, top_context, expression, expected) ("new WeakMap()", {"type": "weakmap", },), ("new WeakSet()", {"type": "weakset", },), ("new Error('SOME_ERROR_TEXT')", {"type": "error"},), - # TODO(sadym): add `iterator` test. - # TODO(sadym): add `generator` test. - # TODO(sadym): add `proxy` test. + ("([1, 2][Symbol.iterator]())", { + "type": "iterator", + }), + ("new Proxy({}, {})", { + "type": "proxy" + }), + # generator + ("(function*() { yield 'a'; })", { + "type": "generator" + }), ("Promise.resolve()", {"type": "promise", },), ("new Int32Array()", {"type": "typedarray", },), ("new ArrayBuffer()", {"type": "arraybuffer", },),