Throw unknown command error when calling an unexpected bidi command
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox97 fixed)
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
(Whiteboard: [bidi-m3-mvp], [wptsync upstream])
Attachments
(2 files)
From https://bugzilla.mozilla.org/show_bug.cgi?id=1731576#c15
(In reply to James Graham [:jgraham] from Bug 1731576 comment #15)
From a spec perspective this will respond with an
unknown command
error, see https://w3c.github.io/webdriver-bidi/#handle-an-incoming-message.I think we want to be able to write tests that check that we handle unknown commands correctly without always having logspam, so it might make sense to change the way we log in this case.
Right now, when an unsupported command is called, the message handler will throw an internal error "UnsupportedCommandError" https://searchfox.org/mozilla-central/rev/5e15e00fa247cba5b765727496619bf9010ed162/remote/shared/messagehandler/Errors.jsm#72
We should translate this to a webdriver error "UnknownCommandError" https://searchfox.org/mozilla-central/rev/5e15e00fa247cba5b765727496619bf9010ed162/remote/shared/webdriver/Errors.jsm#497
This can probably be handled in webdriver/Session.jsm https://searchfox.org/mozilla-central/rev/5e15e00fa247cba5b765727496619bf9010ed162/remote/shared/webdriver/Session.jsm#223
wdspec tests should be added to check that we throw the expected error.
For reference here is what we do in Marionette:
https://searchfox.org/mozilla-central/rev/5e15e00fa247cba5b765727496619bf9010ed162/remote/marionette/server.js#296-300
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D134247
Assignee | ||
Updated•3 years ago
|
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/77ffa849a6d2
https://hg.mozilla.org/mozilla-central/rev/37149f29af6d
Description
•