Bug 1826706 - [bidi] Throw a NoSuchFrameError in input.performActions if no context is found r=webdriver-reviewers,whimboo

Per spec, we should throw if the provided context is not found.

Differential Revision: https://phabricator.services.mozilla.com/D174847
This commit is contained in:
Julian Descottes 2023-04-06 14:49:49 +00:00
parent 897cfb2a6a
commit bbe0a46e89

View File

@ -27,6 +27,13 @@ class InputModule extends Module {
); );
const context = lazy.TabManager.getBrowsingContextById(contextId); const context = lazy.TabManager.getBrowsingContextById(contextId);
if (!context) {
throw new lazy.error.NoSuchFrameError(
`Browsing context with id ${contextId} not found`
);
}
// Bug 1821460: Fetch top-level browsing context.
await this.messageHandler.forwardCommand({ await this.messageHandler.forwardCommand({
moduleName: "input", moduleName: "input",