Closed Bug 1508442 Opened 6 years ago Closed 6 years ago

Give empty protected constructors to field-only GV classes

Categories

(GeckoView :: General, enhancement, P2)

enhancement

Tracking

(geckoview64 wontfix, firefox64 wontfix, firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
geckoview64 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: agi, Assigned: agi)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

read-only field-only classes like |SecurityInformation| are really hard to use in tests because they don't have a protected constructor. We should give them a dummy empty protected constructor that embedders can use to create Mock classes.
Blocks: 1508977
This adds a dummy `protected`, empty constructor to all field-only classes that don't have one or can't because the constructor uses a private API. This will allow embedders to mock our field-only classes or construct them without having to use reflection.
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/093ef9c7cb94 add protected constructor to field-only classes in GeckoView. r=snorp,esawin
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
64=wontfix because we don't need to uplift this constructor change to 64 Beta.
status-geckoview64=wontfix
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 65 → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: