michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: const Cr = Components.results; michael@0: michael@0: var XULAppInfo = { michael@0: vendor: "Mozilla", michael@0: name: "Url Formatter Test", michael@0: ID: "urlformattertest@test.mozilla.org", michael@0: version: "1", michael@0: appBuildID: "2007122405", michael@0: platformVersion: "2.0", michael@0: platformBuildID: "2007122406", michael@0: inSafeMode: false, michael@0: logConsoleErrors: true, michael@0: OS: "XPCShell", michael@0: XPCOMABI: "noarch-spidermonkey", michael@0: michael@0: QueryInterface: function QueryInterface(iid) { michael@0: if (iid.equals(Ci.nsIXULAppInfo) || michael@0: iid.equals(Ci.nsIXULRuntime) || michael@0: iid.equals(Ci.nsISupports)) michael@0: return this; michael@0: throw Cr.NS_ERROR_NO_INTERFACE; michael@0: } michael@0: }; michael@0: michael@0: var XULAppInfoFactory = { michael@0: createInstance: function (outer, iid) { michael@0: if (outer != null) michael@0: throw Cr.NS_ERROR_NO_AGGREGATION; michael@0: return XULAppInfo.QueryInterface(iid); michael@0: } michael@0: }; michael@0: michael@0: var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); michael@0: registrar.registerFactory(Components.ID("{ecff8849-cee8-40a7-bd4a-3f4fdfeddb5c}"), michael@0: "XULAppInfo", "@mozilla.org/xre/app-info;1", michael@0: XULAppInfoFactory);