Closed Bug 595915 Opened 14 years ago Closed 14 years ago

Additional add-on information from AMO should be downloaded when extensions get installed.

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: whimboo, Assigned: mossop)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b6pre) Gecko/20100911 Firefox/4.0b6pre

As mentioned in a couple of bugs right now, it's kinda inconsistent when additional information, i.e. the contribute button or screenshots, are displayed in the details pane. You will have to wait for an unknown time until you will see those entries. I'm sure that users will be confused by that behavior and also makes the UI inconsistent.

IMO we should really trigger a download of the information from AMO when an extension gets installed.
blocking2.0: --- → ?
blocking2.0: ? → betaN+
Depends on: 586591
Attached patch patch rev 1Splinter Review
Fairly straightforward, just asks the repository to cache the data for the add-on when we load its manifest. Also turns off caching by default for the test runs.

This patch will only apply on top of bug 596336.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #478598 - Flags: review?(robert.bugzilla)
Whiteboard: [has patch][needs review rs]
Comment on attachment 478598 [details] [diff] [review]
patch rev 1

>diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_install.js b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
>--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
>+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
>...
>+// Do the same again to make sure it works when the data is already in the cache
>+function run_test_18() {
>+  let url = "http://localhost:4444/addons/test_install2_1.xpi";
>+  AddonManager.getInstallForURL(url, function(aInstall) {
>+    aInstall.addListener({
>+      onInstallEnded: function(aInstall, aAddon) {
>+        do_check_eq(aAddon.fullDescription, "Repository description");
>+
>+        restartManager();
>+
>+        AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
>+          do_check_eq(a2.fullDescription, "Repository description");
>+
>+          a2.uninstall();
>+          restartManager();
>+
>+          Services.prefs.setBoolPref("extensions.getAddons.cache.enabled", false);
clearUserPref?

r=me either way
Attachment #478598 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [has patch][needs review rs] → [has patch]
(In reply to comment #2)
> Comment on attachment 478598 [details] [diff] [review]
> patch rev 1
> 
> >diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_install.js b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
> >--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
> >+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
> >...
> >+// Do the same again to make sure it works when the data is already in the cache
> >+function run_test_18() {
> >+  let url = "http://localhost:4444/addons/test_install2_1.xpi";
> >+  AddonManager.getInstallForURL(url, function(aInstall) {
> >+    aInstall.addListener({
> >+      onInstallEnded: function(aInstall, aAddon) {
> >+        do_check_eq(aAddon.fullDescription, "Repository description");
> >+
> >+        restartManager();
> >+
> >+        AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
> >+          do_check_eq(a2.fullDescription, "Repository description");
> >+
> >+          a2.uninstall();
> >+          restartManager();
> >+
> >+          Services.prefs.setBoolPref("extensions.getAddons.cache.enabled", false);
> clearUserPref?

Actually the default is true, we want to change it back to false so it isn't used normally during the rest of the test.
Landed: http://hg.mozilla.org/mozilla-central/rev/59f185971b5c
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch]
Target Milestone: --- → mozilla2.0b8
Thanks Dave! That looks great with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8pre) Gecko/20101023 Firefox/4.0b8pre

One question, when do we purge old and outdated entries in the addons.sqlite database?
Status: RESOLVED → VERIFIED
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.