Closed Bug 1162531 Opened 8 years ago Closed 8 years ago

Add a test for distribution add-on installations

Categories

(Firefox for Android Graveyard :: Add-on Manager, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(1 file)

I discovered this while working on bug 1004517. I suspect there is some race between add-on installation and initializing our home config listeners.
What's happening here is that distribution add-ons never appear to have their startup method called with the ADDON_INSTALL reason, so my home panel add-on didn't install the panel.

To work around this, I can just store a pref in the add-on to know whether or not to install the panel. However, it seems like a bug that the install logic never fires for these add-ons, since that would break bundling other bootstrap add-ons that have special install logic.

Regardless, I will add a testcase to testDistribution to cover add-ons, since we don't currently have that.
This is fixed with my patch for bug 923581. But I will add a test here.
Depends on: 923581
Summary: Home panels in distribution add-ons do not appear in about:home → Add a test for distribution add-on installations
Comment on attachment 8605449 [details] [diff] [review]
Add test for add-ons in distributions

Review of attachment 8605449 [details] [diff] [review]:
-----------------------------------------------------------------

> Modified Binary File: mobile/android/tests/browser/robocop/assets/mock-package.zip

I trust you!

::: mobile/android/tests/browser/robocop/testDistribution.java
@@ +376,5 @@
> +
> +            JSONObject data = null;
> +            int requestId = -1;
> +
> +            // Wait until we get the correct "Preferences:Data" event

This code is shared with checkPreferences; refactor out a `getPrefs` private method. Array of names in, JSONObject out.
Attachment #8605449 - Flags: review?(rnewman) → review+
Status: NEW → ASSIGNED
Version: Firefox 35 → Trunk
https://hg.mozilla.org/mozilla-central/rev/c113a1280020
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.