Open Bug 2021884 Opened 4 months ago Updated 1 month ago

Start a GeckoEngineSession as soon as possible when starting Fenix with -marionette

Categories

(GeckoView :: General, defect, P3)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: bea, Assigned: bea)

References

Details

Attachments

(1 file)

Marionette waits for the DOMContentLoaded event to be triggered to start anything, but on Fenix that only gets triggered once a GeckoEngineSession is created. I noticed it's created once I click the URL bar, by the FenixSearchMiddleware.

I will send a patch as a suggestion to address this. But I am not sure it's the best way to address the issue and it's just meant to start a discussion.

Assignee: nobody → bea
Status: NEW → ASSIGNED
See Also: → 2021618

Note: This patch + 2021618 make it possible to run marionette tests on Android as long as you do the environment setup manually.

Step by step:

# Build geckoview
./mach build
# Build Fenix
./mach gradle [-PdisableOptimze] fenix:assembleDebug
# Start an emulator -- ./mach install will also do it for you
./mach android-emulator
# Forward the Marionette port
adb forward 2828
# Push the geckoview-config file, enabling Marionette
adb push adb push org.mozilla.fenix.debug-geckoview-config.yaml /data/local/tmp/ -- this is where `--marionette` is set
# Install the app
/mach install --app org.mozilla.fenix.debug
# Start the app
adb shell am start -n org.mozilla.fenix.debug/org.mozilla.gecko.BrowserApp
# Finally, run a test
./mach marionette-test --app fennec --address 127.0.0.1:2828 [a-test]
Component: Marionette → General
Product: Remote Protocol → GeckoView

The severity field is not set for this bug.
:owlish, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bugzeeeeee)
Severity: -- → S3
Flags: needinfo?(bugzeeeeee)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: