Bug 615443: Ensure that contributors and localisers are listed in order. r=robstrong, a=blocks-final
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 02 Dec 2010 09:30:27 -0800
changeset 58514 7ff5dc0e487bd341affdf21603cdf576578bb15e
parent 58513 2c24ce211f2b7ee5223adec98c82b56178053b03
child 58515 b8388f11a366e330abe24c6991db9549210fadd4
push id17332
push userdtownsend@mozilla.com
push dateFri, 03 Dec 2010 00:04:17 +0000
treeherdermozilla-central@3f004b291c65 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobstrong, blocks-final
bugs615443
milestone2.0b8pre
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
Bug 615443: Ensure that contributors and localisers are listed in order. r=robstrong, a=blocks-final
toolkit/mozapps/extensions/XPIProvider.jsm
toolkit/mozapps/extensions/test/xpcshell/test_locale.js
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -6333,16 +6333,17 @@ function AddonWrapper(aAddon) {
       let results = null;
       let usedRepository = false;
 
       if (aAddon.active) {
         let pref = PREF_EM_EXTENSION_FORMAT + aAddon.id + "." +
                    aProp.substring(0, aProp.length - 1);
         let list = Services.prefs.getChildList(pref, {});
         if (list.length > 0) {
+          list.sort();
           results = [];
           list.forEach(function(aPref) {
             let value = Services.prefs.getComplexValue(aPref,
                                                        Ci.nsIPrefLocalizedString);
             if (value.data)
               results.push(value.data);
           });
         }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locale.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locale.js
@@ -126,20 +126,16 @@ function run_test_7() {
     do_check_eq(addon.name, "Name from prefs");
 
     run_test_8();
   });
 }
 
 // Test that the prefs will override localized values from the manifest
 function run_test_8() {
-  dump("The rest of this test is disabled for now\n");
-  do_test_finished();
-  return;
-
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "fr-FR");
   restartManager();
 
   AddonManager.getAddonByID("addon1@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
 
     do_check_eq(addon.name, "Name from prefs");
     let contributors = addon.contributors;