diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in index be7e80b90b4..7adf23c1140 100644 --- a/browser/components/build/Makefile.in +++ b/browser/components/build/Makefile.in @@ -36,6 +36,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../places/src \ -I$(srcdir)/../privatebrowsing/src \ -I$(srcdir)/../about \ + -I$(srcdir)/../dirprovider \ $(NULL) ifeq ($(OS_ARCH),WINNT) @@ -47,6 +48,7 @@ SHARED_LIBRARY_LIBS = \ ../places/src/$(LIB_PREFIX)browserplaces_s.$(LIB_SUFFIX) \ ../privatebrowsing/src/$(LIB_PREFIX)privatebrowsing_s.$(LIB_SUFFIX) \ ../about/$(LIB_PREFIX)browserabout_s.$(LIB_SUFFIX) \ + ../dirprovider/$(LIB_PREFIX)browserdir_s.$(LIB_SUFFIX) \ $(NULL) ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT))) diff --git a/browser/components/build/nsBrowserCompsCID.h b/browser/components/build/nsBrowserCompsCID.h index 32a4d937028..f6f51a23e66 100644 --- a/browser/components/build/nsBrowserCompsCID.h +++ b/browser/components/build/nsBrowserCompsCID.h @@ -106,3 +106,6 @@ #define NS_BROWSER_ABOUT_REDIRECTOR_CID \ { 0x7e4bb6ad, 0x2fc4, 0x4dc6, { 0x89, 0xef, 0x23, 0xe8, 0xe5, 0xcc, 0xf9, 0x80 } } +// {6DEB193C-F87D-4078-BC78-5E64655B4D62} +#define NS_BROWSERDIRECTORYPROVIDER_CID \ +{ 0x6deb193c, 0xf87d, 0x4078, { 0xbc, 0x78, 0x5e, 0x64, 0x65, 0x5b, 0x4d, 0x62 } } diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp index ad7eb1f3c45..30dfc6afbf2 100644 --- a/browser/components/build/nsModule.cpp +++ b/browser/components/build/nsModule.cpp @@ -39,6 +39,7 @@ #include "nsIGenericFactory.h" #include "nsBrowserCompsCID.h" +#include "DirectoryProvider.h" #include "nsPlacesImportExportService.h" #if defined(XP_WIN) @@ -84,6 +85,7 @@ using namespace mozilla::browser; ///////////////////////////////////////////////////////////////////////////// +NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider) NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlacesImportExportService) #if defined(XP_WIN) NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService) @@ -124,6 +126,14 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init) static const nsModuleComponentInfo components[] = { + { "Browser Directory Provider", + NS_BROWSERDIRECTORYPROVIDER_CID, + NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, + DirectoryProviderConstructor, + DirectoryProvider::Register, + DirectoryProvider::Unregister + }, + #if defined(XP_WIN) { "Browser Shell Service", NS_SHELLSERVICE_CID, diff --git a/browser/components/dirprovider/nsBrowserDirectoryProvider.cpp b/browser/components/dirprovider/DirectoryProvider.cpp similarity index 78% rename from browser/components/dirprovider/nsBrowserDirectoryProvider.cpp rename to browser/components/dirprovider/DirectoryProvider.cpp index 5f58c918afd..df3bc940d14 100644 --- a/browser/components/dirprovider/nsBrowserDirectoryProvider.cpp +++ b/browser/components/dirprovider/DirectoryProvider.cpp @@ -36,6 +36,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsIDirectoryService.h" +#include "DirectoryProvider.h" #include "nsIFile.h" #include "nsISimpleEnumerator.h" @@ -56,52 +57,15 @@ #include "nsStringAPI.h" #include "nsXULAppAPI.h" -class nsBrowserDirectoryProvider : - public nsIDirectoryServiceProvider2 -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIDIRECTORYSERVICEPROVIDER - NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 +namespace mozilla { +namespace browser { - static NS_METHOD Register(nsIComponentManager* aCompMgr, - nsIFile* aPath, const char *aLoaderStr, - const char *aType, - const nsModuleComponentInfo *aInfo); - - static NS_METHOD Unregister(nsIComponentManager* aCompMgr, - nsIFile* aPath, const char *aLoaderStr, - const nsModuleComponentInfo *aInfo); - -private: - nsresult RestoreBookmarksFromBackup(const nsACString& aLeafName, - nsIFile* aParentDir, nsIFile* aTarget); - void EnsureProfileFile(const nsACString& aLeafName, - nsIFile* aParentDir, nsIFile* aTarget); - - class AppendingEnumerator : public nsISimpleEnumerator - { - public: - NS_DECL_ISUPPORTS - NS_DECL_NSISIMPLEENUMERATOR - - AppendingEnumerator(nsISimpleEnumerator* aBase, - char const *const *aAppendList); - - private: - nsCOMPtr mBase; - char const *const *const mAppendList; - nsCOMPtr mNext; - }; -}; - -NS_IMPL_ISUPPORTS2(nsBrowserDirectoryProvider, +NS_IMPL_ISUPPORTS2(DirectoryProvider, nsIDirectoryServiceProvider, nsIDirectoryServiceProvider2) NS_IMETHODIMP -nsBrowserDirectoryProvider::GetFile(const char *aKey, PRBool *aPersist, - nsIFile* *aResult) +DirectoryProvider::GetFile(const char *aKey, PRBool *aPersist, nsIFile* *aResult) { nsresult rv; @@ -290,8 +254,7 @@ AppendDistroSearchDirs(nsIProperties* aDirSvc, nsCOMArray &array) } NS_IMETHODIMP -nsBrowserDirectoryProvider::GetFiles(const char *aKey, - nsISimpleEnumerator* *aResult) +DirectoryProvider::GetFiles(const char *aKey, nsISimpleEnumerator* *aResult) { nsresult rv; @@ -331,17 +294,10 @@ nsBrowserDirectoryProvider::GetFiles(const char *aKey, return NS_ERROR_FAILURE; } -static char const kContractID[] = "@mozilla.org/browser/directory-provider;1"; - -// {6DEB193C-F87D-4078-BC78-5E64655B4D62} -#define NS_BROWSERDIRECTORYPROVIDER_CID \ - { 0x6deb193c, 0xf87d, 0x4078, { 0xbc, 0x78, 0x5e, 0x64, 0x65, 0x5b, 0x4d, 0x62 } } - NS_METHOD -nsBrowserDirectoryProvider::Register(nsIComponentManager* aCompMgr, - nsIFile* aPath, const char *aLoaderStr, - const char *aType, - const nsModuleComponentInfo *aInfo) +DirectoryProvider::Register(nsIComponentManager* aCompMgr, nsIFile* aPath, + const char *aLoaderStr, const char *aType, + const nsModuleComponentInfo *aInfo) { nsresult rv; @@ -352,15 +308,16 @@ nsBrowserDirectoryProvider::Register(nsIComponentManager* aCompMgr, rv = catMan->AddCategoryEntry(XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", - kContractID, PR_TRUE, PR_TRUE, nsnull); + NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, + PR_TRUE, PR_TRUE, nsnull); return rv; } NS_METHOD -nsBrowserDirectoryProvider::Unregister(nsIComponentManager* aCompMgr, - nsIFile* aPath, const char *aLoaderStr, - const nsModuleComponentInfo *aInfo) +DirectoryProvider::Unregister(nsIComponentManager* aCompMgr, + nsIFile* aPath, const char *aLoaderStr, + const nsModuleComponentInfo *aInfo) { nsresult rv; @@ -374,32 +331,17 @@ nsBrowserDirectoryProvider::Unregister(nsIComponentManager* aCompMgr, return rv; } -NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserDirectoryProvider) - -static const nsModuleComponentInfo components[] = { - { - "nsBrowserDirectoryProvider", - NS_BROWSERDIRECTORYPROVIDER_CID, - kContractID, - nsBrowserDirectoryProviderConstructor, - nsBrowserDirectoryProvider::Register, - nsBrowserDirectoryProvider::Unregister - } -}; - -NS_IMPL_NSGETMODULE(BrowserDirProvider, components) -NS_IMPL_ISUPPORTS1(nsBrowserDirectoryProvider::AppendingEnumerator, - nsISimpleEnumerator) +NS_IMPL_ISUPPORTS1(DirectoryProvider::AppendingEnumerator, nsISimpleEnumerator) NS_IMETHODIMP -nsBrowserDirectoryProvider::AppendingEnumerator::HasMoreElements(PRBool *aResult) +DirectoryProvider::AppendingEnumerator::HasMoreElements(PRBool *aResult) { *aResult = mNext ? PR_TRUE : PR_FALSE; return NS_OK; } NS_IMETHODIMP -nsBrowserDirectoryProvider::AppendingEnumerator::GetNext(nsISupports* *aResult) +DirectoryProvider::AppendingEnumerator::GetNext(nsISupports* *aResult) { if (aResult) NS_ADDREF(*aResult = mNext); @@ -440,7 +382,7 @@ nsBrowserDirectoryProvider::AppendingEnumerator::GetNext(nsISupports* *aResult) return NS_OK; } -nsBrowserDirectoryProvider::AppendingEnumerator::AppendingEnumerator +DirectoryProvider::AppendingEnumerator::AppendingEnumerator (nsISimpleEnumerator* aBase, char const *const *aAppendList) : mBase(aBase), @@ -449,3 +391,6 @@ nsBrowserDirectoryProvider::AppendingEnumerator::AppendingEnumerator // Initialize mNext to begin. GetNext(nsnull); } + +} // namespace browser +} // namespace mozilla diff --git a/browser/components/dirprovider/DirectoryProvider.h b/browser/components/dirprovider/DirectoryProvider.h new file mode 100644 index 00000000000..87f27148328 --- /dev/null +++ b/browser/components/dirprovider/DirectoryProvider.h @@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Mozilla Firefox browser. + * + * The Initial Developer of the Original Code is + * Benjamin Smedberg + * + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * 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 ***** */ + +#ifndef DirectoryProvider_h__ +#define DirectoryProvider_h__ + +#include "nsIDirectoryService.h" +#include "nsComponentManagerUtils.h" +#include "nsISimpleEnumerator.h" +#include "nsIFile.h" +#include "nsIGenericFactory.h" + +#define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \ + "@mozilla.org/browser/directory-provider;1" + +namespace mozilla { +namespace browser { + +class DirectoryProvider : public nsIDirectoryServiceProvider2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIDIRECTORYSERVICEPROVIDER + NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 + + static NS_METHOD Register(nsIComponentManager* aCompMgr, + nsIFile* aPath, const char *aLoaderStr, + const char *aType, + const nsModuleComponentInfo *aInfo); + + static NS_METHOD Unregister(nsIComponentManager* aCompMgr, + nsIFile* aPath, const char *aLoaderStr, + const nsModuleComponentInfo *aInfo); + +private: + class AppendingEnumerator : public nsISimpleEnumerator + { + public: + NS_DECL_ISUPPORTS + NS_DECL_NSISIMPLEENUMERATOR + + AppendingEnumerator(nsISimpleEnumerator* aBase, + char const *const *aAppendList); + + private: + nsCOMPtr mBase; + char const *const *const mAppendList; + nsCOMPtr mNext; + }; +}; + +} // namespace browser +} // namespace mozilla + +#endif // DirectoryProvider_h__ diff --git a/browser/components/dirprovider/Makefile.in b/browser/components/dirprovider/Makefile.in index 0530eb11bc9..4175d002529 100644 --- a/browser/components/dirprovider/Makefile.in +++ b/browser/components/dirprovider/Makefile.in @@ -42,12 +42,13 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = browsercomps -LIBRARY_NAME = browserdirprovider -SHORT_LIBNAME = brwsrdir -IS_COMPONENT = 1 -MODULE_NAME = BrowserDirProvider -FORCE_SHARED_LIB = 1 +MODULE = browserdir +LIBRARY_NAME = browserdir_s + +DIRS = tests + +FORCE_STATIC_LIB = 1 +FORCE_USE_PIC = 1 # Because we are an application component, link against the CRT statically # (on Windows, but only if we're not building our own CRT for jemalloc) @@ -55,7 +56,12 @@ ifndef MOZ_MEMORY USE_STATIC_LIBS = 1 endif -CPPSRCS = nsBrowserDirectoryProvider.cpp +EXPORTS_NAMESPACES = mozilla/browser +EXPORTS_mozilla/browser = DirectoryProvider.h + +CPPSRCS = DirectoryProvider.cpp + +LOCAL_INCLUDES = -I$(srcdir)/../build EXTRA_DSO_LDOPTS = \ $(XPCOM_GLUE_LDOPTS) \ diff --git a/browser/components/dirprovider/tests/Makefile.in b/browser/components/dirprovider/tests/Makefile.in new file mode 100644 index 00000000000..c13c9bd5195 --- /dev/null +++ b/browser/components/dirprovider/tests/Makefile.in @@ -0,0 +1,49 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2009 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Ryan Flint (Original Author) +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# 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 ***** + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = browser/components/dirprovider/tests + +include $(DEPTH)/config/autoconf.mk + +MODULE = test_browserdir + +XPCSHELL_TESTS = unit + +include $(topsrcdir)/config/rules.mk diff --git a/browser/components/dirprovider/tests/unit/head_dirprovider.js b/browser/components/dirprovider/tests/unit/head_dirprovider.js new file mode 100644 index 00000000000..0e329ce577b --- /dev/null +++ b/browser/components/dirprovider/tests/unit/head_dirprovider.js @@ -0,0 +1,52 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Ryan Flint + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * 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 ***** */ + +const Cc = Components.classes; +const Ci = Components.interfaces; + +var gProfD = do_get_profile(); +var gDirSvc = Cc["@mozilla.org/file/directory_service;1"]. + getService(Ci.nsIProperties); +var gPrefSvc = Cc["@mozilla.org/preferences-service;1"]. + getService(Ci.nsIPrefBranch); + +function writeTestFile(aParent, aName) { + let file = aParent.clone(); + file.append(aName); + file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0644); + return file; +} + diff --git a/browser/components/dirprovider/tests/unit/test_bookmark_pref.js b/browser/components/dirprovider/tests/unit/test_bookmark_pref.js new file mode 100644 index 00000000000..55d6764e5e4 --- /dev/null +++ b/browser/components/dirprovider/tests/unit/test_bookmark_pref.js @@ -0,0 +1,46 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Ryan Flint + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * 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 ***** */ + +// We need to run this test separately since DirectoryProvider persists BMarks + +function run_test() { + let dir = gProfD.clone(); + let tfile = writeTestFile(dir, "bookmarkfile.test"); + gPrefSvc.setCharPref("browser.bookmarks.file", tfile.path); + + let bmarks = gDirSvc.get("BMarks", Ci.nsIFile); + do_check_true(tfile.equals(bmarks)); +} diff --git a/browser/components/dirprovider/tests/unit/test_keys.js b/browser/components/dirprovider/tests/unit/test_keys.js new file mode 100644 index 00000000000..ace9d2137b3 --- /dev/null +++ b/browser/components/dirprovider/tests/unit/test_keys.js @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Ryan Flint + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * 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 test_usr_micsum() { + let mdir = gProfD.clone(); + mdir.append("microsummary-generators"); + + let tmdir = gDirSvc.get("UsrMicsumGens", Ci.nsIFile); + do_check_true(tmdir.equals(mdir)); + + if (!tmdir.exists()) + tmdir.create(Ci.nsIFile.DIRECTORY_TYPE, 0777); + + do_check_true(tmdir.isWritable()); + + let tfile = writeTestFile(tmdir, "usrmicsum"); + do_check_true(tfile.exists()); + + mdir.append(tfile.leafName); + do_check_true(mdir.exists()); +} + +function test_app_micsum() { + let mdir = gDirSvc.get("XCurProcD", Ci.nsIFile); + mdir.append("microsummary-generators"); + + let tmdir = gDirSvc.get("MicsumGens", Ci.nsIFile); + do_check_true(tmdir.equals(mdir)); +} + +function test_bookmarkhtml() { + let bmarks = gProfD.clone(); + bmarks.append("bookmarks.html"); + + let tbmarks = gDirSvc.get("BMarks", Ci.nsIFile); + do_check_true(bmarks.equals(tbmarks)); +} + +function test_prefoverride() { + let dir = gDirSvc.get("DefRt", Ci.nsIFile); + dir.append("existing-profile-defaults.js"); + + let tdir = gDirSvc.get("ExistingPrefOverride", Ci.nsIFile); + do_check_true(dir.equals(tdir)); +} + +function run_test() { + [test_usr_micsum, + test_app_micsum, + test_bookmarkhtml, + test_prefoverride + ].forEach(function(f) { + do_test_pending(); + print("Running test: " + f.name); + f(); + do_test_finished(); + }); +} diff --git a/browser/installer/removed-files.in b/browser/installer/removed-files.in index 768b6a24cc1..7a0060cd9f5 100644 --- a/browser/installer/removed-files.in +++ b/browser/installer/removed-files.in @@ -69,6 +69,8 @@ components/aboutRights.js components/aboutRobots.js components/aboutSessionRestore.js components/compreg.dat +components/@DLL_PREFIX@browserdirprovider@DLL_SUFFIX@ +components/@DLL_PREFIX@brwsrdir@DLL_SUFFIX@ components/@DLL_PREFIX@myspell@DLL_SUFFIX@ components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@ components/@DLL_PREFIX@spellchk@DLL_SUFFIX@