Closed Bug 2021832 Opened 3 months ago Closed 2 months ago

Remove special cases when converting WebDriver types to Marionette

Categories

(Testing :: geckodriver, task, P3)

task

Tracking

(firefox150 fixed)

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: Sasha, Assigned: jgraham)

References

Details

(Whiteboard: [webdriver:m19][webdriver:external])

Attachments

(1 file)

In the scope of bug 1925272, we introduced a helper function, "serialize_to_map" to serialize the parameters when sending Marionette commands. We can now refactor other commands to use it instead of serializing for each command manually.

We only need the special-case path in
MarionetteCommand::from_webdriver_message if we don't have a
marionettte_rs::webdriver::Command variant for the the marionette
command, which is generally only the case for complex commands where
defining parallel types was to much overhead.

I started writing a comment about why I didn't like this idea, but ended up with a patch that does what I think we should do instead, which is to follow the pattern where try_convert_to_marionette (now just called to_marionette) handles all the input types, and we avoid having some that go through a different special cased codepath.

Assignee: nobody → james
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [webdriver:m19][webdriver:external]
Pushed by james@hoppipolla.co.uk: https://github.com/mozilla-firefox/firefox/commit/3f2ee33a87d6 https://hg.mozilla.org/integration/autoland/rev/150280446fd0 Remove special cases when converting types to marionette r=geckodriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Blocks: 1938333
Summary: Use "serialize_to_map" instead of manual serialization when sending Marionette commands → Remove special cases when converting WebDriver types to Marionette
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: