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,