From 42ebf48746932a60c8bd637d10cef065923beb4c Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 20 Apr 1999 00:43:23 +0000 Subject: [PATCH] Temporary fix until mcmullen updates some back end prefs code. We need to manually specify the pref file to use. We can't get at the profile information so look in the current directory. git-svn-id: svn://10.0.0.236/trunk@28191 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/compose/tests/smtp/smtpTest.cpp | 11 +++++++++++ mozilla/mailnews/local/tests/pop3/pop3Test.cpp | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp b/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp index 06ac8215111..a162314a30f 100644 --- a/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp +++ b/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp @@ -70,6 +70,7 @@ static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID); static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID); static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); + ///////////////////////////////////////////////////////////////////////////////// // Define default values to be used to drive the test ///////////////////////////////////////////////////////////////////////////////// @@ -435,6 +436,16 @@ int main() nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE); + // make sure prefs get initialized and loaded.. + // mscott - this is just a bad bad bad hack right now until prefs + // has the ability to take nsnull as a parameter. Once that happens, + // prefs will do the work of figuring out which prefs file to load... + NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result); + if (NS_SUCCEEDED(result) && prefs) + { + prefs->Startup("prefs50.js"); + } + // Create the Event Queue for this thread... nsIEventQueueService* pEventQService; result = nsServiceManager::GetService(kEventQueueServiceCID, diff --git a/mozilla/mailnews/local/tests/pop3/pop3Test.cpp b/mozilla/mailnews/local/tests/pop3/pop3Test.cpp index a55e5f42f7f..59a9f8e7f74 100644 --- a/mozilla/mailnews/local/tests/pop3/pop3Test.cpp +++ b/mozilla/mailnews/local/tests/pop3/pop3Test.cpp @@ -464,6 +464,16 @@ int main() nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kPrefCID, nsnull, nsnull, PREF_DLL, PR_TRUE, PR_TRUE); + // make sure prefs get initialized and loaded.. + // mscott - this is just a bad bad bad hack right now until prefs + // has the ability to take nsnull as a parameter. Once that happens, + // prefs will do the work of figuring out which prefs file to load... + NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &result); + if (NS_SUCCEEDED(result) && prefs) + { + prefs->Startup("prefs50.js"); + } + // Create the Event Queue for this thread... nsIEventQueueService* pEventQService; result = nsServiceManager::GetService(kEventQueueServiceCID,