michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: michael@0: const Ci = Components.interfaces; michael@0: const Cc = Components.classes; michael@0: const Cr = Components.results; michael@0: const Cu = Components.utils; michael@0: michael@0: Cu.import("resource://gre/modules/Services.jsm"); michael@0: Cu.import("resource://gre/modules/LoadContextInfo.jsm"); michael@0: michael@0: // Import common head. michael@0: let (commonFile = do_get_file("../../../../../toolkit/components/places/tests/head_common.js", false)) { michael@0: let uri = Services.io.newFileURI(commonFile); michael@0: Services.scriptloader.loadSubScript(uri.spec, this); michael@0: } michael@0: michael@0: // Put any other stuff relative to this test folder below. michael@0: michael@0: michael@0: XPCOMUtils.defineLazyGetter(this, "PlacesUIUtils", function() { michael@0: Cu.import("resource:///modules/PlacesUIUtils.jsm"); michael@0: return PlacesUIUtils; michael@0: }); michael@0: michael@0: michael@0: const ORGANIZER_FOLDER_ANNO = "PlacesOrganizer/OrganizerFolder"; michael@0: const ORGANIZER_QUERY_ANNO = "PlacesOrganizer/OrganizerQuery"; michael@0: michael@0: michael@0: // Needed by some test that relies on having an app registered. michael@0: let (XULAppInfo = { michael@0: vendor: "Mozilla", michael@0: name: "PlacesTest", michael@0: ID: "{230de50e-4cd1-11dc-8314-0800200c9a66}", michael@0: version: "1", michael@0: appBuildID: "2007010101", michael@0: platformVersion: "", michael@0: platformBuildID: "2007010101", michael@0: inSafeMode: false, michael@0: logConsoleErrors: true, michael@0: OS: "XPCShell", michael@0: XPCOMABI: "noarch-spidermonkey", michael@0: michael@0: QueryInterface: XPCOMUtils.generateQI([ michael@0: Ci.nsIXULAppInfo, michael@0: Ci.nsIXULRuntime, michael@0: ]) michael@0: }) { michael@0: let 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: let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); michael@0: registrar.registerFactory(Components.ID("{fbfae60b-64a4-44ef-a911-08ceb70b9f31}"), michael@0: "XULAppInfo", "@mozilla.org/xre/app-info;1", michael@0: XULAppInfoFactory); michael@0: } michael@0: michael@0: // Smart bookmarks constants. michael@0: const SMART_BOOKMARKS_VERSION = 7; michael@0: const SMART_BOOKMARKS_ON_TOOLBAR = 1; michael@0: const SMART_BOOKMARKS_ON_MENU = 3; // Takes into account the additional separator. michael@0: michael@0: // Default bookmarks constants. michael@0: const DEFAULT_BOOKMARKS_ON_TOOLBAR = 1; michael@0: const DEFAULT_BOOKMARKS_ON_MENU = 1;