Closed Bug 1771012 Opened 2 years ago Closed 2 years ago

Add a hook for ServiceWorkerDelegate to allow testing code from Gecko to open a new tab


(GeckoView :: General, enhancement, P1)



(firefox103 wontfix, firefox104 wontfix, firefox105 wontfix, firefox106 fixed)

106 Branch
Tracking Status
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- fixed


(Reporter: whimboo, Assigned: olivia)



(Whiteboard: [geckoview:m104] [geckoview:m105] [geckoview:m106])


(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:

And do something like this:

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!

Flags: needinfo?(agi)

Your summary looks pretty good to me! If you or anybody have specific questions feel free to ni me.

Flags: needinfo?(agi)

Thanks Agi. Do you think that the GeckoView team could help out with getting this request implemented? We would appreciate that. Thanks!

Flags: needinfo?(agi)

(Agi says Henrik says) about one-third of WebDriver tests can't run on Android because of this bug.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [geckoview:m104?]
Flags: needinfo?(agi)

Olivia said she will work on this bug for 104.

Assignee: nobody → ohall
Priority: P2 → P1
Whiteboard: [geckoview:m104?] → [geckoview:m104]


Olivia says this bug is now unblocked.

Whiteboard: [geckoview:m104] → [geckoview:m104] [geckoview:m105]

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

Attachment #9287266 - Attachment description: WIP: Bug 1771012 - GeckoView Open Tabs Test Utility → Bug 1771012 - GeckoView Open Tabs Test Utility
Whiteboard: [geckoview:m104] [geckoview:m105] → [geckoview:m104] [geckoview:m105] [geckoview:m106]
Pushed by
GeckoView Open Tabs Test Utility r=geckoview-reviewers,owlish
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Blocks: 1891008
You need to log in before you can comment on or make changes to this bug.