"script.callFunction" has to fail with "no such handle" error if the handle of an object as passed as argument is unknown
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(firefox113 fixed)
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: whimboo, Assigned: sairaabdullapa, Mentored)
References
()
Details
(Whiteboard: [webdriver:backlog][lang=js], [wptsync upstream] [webdriver:relnote])
Attachments
(2 files)
As per the WebDriver BiDi spec the handle
of an object needs to be known if given. If it's not known within the given Realm, a no such handle
error needs to be raised.
Right now we raise an invalid argument
error instead. When fixing that we need browser chrome as well as wdspec tests.
Reporter | ||
Updated•3 months ago
|
Reporter | ||
Updated•3 months ago
|
Reporter | ||
Comment 2•2 months ago
|
||
Sure, and thank you for your interest! In the following some information in how to get this fixed.
An example of using a handle
can be found in the webdriver BiDi tests for callFunction
within arguments.py
. It basically means that a strong reference of a Javascript object gets created within the browser by some script evaluation, which then later on can be referred via callFunction
.
Steps to do here would be:
-
Create a new test within invalid.py right under the test
test_params_arguments_handle_invalid_type
and name ittest_params_arguments_handle_unknown_value
. Here a string value needs to be passed ashandle
tocallFunction
that is randomly set, eg.foo
. -
Run the given test by specifying the exact path and notice that it doesn't fail with a
no such handle
failure butinvalid argument
. -
Fix the problem with the deserialization in RemoteValue.sys.mjs so that the correct error is thrown. It needs to behave similar as
InvalidArgumentError
. -
Ensure to also add the new error type to the WebDriver BiDi Python client so that the test can correctly assert the expected error type.
If you have questions don't hesitate to ask, or even better join us on Matrix in the webdriver channel.
Updated•2 months ago
|
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/513e167dd843 'script.callFunction' has to fail with 'no such handle' error if the handle of an object as passed as argument is unknown. r=whimboo,webdriver-reviewers
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39404 for changes under testing/web-platform/tests
Updated•2 months ago
|
Reporter | ||
Comment 6•2 months ago
|
||
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b9301f49922 [webdriver-bidi] Fix broken object handle tests in browser_RemoteValue.js. r=webdriver-reviewers,jdescottes
Comment 8•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/513e167dd843
https://hg.mozilla.org/mozilla-central/rev/3b9301f49922
Upstream PR was closed without merging
Upstream PR merged by jgraham
Updated•1 month ago
|
Description
•