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•2 years ago
|
Comment 1•2 years ago
|
||
Your summary looks pretty good to me! If you or anybody have specific questions feel free to ni me.
Reporter | ||
Comment 2•2 years 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•2 years ago
|
||
(Agi says Henrik says) about one-third of WebDriver tests can't run on Android because of this bug.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Olivia said she will work on this bug for 104.
Comment 5•2 years ago
|
||
105
Olivia says this bug is now unblocked.
Assignee | ||
Comment 6•2 years 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•2 years ago
|
Updated•2 years 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•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Description
•