Closed Bug 1972228 Opened 1 year ago Closed 1 year ago

Add some test coverage to keep data collection permissions in sync with gecko

Categories

(WebExtensions :: General, task, P2)

task

Tracking

(firefox142 fixed)

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: willdurand, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(1 external file)

This is about adding a test to make sure the list of data collection permissions in gecko and Android are kept in sync. This is mainly about the localized strings for these permissions, since the permissions themselves are defined once in the gecko layer.

This patch allows us to keep the data collection permissions in sync
between Gecko, GeckoView and Android Components.

First, A new test helper has been added to the GeckoView layer so that
we can retrieve the list of permission names defined in the (toolkit)
WebExtensions JSON schemas.

In GeckoView, a new test guarantees that the set of data collection
permissions known by GeckoView (via the DATA_COLLECTION_PERMISSIONS
property) is the same as the one defined at the toolkit level. Since
data collection permissions might change over time, this will ensure
that we keep parity between Gecko and GeckoView.

The main reason for keeping all these permissions in sync is to make
sure Firefox for Android will get proper support, including localized
strings, etc. That's why the second part of this patch exposes the
GeckoView WebExtension.DATA_COLLECTION_PERMISSIONS property to the
GeckoWebExtension class in Android-Components, and a new test-only
dependency has been added to the feature-addons component, which is
where localized strings for data collection permissions are defined.

Now I am not entirely sure about this, but I cannot think of a different
way to cover the list of localized strings without duplicating the list
of permission names like it was done before this patch.

I opted to add a new property to the browser-engine-gecko so that we
don't need to deal with a GeckoView dependency in the feature-addons
(mainly because I doubt it's a trivial dependency declaration compared
to other libraries/components).

Assignee: nobody → wdurand
Attachment #9494853 - Attachment description: WIP: Bug 1972228 - Add some test coverage to keep data collection permissions in sync with gecko → Bug 1972228 - Add some test coverage to keep data collection permissions in sync with gecko. r?#geckoview-reviewers!,rpl!,jonalmeida!,nalexander!
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P2
Pushed by wdurand@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b66c574be225 https://hg.mozilla.org/integration/autoland/rev/08f289ae511d Add some test coverage to keep data collection permissions in sync with gecko. r=rpl,jonalmeida,nalexander,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,android-addons-reviewers,owlish
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e0df5d3724cf https://hg.mozilla.org/integration/autoland/rev/bd365dd58680 Revert "Bug 1972228 - Add some test coverage to keep data collection permissions in sync with gecko. r=rpl,jonalmeida,nalexander,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,android-addons-reviewers,owlish" for causing junit failures.

Reverted this because it was causing junit failures.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.AutocompleteTest#loginSelectAccept | org.mozilla.geckoview.test.rule.GeckoSessionTestRule$RejectedPromiseException: InvalidStateError: An exception was thrown
Flags: needinfo?(wdurand)
Flags: needinfo?(wdurand)
Pushed by wdurand@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7fb5f3472c7d https://hg.mozilla.org/integration/autoland/rev/f433953edaa9 Add some test coverage to keep data collection permissions in sync with gecko. r=rpl,jonalmeida,nalexander,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,android-addons-reviewers,owlish
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eea4be598f80 https://hg.mozilla.org/integration/autoland/rev/7cb17629558e Revert "Bug 1972228 - Add some test coverage to keep data collection permissions in sync with gecko. r=rpl,jonalmeida,nalexander,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,android-addons-reviewers,owlish" for causing junit failures @autocompleteTest#loginSelectAccept.

Backed out for causing junit failures @AutocompleteTest#loginSelectAccept.

Flags: needinfo?(wdurand)
Pushed by wdurand@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9a2d93eb757a https://hg.mozilla.org/integration/autoland/rev/679686be4d7c Add some test coverage to keep data collection permissions in sync with gecko. r=rpl,jonalmeida,nalexander,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,android-addons-reviewers,owlish
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Flags: needinfo?(wdurand)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: