commit mozilla-xulrunner192 for openSUSE:Factory
Hello community, here is the log from the commit of package mozilla-xulrunner192 for openSUSE:Factory checked in at Fri Mar 26 01:53:24 CET 2010. -------- --- mozilla-xulrunner192/mozilla-xulrunner192.changes 2010-01-19 07:06:25.000000000 +0100 +++ mozilla-xulrunner192/mozilla-xulrunner192.changes 2010-03-25 20:11:09.000000000 +0100 @@ -1,0 +2,12 @@ +Thu Mar 25 20:04:41 CET 2010 - wr@rosenauer.org + +- security update to 1.9.2.2 (bnc#586567) + * requires NSS 3.12.6 + * MFSA 2010-08/CVE-2010-1028 (bmo#552216) + WOFF heap corruption due to integer overflow +- general.useragent.locale in profile overrides + intl.locale.matchOS (bmo#542999) +- split mozilla-js192 package which contains libmozjs only + to allow its installation w/o all GUI dependencies + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- l10n-1.9.2.0.tar.bz2 mozilla-milestone.patch xulrunner-source-1.9.2.0.tar.bz2 New: ---- l10n-1.9.2.2.tar.bz2 mozilla-ua-locale-pref.patch xulrunner-source-1.9.2.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mozilla-xulrunner192.spec ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:30.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:30.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package mozilla-xulrunner192 (Version 1.9.2.0) +# spec file for package mozilla-xulrunner192 (Version 1.9.2.2) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # 2006-2010 Wolfgang Rosenauer @@ -39,12 +39,12 @@ BuildRequires: wireless-tools %endif License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+ -Version: 1.9.2.0 +Version: 1.9.2.2 Release: 1 -%define releasedate 2010011500 -%define version_internal 1.9.2.0 +%define releasedate 2010031700 +%define version_internal 1.9.2.2 %define apiversion 1.9.2 -%define uaweight 192000 +%define uaweight 192020 Summary: Mozilla Runtime Environment 1.9.2 Url: http://www.mozilla.org Group: Productivity/Other @@ -83,8 +83,9 @@ Patch13: toolkit-ui-lockdown.patch # --- Patch14: mozilla-breakpad-update.patch -Patch15: mozilla-milestone.patch +Patch15: mozilla-ua-locale-pref.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: mozilla-js192 Requires(post): update-alternatives coreutils Requires(preun): update-alternatives coreutils ### build configuration ### @@ -114,7 +115,7 @@ Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) %endif %if %has_system_nss -BuildRequires: mozilla-nss-devel >= 3.12.3 +BuildRequires: mozilla-nss-devel >= 3.12.6 Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) %endif Recommends: %{name}-gnome @@ -125,6 +126,18 @@ Thunderbird. +%package -n mozilla-js192 +License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+ +Summary: Mozilla JS 1.8 engine +Group: Productivity/Other + +%description -n mozilla-js192 +JavaScript is the Netscape-developed object scripting language used in millions +of web pages and server applications worldwide. Netscape's JavaScript is a +superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, +with only mild differences from the published standard. + + %package devel License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+ Summary: XULRunner/Gecko SDK 1.9.2 @@ -219,6 +232,7 @@ %patch12 -p1 %patch13 -p1 %patch14 -p1 +# bmo#542999 %patch15 -p1 %build @@ -256,6 +270,7 @@ mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZ_MILESTONE_RELEASE=1 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj . \$topsrcdir/xulrunner/config/mozconfig ac_add_options --prefix=%{_prefix} ac_add_options --libdir=%{_libdir} @@ -319,6 +334,7 @@ make -f client.mk build %install +cd ../obj %makeinstall STRIP=/bin/true # remove some executable permissions find $RPM_BUILD_ROOT%{_includedir}/xulrunner-%{version_internal} \ @@ -334,6 +350,17 @@ $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/ ln -sf ../../../xulrunner-%{version_internal}/libxul.so \ $RPM_BUILD_ROOT%{_libdir}/xulrunner-devel-%{version_internal}/sdk/lib/ +# include basic buildenv for xulapps to use +mkdir -p $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal} +pushd .. +# this list has been compiled by trial and error for prism +tar --exclude=*.cpp --exclude=*.mm \ + -cvjf $RPM_BUILD_ROOT%{_datadir}/xulrunner-%{version_internal}/mozilla-src.tar.bz2 \ + mozilla/configure.in mozilla/Makefile.in mozilla/client.py mozilla/allmakefiles.sh \ + mozilla/config mozilla/client.mk mozilla/aclocal.m4 mozilla/build mozilla/js/src/* \ + mozilla/testing mozilla/toolkit/mozapps/installer mozilla/probes mozilla/memory \ + mozilla/toolkit/xre mozilla/nsprpub/config mozilla/tools mozilla/xpcom/build +popd # XPI example #cp -rL dist/xpi-stage/simple $RPM_BUILD_ROOT/%{_libdir}/xulrunner-%{version_internal}/ # preferences @@ -353,7 +380,7 @@ # install additional locales %if %localize rm -f %{_tmppath}/translations.* -for locale in $(awk '{ print $1; }' browser/locales/shipped-locales); do +for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do case $locale in ja-JP-mac|en-US) ;; @@ -400,10 +427,13 @@ %endif # create breakpad debugsymbols %if %crashreporter -make buildsymbols -if [ -e dist/*.crashreporter-symbols.zip ]; then +SYMBOLS_NAME="xulrunner-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" +make buildsymbols \ + SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ + SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" +if [ -e dist/*symbols.zip ]; then mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ - cp dist/*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ + cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ fi %endif @@ -477,6 +507,7 @@ %{_libdir}/xulrunner-%{version_internal}/plugins/ %{_libdir}/xulrunner-%{version_internal}/res/ %{_libdir}/xulrunner-%{version_internal}/*.so +%exclude %{_libdir}/xulrunner-%{version_internal}/libmozjs.so %{_libdir}/xulrunner-%{version_internal}/.autoreg %{_libdir}/xulrunner-%{version_internal}/add-plugins.sh %{_libdir}/xulrunner-%{version_internal}/dependentlibs.list @@ -507,6 +538,12 @@ %ghost %{_libdir}/xulrunner-%{ga_version} %endif +%files -n mozilla-js192 +%defattr(-,root,root) +%dir %{_libdir}/xulrunner-%{version_internal}/ +%{_libdir}/xulrunner-%{apiversion} +%{_libdir}/xulrunner-%{version_internal}/libmozjs.so + %files devel %defattr(-,root,root) %{_libdir}/xulrunner-%{version_internal}/xpcshell @@ -517,6 +554,7 @@ # FIXME symlink dynamic libs below sdk/lib %attr(644,root,root) %{_libdir}/pkgconfig/* %{_includedir}/xulrunner-%{version_internal}/ +%{_datadir}/xulrunner-%{version_internal}/ %files gnome %defattr(-,root,root) @@ -525,6 +563,7 @@ %ghost %{_libdir}/xulrunner-%{version_internal}/.autoreg %{_libdir}/xulrunner-%{version_internal}/components/libmozgnome.so %{_libdir}/xulrunner-%{version_internal}/components/libnkgnomevfs.so + %if %localize %files translations-common -f %{_tmppath}/translations.common @@ -537,6 +576,7 @@ %dir %{_libdir}/xulrunner-%{version_internal}/ %dir %{_libdir}/xulrunner-%{version_internal}/chrome/ %endif + %if %crashreporter %files buildsymbols ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:30.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:30.000000000 +0100 @@ -2,6 +2,9 @@ +/usr/lib(64)?/xulrunner-.* +/etc/gre.d/.* recommends "mozilla-xulrunner192-gnome-<targettype>" + requires "mozilla-js192-<targettype>" + +mozilla-js192 mozilla-xulrunner192-translations-common +/usr/lib(64)?/xulrunner-.* ++++++ create-tar.sh ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:30.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:30.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/bash -RELEASE_TAG="FIREFOX_3_6rc2_RELEASE" -VERSION="1.9.2.0" +RELEASE_TAG="FIREFOX_3_6_2_RELEASE" +VERSION="1.9.2.2" # mozilla hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 mozilla ++++++ l10n-1.9.2.0.tar.bz2 -> l10n-1.9.2.2.tar.bz2 ++++++ mozilla-xulrunner192/l10n-1.9.2.0.tar.bz2 mozilla-xulrunner192/l10n-1.9.2.2.tar.bz2 differ: char 11, line 1 ++++++ mozilla-gconf-backend.patch ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:31.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:31.000000000 +0100 @@ -3466,9 +3466,9 @@ diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in -@@ -229,16 +229,20 @@ endif - ifdef NS_OSSO - EXTRA_DSO_LDOPTS += $(LIBOSSO_LIBS) +@@ -225,16 +225,20 @@ endif + ifdef MOZ_ENABLE_LIBCONIC + EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS) endif ifdef MOZ_ENABLE_DBUS @@ -3490,7 +3490,7 @@ diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk --- a/toolkit/toolkit-tiers.mk +++ b/toolkit/toolkit-tiers.mk -@@ -253,16 +253,23 @@ endif +@@ -254,16 +254,23 @@ endif ifdef MOZ_ENABLE_LIBXUL tier_toolkit_dirs += xpcom/stub endif ++++++ mozilla-kde.patch ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:31.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:31.000000000 +0100 @@ -40,7 +40,7 @@ #define SELECTED_SKIN_PREF "general.skins.selectedSkin" static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID); -@@ -1607,16 +1608,17 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1608,16 +1609,17 @@ nsChromeRegistry::ProcessManifestBuffer( NS_NAMED_LITERAL_STRING(kPlatform, "platform"); NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); @@ -58,7 +58,7 @@ rv = io->GetProtocolHandler("resource", getter_AddRefs(ph)); NS_ENSURE_SUCCESS(rv, rv); -@@ -1650,35 +1652,39 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1651,35 +1653,39 @@ nsChromeRegistry::ProcessManifestBuffer( if (NS_SUCCEEDED(rv)) { CopyUTF8toUTF16(s, osTarget); ToLowerCase(osTarget); @@ -98,7 +98,7 @@ // outer loop tokenizes by newline while (nsnull != (token = nsCRT::strtok(newline, kNewlines, &newline))) { -@@ -1712,41 +1718,43 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1713,41 +1719,43 @@ nsChromeRegistry::ProcessManifestBuffer( PRBool platform = PR_FALSE; PRBool xpcNativeWrappers = PR_TRUE; @@ -143,7 +143,7 @@ if (NS_FAILED(rv)) continue; -@@ -1797,38 +1805,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1798,38 +1806,40 @@ nsChromeRegistry::ProcessManifestBuffer( } EnsureLowerCase(package); @@ -185,7 +185,7 @@ if (NS_FAILED(rv)) continue; -@@ -1859,38 +1869,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1860,38 +1870,40 @@ nsChromeRegistry::ProcessManifestBuffer( } EnsureLowerCase(package); @@ -227,7 +227,7 @@ if (NS_FAILED(rv)) continue; -@@ -1923,38 +1935,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1924,38 +1936,40 @@ nsChromeRegistry::ProcessManifestBuffer( "Warning: malformed chrome overlay instruction."); continue; } @@ -269,7 +269,7 @@ rv |= io->NewURI(nsDependentCString(overlay), nsnull, nsnull, getter_AddRefs(overlayuri)); if (NS_FAILED(rv)) { -@@ -1979,38 +1993,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -1980,38 +1994,40 @@ nsChromeRegistry::ProcessManifestBuffer( "Warning: malformed chrome style instruction."); continue; } @@ -311,7 +311,7 @@ rv |= io->NewURI(nsDependentCString(overlay), nsnull, nsnull, getter_AddRefs(overlayuri)); if (NS_FAILED(rv)) -@@ -2039,38 +2055,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -2040,38 +2056,40 @@ nsChromeRegistry::ProcessManifestBuffer( "Warning: malformed chrome override instruction."); continue; } @@ -353,7 +353,7 @@ rv |= io->NewURI(nsDependentCString(resolved), nsnull, manifestURI, getter_AddRefs(resolveduri)); if (NS_FAILED(rv)) -@@ -2101,38 +2119,40 @@ nsChromeRegistry::ProcessManifestBuffer( +@@ -2102,38 +2120,40 @@ nsChromeRegistry::ProcessManifestBuffer( } EnsureLowerCase(package); @@ -2593,7 +2593,7 @@ content \ docshell \ dom \ -@@ -131,17 +133,17 @@ CMMSRCS = nsNativeAppSupportCocoa.mm +@@ -132,17 +134,17 @@ CMMSRCS = nsNativeAppSupportCocoa.mm else ifeq ($(MOZ_WIDGET_TOOLKIT),os2) CPPSRCS += nsNativeAppSupportOS2.cpp @@ -3404,7 +3404,7 @@ --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -40,27 +40,30 @@ - #ifdef MOZ_PLATFORM_HILDON + #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) #include <glib.h> #include <hildon-uri.h> #include <hildon-mime.h> @@ -3428,7 +3428,7 @@ { - nsresult rv = nsGNOMERegistry::LoadURL(aURI); + nsresult rv = nsCommonRegistry::LoadURL(aURI); - #ifdef MOZ_PLATFORM_HILDON + #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) if (NS_FAILED(rv)){ HildonURIAction *action = hildon_uri_get_default_action(mType.get(), nsnull); if (action) { @@ -3545,7 +3545,7 @@ // Check the GConf registry for a protocol handler - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); - #ifdef MOZ_PLATFORM_HILDON + #ifdef MOZ_PLATFORM_MAEMO *aHandlerExists = nsMIMEInfoUnix::HandlerExists(aProtocolScheme); #endif #endif @@ -3651,7 +3651,7 @@ #include "nsAccessibilityHelper.h" +#include "nsKDEUtils.h" - #ifdef MOZ_PLATFORM_HILDON + #ifdef MOZ_PLATFORM_MAEMO #include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h> #endif @@ -3969,9 +3969,9 @@ LOCAL_INCLUDES = -I.. +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre - ifdef MOZ_PLATFORM_HILDON - CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(LIBHILDONMIME_CFLAGS) - CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(LIBHILDONMIME_CFLAGS) + ifeq ($(MOZ_PLATFORM_MAEMO), 5) + CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS) + CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS) endif diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp @@ -3989,7 +3989,7 @@ +#include "nsKDEUtils.h" #endif - #ifdef MOZ_PLATFORM_HILDON + #if (MOZ_PLATFORM_MAEMO == 5) #include <glib.h> #include <hildon-uri.h> #include <hildon-mime.h> ++++++ mozilla-libproxy.patch ++++++ --- /var/tmp/diff_new_pack.TzCWx7/_old 2010-03-26 01:36:31.000000000 +0100 +++ /var/tmp/diff_new_pack.TzCWx7/_new 2010-03-26 01:36:31.000000000 +0100 @@ -30,30 +30,22 @@ diff --git a/config/system-headers b/config/system-headers --- a/config/system-headers +++ b/config/system-headers -@@ -1007,15 +1007,19 @@ libsn/sn-monitor.h - libsn/sn-util.h - #endif - #if MOZ_NATIVE_HUNSPELL==1 - hunspell.hxx - #endif +@@ -1012,8 +1012,11 @@ hunspell.hxx #if MOZ_NATIVE_BZ2==1 bzlib.h #endif -+#ifdef MOZ_ENABLE_LIBPROXY -+proxy.h -+#endif -+ - #ifdef MOZ_PLATFORM_HILDON + #if MOZ_PLATFORM_MAEMO==5 hildon-uri.h hildon-mime.h - #endif - #ifdef NS_OSSO libosso.h #endif ++#ifdef MOZ_ENABLE_LIBPROXY ++proxy.h ++#endif diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in -@@ -5280,16 +5280,39 @@ then +@@ -5289,16 +5289,39 @@ then AC_DEFINE(MOZ_ENABLE_DBUS) fi fi @@ -96,7 +88,7 @@ diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in -@@ -247,16 +247,20 @@ endif +@@ -243,16 +243,20 @@ endif ifdef MOZ_TREE_FREETYPE EXTRA_DSO_LDOPTS += $(FT2_LIBS) endif ++++++ mozilla-ua-locale-pref.patch ++++++ diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -1267,20 +1267,21 @@ nsChromeRegistry::WrappersEnabled(nsIURI return PL_DHASH_ENTRY_IS_LIVE(entry) && entry->flags & PackageEntry::XPCNATIVEWRAPPERS; } nsresult nsChromeRegistry::SelectLocaleFromPref(nsIPrefBranch* prefs) { nsresult rv; - PRBool matchOSLocale = PR_FALSE; + PRBool matchOSLocale = PR_FALSE, userLocaleOverride = PR_FALSE; + prefs->PrefHasUserValue(SELECTED_LOCALE_PREF, &userLocaleOverride); rv = prefs->GetBoolPref(MATCH_OS_LOCALE_PREF, &matchOSLocale); - if (NS_SUCCEEDED(rv) && matchOSLocale) { + if (NS_SUCCEEDED(rv) && matchOSLocale && !userLocaleOverride) { // compute lang and region code only when needed! nsCAutoString uiLocale; rv = getUILangCountry(uiLocale); if (NS_SUCCEEDED(rv)) mSelectedLocale = uiLocale; } else { nsXPIDLCString provider; diff --git a/chrome/test/unit/data/test_bug519468.manifest b/chrome/test/unit/data/test_bug519468.manifest deleted file mode 100644 --- a/chrome/test/unit/data/test_bug519468.manifest +++ /dev/null @@ -1,2 +0,0 @@ -locale testmatchos en-US jar:en-US.jar!/locale/en-US/global/ -locale testmatchos fr-FR jar:en-US.jar!/locale/en-US/global/ diff --git a/chrome/test/unit/test_bug519468.js b/chrome/test/unit/test_bug519468.js --- a/chrome/test/unit/test_bug519468.js +++ b/chrome/test/unit/test_bug519468.js @@ -31,50 +31,90 @@ * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +function write_locale(stream, locale, package) { + var s = "locale " + package + " " + locale + " jar:" + locale + ".jar!"; + s += "/locale/" + locale + "/" + package +"/\n"; + stream.write(s, s.length); +} + +var localeService = Cc["@mozilla.org/intl/nslocaleservice;1"] + .getService(Ci.nsILocaleService); + +var systemLocale = localeService.getLocaleComponentForUserAgent(); + +var locales; + +if (systemLocale == "en-US") + locales = [ "en-US", "fr-FR", "de-DE" ]; +else if (systemLocale == "fr-FR") + locales = [ "en-US", systemLocale, "de-DE" ]; +else + locales = [ "en-US", systemLocale, "fr-FR" ]; + +var workingDir = Cc["@mozilla.org/file/directory_service;1"]. + getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile); +var manifest = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); +manifest.initWithFile(workingDir); +manifest.append("test_bug519468.manifest"); +manifest.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600); +var stream = Cc["@mozilla.org/network/file-output-stream;1"]. + createInstance(Ci.nsIFileOutputStream); +stream.init(manifest, 0x04 | 0x08 | 0x20, 0600, 0); // write, create, truncate +locales.slice(0,2).forEach(function(l) write_locale(stream, l, "testmatchos")); +write_locale(stream, locales[2], "testnomatchos"); +stream.close(); + var MANIFESTS = [ - do_get_file("data/test_bug519468.manifest") + manifest ]; registerManifests(MANIFESTS); var chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"] .getService(Ci.nsIXULChromeRegistry) .QueryInterface(Ci.nsIToolkitChromeRegistry); -var localeService = Cc["@mozilla.org/intl/nslocaleservice;1"] - .getService(Ci.nsILocaleService); - var prefService = Cc["@mozilla.org/preferences-service;1"] .getService(Ci.nsIPrefService) .QueryInterface(Ci.nsIPrefBranch); function test_locale(aTest) { prefService.setBoolPref("intl.locale.matchOS", aTest.matchOS); - prefService.setCharPref("general.useragent.locale", aTest.selected || "en-US"); + if (aTest.selected) + prefService.setCharPref("general.useragent.locale", aTest.selected); + else + try { + prefService.clearUserPref("general.useragent.locale"); + } catch(e) {} - var selectedLocale = chromeReg.getSelectedLocale("testmatchos"); + var selectedLocale = chromeReg.getSelectedLocale(aTest.package); do_check_eq(selectedLocale, aTest.locale); } function run_test() { - var systemLocale = localeService.getLocaleComponentForUserAgent(); - var tests = [ - {matchOS: false, selected: null, locale: "en-US"}, {matchOS: true, selected: null, locale: systemLocale}, - {matchOS: true, selected: "fr-FR", locale: systemLocale}, - {matchOS: false, selected: "fr-FR", locale: "fr-FR"}, - {matchOS: true, selected: null, locale: systemLocale} + {matchOS: true, selected: locales[0], locale: locales[0]}, + {matchOS: true, selected: locales[1], locale: locales[1]}, + {matchOS: true, selected: locales[2], locale: locales[0]}, + {matchOS: true, selected: null, locale: locales[2], package: "testnomatchos"}, + {matchOS: false, selected: null, locale: locales[0]}, + {matchOS: false, selected: locales[0], locale: locales[0]}, + {matchOS: false, selected: locales[1], locale: locales[1]}, + {matchOS: false, selected: locales[2], locale: locales[0]}, ]; for (var i = 0; i < tests.length; ++ i) { var test = tests[i]; + if (!test.package) + test.package = "testmatchos"; test_locale(test); } + manifest.remove(false); } ++++++ xulrunner-source-1.9.2.0.tar.bz2 -> xulrunner-source-1.9.2.2.tar.bz2 ++++++ mozilla-xulrunner192/xulrunner-source-1.9.2.0.tar.bz2 mozilla-xulrunner192/xulrunner-source-1.9.2.2.tar.bz2 differ: char 11, line 1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de