mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Backed out changeset 0a53b2d44e77 (bug 1142758) for apps/verticalhome/test/marionette/grid_layout_test.js failures.
This commit is contained in:
parent
c4b967ce5c
commit
30a9149d8b
@ -785,7 +785,7 @@ this.AppsUtils = {
|
||||
/**
|
||||
* Helper object to access manifest information with locale support
|
||||
*/
|
||||
this.ManifestHelper = function(aManifest, aOrigin, aManifestURL, aLang) {
|
||||
this.ManifestHelper = function(aManifest, aOrigin, aManifestURL) {
|
||||
// If the app is packaged, we resolve uris against the origin.
|
||||
// If it's not, against the manifest url.
|
||||
|
||||
@ -801,15 +801,10 @@ this.ManifestHelper = function(aManifest, aOrigin, aManifestURL, aLang) {
|
||||
this._manifestURL = Services.io.newURI(aManifestURL, null, null);
|
||||
|
||||
this._manifest = aManifest;
|
||||
|
||||
let locale = aLang;
|
||||
if (!locale) {
|
||||
let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry)
|
||||
.QueryInterface(Ci.nsIToolkitChromeRegistry);
|
||||
locale = chrome.getSelectedLocale("global").toLowerCase();
|
||||
}
|
||||
|
||||
let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry)
|
||||
.QueryInterface(Ci.nsIToolkitChromeRegistry);
|
||||
let locale = chrome.getSelectedLocale("global").toLowerCase();
|
||||
this._localeRoot = this._manifest;
|
||||
|
||||
if (this._manifest.locales && this._manifest.locales[locale]) {
|
||||
|
@ -245,7 +245,7 @@ this.Langpacks = {
|
||||
|
||||
// We need to get the app with the manifest since the version is only
|
||||
// available in the manifest.
|
||||
this._appFromManifestURL(aData.manifestURL, aData.entryPoint, aData.lang)
|
||||
this._appFromManifestURL(aData.manifestURL, aData.entryPoint)
|
||||
.then(aApp => {
|
||||
let manifest = aApp.manifest;
|
||||
|
||||
|
@ -4674,7 +4674,7 @@ this.DOMApplicationRegistry = {
|
||||
},
|
||||
|
||||
// Returns a promise that resolves to the app object with the manifest.
|
||||
getFullAppByManifestURL: function(aManifestURL, aEntryPoint, aLang) {
|
||||
getFullAppByManifestURL: function(aManifestURL, aEntryPoint) {
|
||||
let app = this.getAppByManifestURL(aManifestURL);
|
||||
if (!app) {
|
||||
return Promise.reject("NoSuchApp");
|
||||
@ -4692,8 +4692,7 @@ this.DOMApplicationRegistry = {
|
||||
manifest.version = aManifest.version;
|
||||
}
|
||||
|
||||
app.manifest =
|
||||
new ManifestHelper(manifest, app.origin, app.manifestURL, aLang);
|
||||
app.manifest = new ManifestHelper(manifest, app.origin, app.manifestURL);
|
||||
return app;
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user