Bug 1257299 - Use AppInfo.jsm instead of appInfoUtils.jsm. r=clokep a=bustage fix CLOSED TREE

--HG--
extra : amend_source : dc7bad79dde2b3ac48dac0967b018a7195382910
This commit is contained in:
Tooru Fujisawa 2016-03-17 07:37:18 +09:00
Родитель 125b79d65c
Коммит bface4cffe
3 изменённых файлов: 2 добавлений и 47 удалений

Просмотреть файл

@ -6,7 +6,7 @@ var {interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/imServices.jsm");
Cu.import("resource://testing-common/appInfoUtils.jsm");
Cu.import("resource://testing-common/AppInfo.jsm");
function run_test() {
do_get_profile();
@ -23,7 +23,7 @@ function run_test() {
try {
// Having an implementation of nsIXULAppInfo is required for
// Services.core.init to work.
XULAppInfo.init();
updateAppInfo();
Services.core.init();
let account = Services.accounts.getAccountByNumericId(1);

Просмотреть файл

@ -23,7 +23,3 @@ EXTRA_PP_JS_MODULES += [
'hiddenWindow.jsm',
'imTextboxUtils.jsm',
]
TESTING_JS_MODULES += [
'test/appInfoUtils.jsm',
]

Просмотреть файл

@ -1,41 +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/. */
this.EXPORTED_SYMBOLS = ["XULAppInfo"];
var Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
var XULAppInfo = {
vendor: "Mozilla",
name: "XPCShell",
ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
version: "5",
appBuildID: "2007010101",
platformVersion: "1.9",
platformBuildID: "2007010101",
inSafeMode: false,
logConsoleErrors: true,
OS: "XPCShell",
XPCOMABI: "noarch-spidermonkey",
init: function() {
Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
.registerFactory(Components.ID("{48a4e946-1f9f-4224-b4b0-9a54183cb81e}"),
"XULAppInfo", "@mozilla.org/xre/app-info;1",
XULAppInfoFactory);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIXULAppInfo, Ci.nsIXULRuntime,
Ci.nsISupports])
};
var XULAppInfoFactory = {
createInstance: function (outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
return XULAppInfo.QueryInterface(iid);
}
};