| author | Benjamin Smedberg <benjamin@smedbergs.us> |
| Fri, 01 Jul 2016 11:01:07 -0400 | |
| changeset 304560 | f7a95ad1275001fa5ef8028fa557d89f6528ad43 |
| parent 304559 | 9224d883dbb17cef1406ceb4251d3008bbc18302 |
| child 304561 | afbc3291c261f1b486b5da51aa9cfd9acc39e7cd |
| push id | 30432 |
| push user | cbook@mozilla.com |
| push date | Tue, 12 Jul 2016 08:58:43 +0000 |
| treeherder | mozilla-central@aac8ff1024c5 [default view] [failures only] |
| perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
| reviewers | Gijs, mconley |
| bugs | 1277905 |
| milestone | 50.0a1 |
| first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
| last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -620,19 +620,16 @@ pref("network.protocol-handler.expose.nn pref("accessibility.typeaheadfind", false); pref("accessibility.typeaheadfind.timeout", 5000); pref("accessibility.typeaheadfind.linksonly", false); pref("accessibility.typeaheadfind.flashBar", 1); // Tracks when accessibility is loaded into the previous session. pref("accessibility.loadedInLastSession", false); -pref("plugins.update.url", "https://www.mozilla.org/%LOCALE%/plugincheck/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=plugincheck-update"); -pref("plugins.update.notifyUser", false); - pref("plugins.click_to_play", true); pref("plugins.testmode", false); pref("plugin.default.state", 1); // Plugins bundled in XPIs are enabled by default. pref("plugin.defaultXpi.state", 2);
--- a/browser/base/content/browser-plugins.js +++ b/browser/base/content/browser-plugins.js @@ -67,35 +67,39 @@ var gPluginHandler = { this.submitReport(msg.data.runID, msg.data.keyVals, msg.data.submitURLOptIn); } break; case "PluginContent:LinkClickCallback": switch (msg.data.name) { case "managePlugins": case "openHelpPage": case "openPluginUpdatePage": - this[msg.data.name].apply(this); + this[msg.data.name].call(this, msg.data.pluginTag); break; } break; default: Cu.reportError("gPluginHandler did not expect to handle message " + msg.name); break; } }, // Callback for user clicking on a disabled plugin managePlugins: function () { BrowserOpenAddonsMgr("addons://list/plugin"); }, // Callback for user clicking on the link in a click-to-play plugin // (where the plugin has an update) - openPluginUpdatePage: function () { - openUILinkIn(Services.urlFormatter.formatURLPref("plugins.update.url"), "tab"); + openPluginUpdatePage: function(pluginTag) { + let url = Services.blocklist.getPluginInfoURL(pluginTag); + if (!url) { + url = Services.blocklist.getPluginBlocklistURL(pluginTag); + } + openUILinkIn(url, "tab"); }, submitReport: function submitReport(runID, keyVals, submitURLOptIn) { if (!AppConstants.MOZ_CRASHREPORTER) { return; } Services.prefs.setBoolPref("dom.ipc.plugins.reportCrashURL", submitURLOptIn); PluginCrashReporter.submitCrashReport(runID, keyVals); @@ -239,22 +243,17 @@ var gPluginHandler = { if (pluginData.has(pluginInfo.permissionString)) { continue; } // If a block contains an infoURL, we should always prefer that to the default // URL that we construct in-product, even for other blocklist types. let url = Services.blocklist.getPluginInfoURL(pluginInfo.pluginTag); - if (pluginInfo.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) { - if (!url) { - url = Services.urlFormatter.formatURLPref("plugins.update.url"); - } - } - else if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) { + if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) { if (!url) { url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag); } } else { url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "clicktoplay"; } pluginInfo.detailsLink = url;
--- a/browser/base/content/test/plugins/browser_blocking.js +++ b/browser/base/content/test/plugins/browser_blocking.js @@ -91,18 +91,16 @@ add_task(function* () { "Test 18a, Plugin overlay should exist, not be hidden"); let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink"); Assert.ok(updateLink.style.visibility != "hidden", "Test 18a, Plugin should have an update link"); }); let promise = waitForEvent(gBrowser.tabContainer, "TabOpen", null, true); - let pluginUpdateURL = Services.urlFormatter.formatURLPref("plugins.update.url"); - info(pluginUpdateURL); yield ContentTask.spawn(gTestBrowser, {}, function* () { let doc = content.document; let plugin = doc.getElementById("test"); let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink"); let bounds = updateLink.getBoundingClientRect(); let left = (bounds.left + bounds.right) / 2; let top = (bounds.top + bounds.bottom) / 2;
--- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -166,19 +166,16 @@ XPCOMUtils.defineLazyModuleGetter(this, "resource://gre/modules/WindowsRegistry.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "WindowsUIUtils", "@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils"); XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-service;1", "nsIAlertsService"); -const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser"; -const PREF_PLUGINS_UPDATEURL = "plugins.update.url"; - // Seconds of idle before trying to create a bookmarks backup. const BOOKMARKS_BACKUP_IDLE_TIME_SEC = 8 * 60; // Minimum interval between backups. We try to not create more than one backup // per interval. const BOOKMARKS_BACKUP_MIN_INTERVAL_DAYS = 1; // Maximum interval between backups. If the last backup is older than these // days we will try to create a new one more aggressively. const BOOKMARKS_BACKUP_MAX_INTERVAL_DAYS = 3; @@ -1225,21 +1222,16 @@ BrowserGlue.prototype = { this._showUpdateNotification(); // Load the "more info" page for a locked places.sqlite // This property is set earlier by places-database-locked topic. if (this._isPlacesDatabaseLocked) { this._showPlacesLockedNotificationBox(); } - // If there are plugins installed that are outdated, and the user hasn't - // been warned about them yet, open the plugins update page. - if (Services.prefs.getBoolPref(PREF_PLUGINS_NOTIFYUSER)) - this._showPluginUpdatePage(); - // For any add-ons that were installed disabled and can be enabled offer // them to the user. let win = RecentWindow.getMostRecentBrowserWindow(); AddonManager.getAllAddons(addons => { for (let addon of addons) { // If this add-on has already seen (or seen is undefined for non-XPI // add-ons) then skip it. if (addon.seen !== false) { @@ -1633,27 +1625,16 @@ BrowserGlue.prototype = { AlertsService.showAlertNotification(null, title, text, true, url, clickCallback); } catch (e) { Cu.reportError(e); } }, - _showPluginUpdatePage: function BG__showPluginUpdatePage() { - Services.prefs.setBoolPref(PREF_PLUGINS_NOTIFYUSER, false); - - var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]. - getService(Ci.nsIURLFormatter); - var updateUrl = formatter.formatURLPref(PREF_PLUGINS_UPDATEURL); - - var win = RecentWindow.getMostRecentBrowserWindow(); - win.openUILinkIn(updateUrl, "tab"); - }, - /** * Initialize Places * - imports the bookmarks html file if bookmarks database is empty, try to * restore bookmarks from a JSON backup if the backend indicates that the * database was corrupt. * * These prefs can be set up by the frontend: *
--- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -390,17 +390,19 @@ PluginContent.prototype = { case "PluginBlocklisted": case "PluginOutdated": shouldShowNotification = true; break; case "PluginVulnerableUpdatable": let updateLink = this.getPluginUI(plugin, "checkForUpdatesLink"); - this.addLinkClickCallback(updateLink, "forwardCallback", "openPluginUpdatePage"); + let { pluginTag } = this._getPluginInfo(plugin); + this.addLinkClickCallback(updateLink, "forwardCallback", + "openPluginUpdatePage", pluginTag); /* FALLTHRU */ case "PluginVulnerableNoUpdate": case "PluginClickToPlay": this._handleClickToPlayEvent(plugin); let overlay = this.getPluginUI(plugin, "main"); let pluginName = this._getPluginInfo(plugin).pluginName; let messageString = gNavigatorBundle.formatStringFromName("PluginClickToActivate", [pluginName], 1); @@ -539,18 +541,19 @@ PluginContent.prototype = { hideClickToPlayOverlay: function (plugin) { let overlay = this.getPluginUI(plugin, "main"); if (overlay) { overlay.classList.remove("visible"); } }, // Forward a link click callback to the chrome process. - forwardCallback: function (name) { - this.global.sendAsyncMessage("PluginContent:LinkClickCallback", { name: name }); + forwardCallback: function (name, pluginTag) { + this.global.sendAsyncMessage("PluginContent:LinkClickCallback", + { name, pluginTag }); }, submitReport: function submitReport(plugin) { if (!AppConstants.MOZ_CRASHREPORTER) { return; } if (!plugin) { Cu.reportError("Attempted to submit crash report without an associated plugin.");
--- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2138,18 +2138,16 @@ nsresult nsPluginHost::ScanPluginsDirect } } pluginFiles.Sort(CompareFilesByTime()); nsCOMArray<nsIFile> extensionDirs; GetExtensionDirectories(extensionDirs); - bool warnOutdated = false; - for (int32_t i = (pluginFiles.Length() - 1); i >= 0; i--) { nsCOMPtr<nsIFile>& localfile = pluginFiles[i]; nsString utf16FilePath; rv = localfile->GetPath(utf16FilePath); if (NS_FAILED(rv)) continue; @@ -2239,24 +2237,19 @@ nsresult nsPluginHost::ScanPluginsDirect pluginFile.FreePluginInfo(info); pluginTag->mLibrary = library; uint32_t state; rv = pluginTag->GetBlocklistState(&state); NS_ENSURE_SUCCESS(rv, rv); // If the blocklist says it is risky and we have never seen this // plugin before, then disable it. - // If the blocklist says this is an outdated plugin, warn about - // outdated plugins. if (state == nsIBlocklistService::STATE_SOFTBLOCKED && !seenBefore) { pluginTag->SetEnabledState(nsIPluginTag::STATE_DISABLED); } - if (state == nsIBlocklistService::STATE_OUTDATED && !seenBefore) { - warnOutdated = true; - } // Plugin unloading is tag-based. If we created a new tag and loaded // the library in the process then we want to attempt to unload it here. // Only do this if the pref is set for aggressive unloading. if (UnloadPluginsASAP()) { pluginTag->TryUnloadPlugin(false); } } @@ -2286,20 +2279,16 @@ nsresult nsPluginHost::ScanPluginsDirect // then we're done. if (!aCreatePluginList) { return NS_OK; } AddPluginTag(pluginTag); } - if (warnOutdated) { - Preferences::SetBool("plugins.update.notifyUser", true); - } - return NS_OK; } nsresult nsPluginHost::ScanPluginsDirectoryList(nsISimpleEnumerator *dirEnum, bool aCreatePluginList, bool *aPluginsChanged) { MOZ_ASSERT(XRE_IsParentProcess());
--- a/layout/tools/reftest/remotereftest.py +++ b/layout/tools/reftest/remotereftest.py @@ -249,18 +249,16 @@ class RemoteReftest(RefTest): # Make sure opening about:addons won't hit the network prefs["extensions.webservice.discoverURL"] = "http://127.0.0.1:8888/extensions-dummy/discoveryURL" # Make sure AddonRepository won't hit the network prefs["extensions.getAddons.maxResults"] = 0 prefs["extensions.getAddons.get.url"] = "http://127.0.0.1:8888/extensions-dummy/repositoryGetURL" prefs["extensions.getAddons.getWithPerformance.url"] = "http://127.0.0.1:8888/extensions-dummy/repositoryGetWithPerformanceURL" prefs["extensions.getAddons.search.browseURL"] = "http://127.0.0.1:8888/extensions-dummy/repositoryBrowseURL" prefs["extensions.getAddons.search.url"] = "http://127.0.0.1:8888/extensions-dummy/repositorySearchURL" - # Make sure that opening the plugins check page won't hit the network - prefs["plugins.update.url"] = "http://127.0.0.1:8888/plugins-dummy/updateCheckURL" # Make sure the GMPInstallManager won't hit the network prefs["media.gmp-manager.url.override"] = "http://127.0.0.1:8888/dummy-gmp-manager.xml"; prefs["layout.css.devPixelsPerPx"] = "1.0" # Because Fennec is a little wacky (see bug 1156817) we need to load the # reftest pages at 1.0 zoom, rather than zooming to fit the CSS viewport. prefs["apz.allow_zooming"] = False # Disable skia-gl: see bug 907351
--- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -109,18 +109,16 @@ user_pref("extensions.webservice.discove // Make sure AddonRepository won't hit the network user_pref("extensions.getAddons.maxResults", 0); user_pref("extensions.getAddons.get.url", "http://%(server)s/extensions-dummy/repositoryGetURL"); user_pref("extensions.getAddons.getWithPerformance.url", "http://%(server)s/extensions-dummy/repositoryGetWithPerformanceURL"); user_pref("extensions.getAddons.search.browseURL", "http://%(server)s/extensions-dummy/repositoryBrowseURL"); user_pref("extensions.getAddons.search.url", "http://%(server)s/extensions-dummy/repositorySearchURL"); // Ensure blocklist updates don't hit the network user_pref("services.settings.server", "http://%(server)s/dummy-kinto/v1"); -// Make sure that opening the plugins check page won't hit the network -user_pref("plugins.update.url", "http://%(server)s/plugins-dummy/updateCheckURL"); // Make sure SNTP requests don't hit the network user_pref("network.sntp.pools", "%(server)s"); // We know the SNTP request will fail, since localhost isn't listening on // port 135. The default number of retries (10) is excessive, but retrying // at least once will mean that codepath is still tested in automation. user_pref("network.sntp.maxRetryCount", 1); // Make sure the notification permission migration test doesn't hit the network.
--- a/testing/talos/talos/config.py +++ b/testing/talos/talos/config.py @@ -133,18 +133,16 @@ DEFAULTS = dict( 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy' '/repositoryGetWithPerformanceURL', 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'extensions.getAddons.search.url': 'http://127.0.0.1/extensions-dummy/repositorySearchURL', - 'plugins.update.url': - 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'media.gmp-manager.url': 'http://127.0.0.1/gmpmanager-dummy/update.xml', 'extensions.systemAddon.update.url': 'http://127.0.0.1/dummy-system-addons.xml', 'media.navigator.enabled': True, 'media.peerconnection.enabled': True, 'media.navigator.permission.disabled': True, 'media.capturestream_hints.enabled': True,
--- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -1,12 +1,11 @@ toolkit.jar: % content global %content/global/ contentaccessible=yes % content global-platform %content/global-platform/ platform -% content global-region %content/global-region/ # provide the nsTransferable in nsDragAndDrop.js to extensions that have to # work with Geckos from before 1.9, when there was a separate file % override chrome://global/content/nsTransferable.js chrome://global/content/nsDragAndDrop.js * content/global/license.html content/global/XPCNativeWrapper.js content/global/minimal-xul.css * content/global/xul.css content/global/textbox.css
--- a/toolkit/content/plugins.css +++ b/toolkit/content/plugins.css @@ -25,20 +25,16 @@ div#outside { font-weight: bold; } #noplugs { font-size: x-large; font-weight: bold; } -div#findpluginupdates { - margin-top: 2em; -} - .plugname { margin-top: 2em; margin-bottom: 1em; font-size: large; text-align: start; font-weight: bold; }
--- a/toolkit/content/plugins.html +++ b/toolkit/content/plugins.html @@ -7,17 +7,16 @@ <html> <head> <script type="application/javascript"> "use strict"; var Ci = Components.interfaces; var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService); var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties"); - var regionbundle = strBundleService.createBundle("chrome://global-region/locale/region.properties"); document.writeln("<title>" + pluginsbundle.GetStringFromName("title_label") + "<\/title>"); </script> <link rel="stylesheet" type="text/css" href="chrome://global/content/plugins.css"> <link rel="stylesheet" type="text/css" href="chrome://global/skin/plugins.css"> </head> <body> <div id="outside"> @@ -68,30 +67,16 @@ id = "noplugs"; label = "nopluginsareinstalled_label"; } var enabledplugins = document.createElement("h1"); enabledplugins.setAttribute("id", id); enabledplugins.appendChild(document.createTextNode(pluginsbundle.GetStringFromName(label))); fragment.appendChild(enabledplugins); - // "Find updates for installed plugins at " ... - var findpluginupdates = document.createElement("div"); - findpluginupdates.setAttribute("id", "findpluginupdates"); - findpluginupdates.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("findpluginupdates_label") + " ")); - fragment.appendChild(findpluginupdates); - - // ... "mozilla.com/plugincheck" - var pluginupdates = document.createElement("a"); - pluginupdates.setAttribute("href", regionbundle.GetStringFromName("pluginupdates_url")); - pluginupdates.appendChild(document.createTextNode(regionbundle.GetStringFromName("pluginupdates_label"))); - findpluginupdates.appendChild(pluginupdates); - - fragment.appendChild(document.createElement("hr")); - var stateNames = {}; ["STATE_SOFTBLOCKED", "STATE_BLOCKED", "STATE_OUTDATED", "STATE_VULNERABLE_UPDATE_AVAILABLE", "STATE_VULNERABLE_NO_UPDATE"].forEach(function(label) { stateNames[Ci.nsIBlocklistService[label]] = label; });
deleted file mode 100644 --- a/toolkit/locales/en-US/chrome/global-region/region.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# -# Localizable URLs -# -pluginStartupMessage=Starting Plugin for type - -# plug-ins URLs -pluginupdates_label=mozilla.com/plugincheck -pluginupdates_url=http://www.mozilla.com/plugincheck/ -
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd +++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd @@ -32,20 +32,16 @@ <!ENTITY warning.safemode.label "All add-ons have been disabled by safe mode."> <!ENTITY warning.checkcompatibility.label "Add-on compatibility checking is disabled. You may have incompatible add-ons."> <!ENTITY warning.checkcompatibility.enable.label "Enable"> <!ENTITY warning.checkcompatibility.enable.tooltip "Enable add-on compatibility checking"> <!ENTITY warning.updatesecurity.label "Add-on update security checking is disabled. You may be compromised by updates."> <!ENTITY warning.updatesecurity.enable.label "Enable"> <!ENTITY warning.updatesecurity.enable.tooltip "Enable add-on update security checking"> -<!-- global informations --> -<!ENTITY info.plugincheck.label "Check to see if your plugins are up to date"> -<!ENTITY info.plugincheck.tooltip "Check to see if your plugins are up to date"> - <!-- categories / views --> <!ENTITY view.search.label "Search"> <!ENTITY view.discover.label "Get Add-ons"> <!ENTITY view.recentUpdates.label "Recent Updates"> <!ENTITY view.availableUpdates.label "Available Updates"> <!-- addon updates --> <!ENTITY updates.checkForUpdates.label "Check for Updates">
--- a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd +++ b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd @@ -1,20 +1,16 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <!ENTITY updateWizard.title "Software Update"> <!ENTITY checking.title "Checking for Updates"> <!ENTITY updateCheck.label "Looking for newer versions of &brandShortName;…"> -<!ENTITY pluginupdatesfound.title "Found Updates for Plugins"> -<!ENTITY pluginupdatesfound.label "Newer versions of one or more of your plugins were found."> -<!ENTITY pluginupdateslink.label "See how to upgrade your plugins."> - <!ENTITY noupdatesfound.title "No Updates Found"> <!ENTITY noupdatesautoenabled.intro "There are no updates available. &brandShortName; will check periodically for updates."> <!ENTITY noupdatesautodisabled.intro "There are no updates available. Please check again later or enable &brandShortName;'s automatic update checking."> <!ENTITY manualUpdate.title "Unable to Update"> <!ENTITY manualUpdate.desc "A recommended security and stability update is available, but you do
--- a/toolkit/locales/jar.mn +++ b/toolkit/locales/jar.mn @@ -80,18 +80,16 @@ locale/@AB_CD@/global/videocontrols.dtd (%chrome/global/videocontrols.dtd) locale/@AB_CD@/global/viewSource.dtd (%chrome/global/viewSource.dtd) locale/@AB_CD@/global/viewSource.properties (%chrome/global/viewSource.properties) locale/@AB_CD@/global/webapps.properties (%chrome/global/webapps.properties) locale/@AB_CD@/global/wizard.dtd (%chrome/global/wizard.dtd) locale/@AB_CD@/global/wizard.properties (%chrome/global/wizard.properties) locale/@AB_CD@/global/crashes.dtd (%crashreporter/crashes.dtd) locale/@AB_CD@/global/crashes.properties (%crashreporter/crashes.properties) -% locale global-region @AB_CD@ %locale/@AB_CD@/global-region/ - locale/@AB_CD@/global-region/region.properties (%chrome/global-region/region.properties) % locale global-platform @AB_CD@ %locale/@AB_CD@/global-platform/ locale/@AB_CD@/global-platform/mac/platformKeys.properties (%chrome/global-platform/mac/platformKeys.properties) locale/@AB_CD@/global-platform/unix/platformKeys.properties (%chrome/global-platform/unix/platformKeys.properties) locale/@AB_CD@/global-platform/win/platformKeys.properties (%chrome/global-platform/win/platformKeys.properties) locale/@AB_CD@/global-platform/mac/intl.properties (%chrome/global-platform/mac/intl.properties) locale/@AB_CD@/global-platform/unix/intl.properties (%chrome/global-platform/unix/intl.properties) locale/@AB_CD@/global-platform/win/intl.properties (%chrome/global-platform/win/intl.properties) % locale mozapps @AB_CD@ %locale/@AB_CD@/mozapps/
--- a/toolkit/mozapps/extensions/content/extensions.css +++ b/toolkit/mozapps/extensions/content/extensions.css @@ -193,20 +193,16 @@ setting[type="menulist"] { /* Plugins aren't yet disabled by safemode (bug 342333), so don't show that warning when viewing plugins. */ #addons-page[warning="safemode"] .view-pane[type="plugin"] .global-warning-container, #addons-page[warning="safemode"] #detail-view[loading="true"] .global-warning { display: none; } -#addons-page .view-pane:not([type="plugin"]) .plugin-info-container { - display: none; -} - #addons-page .view-pane:not([type="experiment"]) .experiment-info-container { display: none; } .addon .relnotes { -moz-user-select: text; } #detail-name, #detail-desc, #detail-fulldesc {
--- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -884,25 +884,16 @@ var gViewController = { isEnabled: function() { return true; }, doCommand: function() { AddonManager.checkUpdateSecurity = true; } }, - cmd_pluginCheck: { - isEnabled: function() { - return true; - }, - doCommand: function() { - openURL(Services.urlFormatter.formatURLPref("plugins.update.url")); - } - }, - cmd_toggleAutoUpdateDefault: { isEnabled: function() { return true; }, doCommand: function() { if (!AddonManager.updateEnabled || !AddonManager.autoUpdateDefault) { // One or both of the prefs is false, i.e. the checkbox is not checked. // Now toggle both to true. If the user wants us to auto-update @@ -3246,17 +3237,17 @@ var gDetailView = { } else if (this._addon.blocklistState == Ci.nsIBlocklistService.STATE_OUTDATED) { this.node.setAttribute("notification", "warning"); document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName( "details.notification.outdated", [this._addon.name], 1 ); let warningLink = document.getElementById("detail-warning-link"); warningLink.value = gStrings.ext.GetStringFromName("details.notification.outdated.link"); - warningLink.href = Services.urlFormatter.formatURLPref("plugins.update.url"); + warningLink.href = this._addon.blocklistURL; warningLink.hidden = false; } else if (this._addon.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) { this.node.setAttribute("notification", "error"); document.getElementById("detail-error").textContent = gStrings.ext.formatStringFromName( "details.notification.vulnerableUpdatable", [this._addon.name], 1 ); let errorLink = document.getElementById("detail-error-link");
--- a/toolkit/mozapps/extensions/content/extensions.xml +++ b/toolkit/mozapps/extensions/content/extensions.xml @@ -1278,27 +1278,27 @@ this._warningBtn.hidden = true; } else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_OUTDATED) { this.setAttribute("notification", "warning"); this._warning.textContent = gStrings.ext.formatStringFromName( "notification.outdated", [this.mAddon.name], 1 ); this._warningLink.value = gStrings.ext.GetStringFromName("notification.outdated.link"); - this._warningLink.href = Services.urlFormatter.formatURLPref("plugins.update.url"); + this._warningLink.href = this.mAddon.blocklistURL; this._warningLink.hidden = false; 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 = Services.urlFormatter.formatURLPref("plugins.update.url"); + this._errorLink.href = this.mAddon.blocklistURL; 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/content/extensions.xul +++ b/toolkit/mozapps/extensions/content/extensions.xul @@ -82,17 +82,16 @@ <command id="cmd_goToDiscoverPane"/> <command id="cmd_goToRecentUpdates"/> <command id="cmd_goToAvailableUpdates"/> <command id="cmd_installFromFile"/> <command id="cmd_debugAddons"/> <command id="cmd_back"/> <command id="cmd_forward"/> <command id="cmd_enableCheckCompatibility"/> - <command id="cmd_pluginCheck"/> <command id="cmd_enableUpdateSecurity"/> <command id="cmd_toggleAutoUpdateDefault"/> <command id="cmd_resetAddonAutoUpdate"/> <command id="cmd_experimentsLearnMore"/> <command id="cmd_experimentsOpenTelemetryPreferences"/> <command id="cmd_showUnsignedExtensions"/> <command id="cmd_showAllExtensions"/> </commandset> @@ -381,25 +380,16 @@ </hbox> <button class="button-link global-warning-updatesecurity" label="&warning.updatesecurity.enable.label;" tooltiptext="&warning.updatesecurity.enable.tooltip;" command="cmd_enableUpdateSecurity"/> <spacer flex="5000"/> <!-- Necessary to allow the message to wrap --> </hbox> </hbox> - <hbox class="view-header global-info-container plugin-info-container"> - <hbox class="global-info" flex="1" align="center"> - <button class="button-link global-info-plugincheck" - label="&info.plugincheck.label;" - tooltiptext="&info.plugincheck.tooltip;" - command="cmd_pluginCheck"/> - <spacer flex="5000"/> <!-- Necessary to allow the message to wrap --> - </hbox> - </hbox> <hbox class="view-header global-info-container experiment-info-container"> <hbox class="global-info" flex="1" align="center"> <label value="&experiment.info.label;"/> <button id="experiments-learn-more" label="&experiment.info.learnmore;" tooltiptext="&experiment.info.learnmore;" accesskey="&experiment.info.learnmore.accesskey;" command="cmd_experimentsLearnMore"/>
--- a/toolkit/mozapps/extensions/nsBlocklistService.js +++ b/toolkit/mozapps/extensions/nsBlocklistService.js @@ -44,17 +44,16 @@ const PREF_BLOCKLIST_ITEM_URL = const PREF_BLOCKLIST_ENABLED = "extensions.blocklist.enabled"; const PREF_BLOCKLIST_INTERVAL = "extensions.blocklist.interval"; const PREF_BLOCKLIST_LEVEL = "extensions.blocklist.level"; const PREF_BLOCKLIST_PINGCOUNTTOTAL = "extensions.blocklist.pingCountTotal"; const PREF_BLOCKLIST_PINGCOUNTVERSION = "extensions.blocklist.pingCountVersion"; const PREF_BLOCKLIST_SUPPRESSUI = "extensions.blocklist.suppressUI"; const PREF_ONECRL_VIA_AMO = "security.onecrl.via.amo"; const PREF_BLOCKLIST_UPDATE_ENABLED = "services.blocklist.update_enabled"; -const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser"; const PREF_GENERAL_USERAGENT_LOCALE = "general.useragent.locale"; const PREF_APP_DISTRIBUTION = "distribution.id"; const PREF_APP_DISTRIBUTION_VERSION = "distribution.version"; const PREF_EM_LOGGING_ENABLED = "extensions.logging.enabled"; const XMLURI_BLOCKLIST = "http://www.mozilla.org/2006/addons-blocklist"; const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml" const UNKNOWN_XPCOM_ABI = "unknownABI"; const URI_BLOCKLIST_DIALOG = "chrome://mozapps/content/extensions/blocklist.xul" @@ -1416,21 +1415,19 @@ Blocklist.prototype = { if (state == oldState) continue; if (oldState == Ci.nsIBlocklistService.STATE_BLOCKED) { if (state == Ci.nsIBlocklistService.STATE_SOFTBLOCKED) plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED; } else if (!plugin.disabled && state != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) { - if (state == Ci.nsIBlocklistService.STATE_OUTDATED) { - gPref.setBoolPref(PREF_PLUGINS_NOTIFYUSER, true); - } - else if (state != Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE && - state != Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) { + if (state != Ci.nsIBlocklistService.STATE_OUTDATED && + state != Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE && + state != Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) { addonList.push({ name: plugin.name, version: plugin.version, icon: "chrome://mozapps/skin/plugins/pluginGeneric.png", disable: false, blocked: state == Ci.nsIBlocklistService.STATE_BLOCKED, item: plugin, url: this.getPluginBlocklistURL(plugin),
--- a/toolkit/mozapps/extensions/test/browser/browser-common.ini +++ b/toolkit/mozapps/extensions/test/browser/browser-common.ini @@ -90,17 +90,16 @@ skip-if = buildapp == 'mulet' [browser_sorting.js] [browser_sorting_plugins.js] [browser_plugin_enabled_state_locked.js] [browser_uninstalling.js] [browser_install.js] [browser_recentupdates.js] [browser_manualupdates.js] [browser_globalwarnings.js] -[browser_globalinformations.js] [browser_eula.js] skip-if = buildapp == 'mulet' [browser_updateid.js] [browser_purchase.js] [browser_openDialog.js] tags = openwindow skip-if = os == 'win' # Disabled on Windows due to intermittent failures (bug 1135866) [browser_types.js]
--- a/toolkit/mozapps/extensions/test/browser/browser_details.js +++ b/toolkit/mozapps/extensions/test/browser/browser_details.js @@ -1,29 +1,27 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ // Tests various aspects of the details view const { REQUIRE_SIGNING } = Components.utils.import("resource://gre/modules/addons/AddonConstants.jsm", {}); -const PREF_AUTOUPDATE_DEFAULT = "extensions.update.autoUpdateDefault" +const PREF_AUTOUPDATE_DEFAULT = "extensions.update.autoUpdateDefault"; const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url"; const SEARCH_URL = TESTROOT + "browser_details.xml"; const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; var gManagerWindow; var gCategoryUtilities; var gProvider; var gApp = document.getElementById("bundle_brand").getString("brandShortName"); var gVersion = Services.appinfo.version; -var gBlocklistURL = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL"); -var gPluginURL = Services.urlFormatter.formatURLPref("plugins.update.url"); var gDate = new Date(2010, 7, 1); var infoURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "unsigned-addons"; function open_details(aId, aType, aCallback) { requestLongerTimeout(2); gCategoryUtilities.openType(aType, function() { var list = gManagerWindow.document.getElementById("addon-list"); @@ -654,17 +652,17 @@ add_test(function() { is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden"); is_element_visible(get("detail-disable-btn"), "Disable button should be visible"); is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible"); is_element_visible(get("detail-warning"), "Warning message should be visible"); is(get("detail-warning").textContent, "An important update is available for Test add-on 8.", "Warning message should be correct"); is_element_visible(get("detail-warning-link"), "Warning link should be visible"); is(get("detail-warning-link").value, "Update Now", "Warning link text should be correct"); - is(get("detail-warning-link").href, gPluginURL, "Warning link should be correct"); + is(get("detail-warning-link").href, "http://example.com/addon8@tests.mozilla.org", "Warning link should be correct"); is_element_hidden(get("detail-error"), "Error message should be hidden"); is_element_hidden(get("detail-error-link"), "Error link should be hidden"); is_element_hidden(get("detail-pending"), "Pending message should be hidden"); // Disable it EventUtils.synthesizeMouseAtCenter(get("detail-disable-btn"), {}, gManagerWindow); is_element_hidden(get("detail-prefs-btn"), "Preferences button should be hidden"); is_element_visible(get("detail-enable-btn"), "Enable button should be visible"); @@ -698,17 +696,17 @@ add_test(function() { is_element_hidden(get("detail-enable-btn"), "Enable button should be hidden"); is_element_visible(get("detail-disable-btn"), "Disable button should be visible"); is_element_visible(get("detail-uninstall-btn"), "Remove button should be visible"); is_element_visible(get("detail-warning"), "Warning message should be visible"); is(get("detail-warning").textContent, "An important update is available for Test add-on 8.", "Warning message should be correct"); is_element_visible(get("detail-warning-link"), "Warning link should be visible"); is(get("detail-warning-link").value, "Update Now", "Warning link text should be correct"); - is(get("detail-warning-link").href, gPluginURL, "Warning link should be correct"); + is(get("detail-warning-link").href, "http://example.com/addon8@tests.mozilla.org", "Warning link should be correct"); is_element_hidden(get("detail-error"), "Error message should be hidden"); is_element_hidden(get("detail-error-link"), "Error link should be hidden"); is_element_hidden(get("detail-pending"), "Pending message should be hidden"); run_next_test(); }); }); });
deleted file mode 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_globalinformations.js +++ /dev/null @@ -1,53 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -// Bug 656269 - Add link to Mozilla plugin check from Add-ons Manager - -const MAIN_URL = "https://example.com/" + RELATIVE_DIR + "discovery.html"; -const PREF_PLUGINCHECKURL = "plugins.update.url"; - -function test() { - waitForExplicitFinish(); - - Services.prefs.setCharPref(PREF_PLUGINCHECKURL, MAIN_URL); - registerCleanupFunction(function() { - Services.prefs.clearUserPref(PREF_PLUGINCHECKURL); - }); - - run_next_test(); -} - -function end_test() { - finish(); -} - -add_test(function() { - open_manager("addons://list/extension", function(aManager) { - info("Testing plugin check information"); - var button = aManager.document.querySelector("#list-view button.global-info-plugincheck"); - is_element_hidden(button, "Plugin Check message button should be hidden"); - - info("Changing view to plugins") - EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager); - - wait_for_view_load(aManager, function(aManager) { - var button = aManager.document.querySelector("#list-view button.global-info-plugincheck"); - is_element_visible(button, "Plugin Check message button should be visible"); - - info("Clicking 'Plugin Check' button"); - EventUtils.synthesizeMouseAtCenter(button, { }, aManager); - function wantLoad(url) { - return url != "about:blank"; - } - BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, wantLoad).then(() => { - is(gBrowser.currentURI.spec, Services.urlFormatter.formatURLPref("plugins.update.url"), "Plugin Check URL should match"); - - gBrowser.removeCurrentTab(); - close_manager(aManager, function() { - run_next_test(); - }); - }); - }); - }); -});
--- a/toolkit/mozapps/extensions/test/browser/browser_list.js +++ b/toolkit/mozapps/extensions/test/browser/browser_list.js @@ -11,17 +11,16 @@ const { REQUIRE_SIGNING } = Components.u var gProvider; var gManagerWindow; var gCategoryUtilities; var gApp = document.getElementById("bundle_brand").getString("brandShortName"); var gVersion = Services.appinfo.version; var gBlocklistURL = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL"); -var gPluginURL = Services.urlFormatter.formatURLPref("plugins.update.url"); var gDate = new Date(2010, 7, 16); var infoURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "unsigned-addons"; const EXPECTED_ADDONS = 13; var gLWTheme = { id: "4", version: "1", @@ -83,16 +82,17 @@ 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, }, { @@ -352,17 +352,17 @@ add_task(function*() { is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden"); is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible"); is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible"); is_element_visible(get_node(addon, "warning"), "Warning message should be hidden"); is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct"); is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible"); is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct"); - is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct"); + is(get_node(addon, "warning-link").href, "http://example.com/addon7@tests.mozilla.org", "Warning link should be correct"); is_element_hidden(get_node(addon, "error"), "Error message should be hidden"); is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden"); is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden"); info("Disabling"); EventUtils.synthesizeMouseAtCenter(get_node(addon, "disable-btn"), {}, gManagerWindow); is_element_hidden(get_node(addon, "preferences-btn"), "Preferences button should be hidden"); is_element_visible(get_node(addon, "enable-btn"), "Enable button should be visible"); @@ -389,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, gPluginURL, "Error link should be correct"); + is(get_node(addon, "error-link").href, "http://example.com/addon8@tests.mozilla.org", "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"); @@ -660,17 +660,17 @@ add_task(function*() { is_element_hidden(get_node(addon, "enable-btn"), "Enable button should be hidden"); is_element_visible(get_node(addon, "disable-btn"), "Disable button should be visible"); is_element_visible(get_node(addon, "remove-btn"), "Remove button should be visible"); is_element_visible(get_node(addon, "warning"), "Warning message should be hidden"); is(get_node(addon, "warning").textContent, "An important update is available for Test add-on 7.", "Warning message should be correct"); is_element_visible(get_node(addon, "warning-link"), "Warning link should be visible"); is(get_node(addon, "warning-link").value, "Update Now", "Warning link text should be correct"); - is(get_node(addon, "warning-link").href, gPluginURL, "Warning link should be correct"); + is(get_node(addon, "warning-link").href, "http://example.com/addon7@tests.mozilla.org", "Warning link should be correct"); is_element_hidden(get_node(addon, "error"), "Error message should be hidden"); is_element_hidden(get_node(addon, "error-link"), "Error link should be hidden"); is_element_hidden(get_node(addon, "pending"), "Pending message should be hidden"); }); // Check the add-ons are now in the right state add_task(function*() { let [a1, a2, a4] = yield promiseAddonsByIDs(["addon1@tests.mozilla.org",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_2.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_2.js @@ -30,13 +30,10 @@ function run_test() { if (!plugin) do_throw("Plugin tag not found"); //run the code after the blocklist is closed Services.obs.notifyObservers(null, "addon-blocklist-closed", null); do_execute_soon(function() { // should be marked as outdated by the blocklist do_check_true(blocklist.getPluginBlocklistState(plugin, "1", "1.9") == nsIBLS.STATE_OUTDATED); - - // should indicate that a warning should be shown - do_check_true(prefs.getBoolPref("plugins.update.notifyUser")); }); }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js @@ -117,30 +117,23 @@ function run_test() { // update blocklist with data that marks the plugin as outdated do_update_blocklist("test_bug514327_3_outdated_1.xml", test_part_1); } function test_part_1() { // plugin should now be marked as outdated do_check_true(gBlocklist.getPluginBlocklistState(PLUGINS[0], "1", "1.9") == nsIBLS.STATE_OUTDATED); - // and the notifyUser pref should be set to true - do_check_true(gPrefs.getBoolPref("plugins.update.notifyUser")); - - // preternd the user has been notified, reset the pref - gPrefs.setBoolPref("plugins.update.notifyUser", false); // update blocklist with data that marks the plugin as outdated do_update_blocklist("test_bug514327_3_outdated_2.xml", test_part_2); } function test_part_2() { // plugin should still be marked as outdated do_check_true(gBlocklist.getPluginBlocklistState(PLUGINS[0], "1", "1.9") == nsIBLS.STATE_OUTDATED); - // and the notifyUser pref should NOT be set to true, as the plugin was already outdated - do_check_false(gPrefs.getBoolPref("plugins.update.notifyUser")); finish(); } function finish() { gTestserver.stop(do_test_finished); }
--- a/toolkit/mozapps/update/content/updates.js +++ b/toolkit/mozapps/update/content/updates.js @@ -22,18 +22,16 @@ const PREF_APP_UPDATE_ELEVATE_NEVER const PREF_APP_UPDATE_ENABLED = "app.update.enabled"; const PREF_APP_UPDATE_LOG = "app.update.log"; const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED = "app.update.notifiedUnsupported"; const PREF_APP_UPDATE_TEST_LOOP = "app.update.test.loop"; const PREF_APP_UPDATE_URL_MANUAL = "app.update.url.manual"; const PREFBRANCH_APP_UPDATE_NEVER = "app.update.never."; -const PREF_PLUGINS_UPDATE_URL = "plugins.update.url"; - const UPDATE_TEST_LOOP_INTERVAL = 2000; const URI_UPDATES_PROPERTIES = "chrome://mozapps/locale/update/updates.properties"; const STATE_DOWNLOADING = "downloading"; const STATE_PENDING = "pending"; const STATE_PENDING_SERVICE = "pending-service"; const STATE_PENDING_ELEVATE = "pending-elevate"; @@ -621,71 +619,16 @@ var gCheckingPage = { !aIID.equals(CoI.nsISupports)) throw CoR.NS_ERROR_NO_INTERFACE; return this; } } }; /** - * The "You have outdated plugins" page - */ -var gPluginsPage = { - /** - * URL of the plugin updates page - */ - _url: null, - - /** - * Initialize - */ - onPageShow: function() { - var prefs = Services.prefs; - if (prefs.getPrefType(PREF_PLUGINS_UPDATE_URL) == prefs.PREF_INVALID) { - gUpdates.wiz.goTo("noupdatesfound"); - return; - } - - this._url = Services.urlFormatter.formatURLPref(PREF_PLUGINS_UPDATE_URL); - var link = document.getElementById("pluginupdateslink"); - link.setAttribute("href", this._url); - - - var phs = CoC["@mozilla.org/plugin/host;1"]. - getService(CoI.nsIPluginHost); - var plugins = phs.getPluginTags(); - var blocklist = CoC["@mozilla.org/extensions/blocklist;1"]. - getService(CoI.nsIBlocklistService); - - var hasOutdated = false; - for (let i = 0; i < plugins.length; i++) { - let pluginState = blocklist.getPluginBlocklistState(plugins[i]); - if (pluginState == CoI.nsIBlocklistService.STATE_OUTDATED) { - hasOutdated = true; - break; - } - } - if (!hasOutdated) { - gUpdates.wiz.goTo("noupdatesfound"); - return; - } - - gUpdates.setButtons(null, null, "okButton", true); - gUpdates.wiz.getButton("finish").focus(); - }, - - /** - * Finish button clicked. - */ - onWizardFinish: function() { - openURL(this._url); - } -}; - -/** * The "No Updates Are Available" page */ var gNoUpdatesPage = { /** * Initialize */ onPageShow: function() { LOG("gNoUpdatesPage", "onPageShow - could not select an appropriate " +
--- a/toolkit/mozapps/update/content/updates.xul +++ b/toolkit/mozapps/update/content/updates.xul @@ -31,37 +31,26 @@ <stringbundleset id="updateSet"> <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/> <stringbundle id="updateStrings" src="chrome://mozapps/locale/update/updates.properties"/> </stringbundleset> <wizardpage id="dummy" pageid="dummy" firstpage="true"/> - <wizardpage id="checking" pageid="checking" next="pluginupdatesfound" + <wizardpage id="checking" pageid="checking" next="noupdatesfound" object="gCheckingPage" onpageshow="gCheckingPage.onPageShow();"> <updateheader label="&checking.title;"/> <vbox class="update-content" flex="1"> <label>&updateCheck.label;</label> <separator class="thin"/> <progressmeter id="checkingProgress" mode="undetermined"/> </vbox> </wizardpage> - <wizardpage id="pluginupdatesfound" pageid="pluginupdatesfound" - object="gPluginsPage" onpageshow="gPluginsPage.onPageShow();"> - <updateheader label="&pluginupdatesfound.title;"/> - <vbox class="update-content" flex="1"> - <label>&pluginupdatesfound.label;</label> - <separator class="thin"/> - <label id="pluginupdateslink" class="text-link" - onclick="openUpdateURL(event);">&pluginupdateslink.label;</label> - </vbox> - </wizardpage> - <wizardpage id="noupdatesfound" pageid="noupdatesfound" object="gNoUpdatesPage" onpageshow="gNoUpdatesPage.onPageShow();"> <updateheader label="&noupdatesfound.title;"/> <vbox class="update-content" flex="1"> <label id="noUpdatesAutoEnabled" hidden="true">&noupdatesautoenabled.intro;</label> <label id="noUpdatesAutoDisabled" hidden="true">&noupdatesautodisabled.intro;</label> </vbox> </wizardpage>
--- a/toolkit/mozapps/update/tests/chrome/utils.js +++ b/toolkit/mozapps/update/tests/chrome/utils.js @@ -81,17 +81,16 @@ Cu.import("resource://gre/modules/Servic const IS_MACOSX = ("nsILocalFileMac" in Ci); const IS_WIN = ("@mozilla.org/windows-registry-key;1" in Cc); // The tests have to use the pageid instead of the pageIndex due to the // app update wizard's access method being random. const PAGEID_DUMMY = "dummy"; // Done const PAGEID_CHECKING = "checking"; // Done -const PAGEID_PLUGIN_UPDATES = "pluginupdatesfound"; const PAGEID_NO_UPDATES_FOUND = "noupdatesfound"; // Done const PAGEID_MANUAL_UPDATE = "manualUpdate"; // Done const PAGEID_UNSUPPORTED = "unsupported"; // Done const PAGEID_FOUND_BASIC = "updatesfoundbasic"; // Done const PAGEID_FOUND_BILLBOARD = "updatesfoundbillboard"; // Done const PAGEID_DOWNLOADING = "downloading"; // Done const PAGEID_ERRORS = "errors"; // Done const PAGEID_ERROR_EXTRA = "errorextra"; // Done