Closed Bug 1726800 Opened 3 years ago Closed 3 years ago

Finalize ModuleRegistry implementation

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
2

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [bidi-m2-mvp] )

Attachments

(2 files, 1 obsolete file)

We introduced a simple ModuleRegistry in https://bugzilla.mozilla.org/show_bug.cgi?id=1694144 in order to reference all existing modules and avoid test failures from browser/base/content/test/static/browser_all_files_referenced.js

But in the long run, we would like ModuleRegistry to have more responsibilities:

  • check if a given module has an implementation for a given context+destination
  • check list of commands supported by a module
  • check list of events supported by a module

The goal of this bug is to improve the current ModuleRegistry to match the description above. This should make error reporting easier, so this blocks Bug 1724411.

It will probably also make Bug 1723592 redundant.

The ModuleRegistry can now be used to import BiDi modules.
The ModuleCache can be queried to get all the relevant modules for a moduleName+destination pair.
Error messages have been improved and are verified with a dedicated test

Blocks: 1733242
Points: --- → 2
Priority: -- → P2
Whiteboard: [bidi-m2-mvp]
Attachment #9238004 - Attachment description: Bug 1726800 - [remote] Finalize ModuleRegistry implementation → Bug 1726800 - [remote] Verify commands as early as possible in MessageHandler

Depends on D123655

Add a dedicated Errors module to remote/shared/messagehandler, similar to shared/webdriver/Errors.jsm
Errors thrown from content process MessageHandler are serialized before being forwarded to the parent process.

We should probably make all errors inherit from a generic RemoteError class which would support the same serialization/deserialization API

Attachment #9243559 - Attachment is obsolete: true
Blocks: 1735316
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4490d6e92109 [remote] Use dedicated error class for command errors in MessageHandler r=webdriver-reviewers,whimboo https://hg.mozilla.org/integration/autoland/rev/a3ac7e932f3a [remote] Verify commands as early as possible in MessageHandler r=webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: