Add a hook for ServiceWorkerDelegate to allow testing code from Gecko to open a new tab
Categories
(GeckoView :: General, enhancement, P1)
Tracking
(firefox103 wontfix, firefox104 wontfix, firefox105 wontfix, firefox106 fixed)
People
(Reporter: whimboo, Assigned: olivia)
References
Details
(Whiteboard: [geckoview:m104] [geckoview:m105] [geckoview:m106])
Attachments
(1 file)
Over on bug 1506782 we need a way to open a new tab in all the GeckoView applications for our remote protocols supporting WebDriver (Marionette and Remote Agent).
As discussed with Agi this could be done via a specific WebExtension or by allowing various testing code to share a ServiceWorkerDelegate. The latter would be more ergonomic given that it would automatically support all the different applications, and won't require an installation of the WebExtension delegate in each of these.
The ServiceWorkerDelegate is implemented in C++ and as such the requested code would need some Javascript plumbing similar to this code, but with a different type like GeckoTest:NewTab
.
Then it would have to be listened for here:
https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java#308
And do something like this:
https://searchfox.org/mozilla-central/rev/c6620104602decf1af7c6a9f78692426db6a5da2/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionController.java#1012-1045
With that we might also get rid of the test-runner-support
web-extension and delegate, and let it re-use the same service worker delegate.
Agi, please update the summary and add more details if something is wrong or missing.
Thanks a lot!
Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Your summary looks pretty good to me! If you or anybody have specific questions feel free to ni me.
Reporter | ||
Comment 2•1 year ago
|
||
Thanks Agi. Do you think that the GeckoView team could help out with getting this request implemented? We would appreciate that. Thanks!
Comment 3•1 year ago
|
||
(Agi says Henrik says) about one-third of WebDriver tests can't run on Android because of this bug.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Olivia said she will work on this bug for 104.
Comment 5•1 year ago
|
||
105
Olivia says this bug is now unblocked.
Assignee | ||
Comment 6•1 year ago
|
||
Adds event "GeckoView:Test:NewTab”, which allow testers to create tabs.
GeckoViewTestUtils.jsm
sends the event from the JavaScript side for
use in testing.
A ServiceWorkerDelegate
is required to be set for the
GeckoRuntime
to use these events, which was setup on the test
runner.
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by ohall@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/842f23326e60 GeckoView Open Tabs Test Utility r=geckoview-reviewers,owlish
Comment 8•1 year ago
|
||
bugherder |
Assignee | ||
Updated•1 year ago
|
Description
•