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

VERIFIED FIXED in mozilla2.0b7

Status

()

Toolkit
Add-ons Manager
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: whimboo, Assigned: mossop)

Tracking

Trunk
mozilla2.0b7
Points:
---
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
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.
(Reporter)

Updated

7 years ago
blocking2.0: --- → ?
(Assignee)

Updated

7 years ago
blocking2.0: ? → betaN+
(Reporter)

Updated

7 years ago
Depends on: 586591
(Assignee)

Comment 1

7 years ago
Created attachment 478598 [details] [diff] [review]
patch rev 1

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)
(Assignee)

Updated

7 years ago
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]
(Assignee)

Comment 3

7 years ago
(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.
(Assignee)

Comment 4

7 years ago
Landed: http://hg.mozilla.org/mozilla-central/rev/59f185971b5c
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch]
Target Milestone: --- → mozilla2.0b8
(Reporter)

Comment 5

7 years ago
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

Updated

7 years ago
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.