Closed Bug 1691402 Opened 3 years ago Closed 3 years ago

Extract session specific code from driver.js into a dedicated session module

Categories

(Remote Protocol :: Marionette, task, P2)

Default
task
Points:
2

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 3 open bugs, )

Details

(Whiteboard: [bidi-m1-mvp])

Attachments

(3 files)

The current implementation of Marionette embeds most of the session handling code within the GeckoDriver class of driver.js. To be able to share that specific code with the WebDriver BiDi implementation (/remote), all this code needs to be extracted into its own session module like session.js.

Julian, could you maybe have a look at driver.js and figure out how much work this would be? I assume we might have to split this bug into individual smaller pieces.

Flags: needinfo?(jdescottes)
Blocks: 1691399
Blocks: 1691414
Points: --- → 13
Blocks: 1691047

I'm going to take that now given that it's partly blocking me.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Flags: needinfo?(jdescottes)
Blocks: 1660046
Blocks: 1683193
Blocks: 1696425

This patch creates a new module for the WebDriver session
specific implementation. It no longer requires session data
like capabilities to be directly bound to the GeckoDriver class.

The work here was actually simple, and only took a bit of time. It was mostly a refactoring of code. As such I would drop the points from 13 to just 2.

Points: 13 → 2

If there is no active WebDriver session the code
related to deleting a session, and resetting other
state should not be run again.

This could actually happen when the
"Marionette:Quit" command is called, which itself
destroys the session, and the follwing socket
connection drop tries to run it again.

Depends on D108168

Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c8e4a03fd2f
[marionette] Add session module for WebDriver session. r=marionette-reviewers,jdescottes,jgraham
https://hg.mozilla.org/integration/autoland/rev/5f9c65613b0d
[marionette] Move current browsing context members to WebDriver session. r=marionette-reviewers,jdescottes,jgraham
https://hg.mozilla.org/integration/autoland/rev/1f9f47742739
[marionette] Don't try to destroy a non-existent session. r=marionette-reviewers,jdescottes,jgraham
Blocks: 1697159

(In reply to Noemi Erli[:noemi_erli] from comment #7)

Backed out 3 changesets (Bug 1691402) for causing failures in test_session.js CLOSED TREE

Failure log: https://treeherder.mozilla.org/logviewer?job_id=333446143&repo=autoland&lineNumber=1961
https://treeherder.mozilla.org/logviewer?job_id=333444413&repo=autoland&lineNumber=2455

No, this is for bug 1697159 but not this one. I'm going to land the set of patches on this bug again, but the appinfo one later once issues are fixed.

Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bf7dc5dcf31
[marionette] Add session module for WebDriver session. r=marionette-reviewers,jdescottes,jgraham
https://hg.mozilla.org/integration/autoland/rev/b02976d0757b
[marionette] Move current browsing context members to WebDriver session. r=marionette-reviewers,jdescottes,jgraham
https://hg.mozilla.org/integration/autoland/rev/46da1dd655f9
[marionette] Don't try to destroy a non-existent session. r=marionette-reviewers,jdescottes,jgraham
Regressions: 1710370
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: