bug 1127476 point plugins to update check not blocklist page r?aswan draft
authorAndy McKay <amckay@mozilla.com>
Sat, 16 Apr 2016 10:57:26 -0700
changeset 352284 b05f5919253bbafa658862e784142470286b4dd3
parent 352235 ded7cf683d5a66df2c6780ad23233497ce4aed59
child 518633 d8aedb871dba39f61685ca79a80b6ad49b237a9d
push id15673
push userbmo:amckay@mozilla.com
push dateSat, 16 Apr 2016 20:12:46 +0000
reviewersaswan
bugs1127476
milestone48.0a1
bug 1127476 point plugins to update check not blocklist page r?aswan MozReview-Commit-ID: 6CgvYYTWp3J
toolkit/mozapps/extensions/content/extensions.xml
toolkit/mozapps/extensions/test/browser/browser_list.js
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1288,17 +1288,17 @@
               this._warningBtn.hidden = true;
             } else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) {
               this.setAttribute("notification", "error");
               this._error.textContent = gStrings.ext.formatStringFromName(
                 "notification.vulnerableUpdatable",
                 [this.mAddon.name], 1
               );
               this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableUpdatable.link");
-              this._errorLink.href = this.mAddon.blocklistURL;
+              this._errorLink.href = Services.urlFormatter.formatURLPref("plugins.update.url");
               this._errorLink.hidden = false;
             } else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) {
               this.setAttribute("notification", "error");
               this._error.textContent = gStrings.ext.formatStringFromName(
                 "notification.vulnerableNoUpdate",
                 [this.mAddon.name], 1
               );
               this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link");
--- a/toolkit/mozapps/extensions/test/browser/browser_list.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_list.js
@@ -83,17 +83,16 @@ add_task(function*() {
     operationsRequiringRestart: AddonManager.OP_NEEDS_RESTART_NONE
   }, {
     id: "addon7@tests.mozilla.org",
     blocklistURL: "http://example.com/addon7@tests.mozilla.org",
     name: "Test add-on 7",
     blocklistState: Ci.nsIBlocklistService.STATE_OUTDATED,
   }, {
     id: "addon8@tests.mozilla.org",
-    blocklistURL: "http://example.com/addon8@tests.mozilla.org",
     name: "Test add-on 8",
     blocklistState: Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE,
   }, {
     id: "addon9@tests.mozilla.org",
     blocklistURL: "http://example.com/addon9@tests.mozilla.org",
     name: "Test add-on 9",
     blocklistState: Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE,
   }, {
@@ -390,17 +389,17 @@ add_task(function*() {
   is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible");
 
   is_element_hidden(get_node(addon, "warning"), "Warning message should be hidden");
   is_element_hidden(get_node(addon, "warning-link"), "Warning link should be hidden");
   is_element_visible(get_node(addon, "error"), "Error message should be visible");
   is(get_node(addon, "error").textContent, "Test add-on 8 is known to be vulnerable and should be updated.", "Error message should be correct");
   is_element_visible(get_node(addon, "error-link"), "Error link should be visible");
   is(get_node(addon, "error-link").value, "Update Now", "Error link text should be correct");
-  is(get_node(addon, "error-link").href, "http://example.com/addon8@tests.mozilla.org", "Error link should be correct");
+  is(get_node(addon, "error-link").href, gPluginURL, "Error link should be correct");
   is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden");
 
   info("Addon 9");
   addon = items["Test add-on 9"];
   addon.parentNode.ensureElementIsVisible(addon);
   ({ name, version } = yield get_tooltip_info(addon));
   is(get_node(addon, "name").value, "Test add-on 9", "Name should be correct");
   is(name, "Test add-on 9", "Tooltip name should be correct");