Closed Bug 1162531 Opened 6 years ago Closed 6 years ago
Add a test for distribution add-on installations
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
https://treeherder.mozilla.org/#/jobs?repo=try&revision=349a238f2c47 I added this add-on to our mock distribution: https://github.com/leibovic/distribution-test
Attachment #8605449 - Flags: review?(rnewman)
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+
You need to log in before you can comment on or make changes to this bug.