diff --git a/mailnews/news/tests/Makefile.in b/mailnews/news/tests/Makefile.in index 48ad87ebcc7..3998d006f1b 100644 --- a/mailnews/news/tests/Makefile.in +++ b/mailnews/news/tests/Makefile.in @@ -25,8 +25,7 @@ include $(DEPTH)/config/autoconf.mk MODULE=nntp LIBRARY_NAME=nntpTest -# DIRS = nntp -DIRS = newsParser +DIRS = nntp newsParser EXPORTS = \ $(NULL) diff --git a/mailnews/news/tests/newsParser/newsParserTest.cpp b/mailnews/news/tests/newsParser/newsParserTest.cpp index 9a7dc766b4d..f2b2eaea2ee 100644 --- a/mailnews/news/tests/newsParser/newsParserTest.cpp +++ b/mailnews/news/tests/newsParser/newsParserTest.cpp @@ -122,11 +122,11 @@ nsresult newsTestDriver::RunDriver() nsresult newsTestDriver::GetPath(nsFileSpec& aPathName) { /* eventually turn news://news.mozilla.org/netscape.public.mozilla.unix - into /tmp/mozillanews/news.mozilla.org/netscape.public.mozilla.unix - getting /tmp/mozillanews from the account manager (which gets it + into /u/sspitzer/mozillanews/news.mozilla.org/netscape.public.mozilla.unix + getting /u/sspitzer/mozillanews from the account manager (which gets it from the prefs */ - aPathName = "/tmp/mozillanews/news.mozilla.org/netscape.public.mozilla.unix"; + aPathName = "/u/sspitzer/mozillanews/news.mcom.com.sbd/mcom.linux"; return NS_OK; } diff --git a/mailnews/news/tests/nntp/Makefile.in b/mailnews/news/tests/nntp/Makefile.in index 890bf7291d5..dc03f0f975b 100644 --- a/mailnews/news/tests/nntp/Makefile.in +++ b/mailnews/news/tests/nntp/Makefile.in @@ -53,19 +53,22 @@ LIBS = \ -lmozdbm \ -lxp \ -lpref \ - -ljs \ + -lmozjs \ -lraptorbase \ -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ -lraptorhtml \ -lraptorhtmlpars \ - -lraptorgfx \ + -lexpat \ + -lxmltok \ + -lraptorgfx \ -ljsdom \ -ljsurl \ -limg \ -lpng \ -ljpeg \ -lmozutil \ + -lmsgbaseutil \ $(ZLIB_LIBS) \ $(DIST)/lib/librdfbase_s.a \ $(NSPR_LIBS) \ diff --git a/mailnews/news/tests/nntp/nntpTest.cpp b/mailnews/news/tests/nntp/nntpTest.cpp index e05986bf1ed..d412f4ed168 100644 --- a/mailnews/news/tests/nntp/nntpTest.cpp +++ b/mailnews/news/tests/nntp/nntpTest.cpp @@ -62,12 +62,14 @@ #ifdef XP_PC #define NETLIB_DLL "netlib.dll" #define XPCOM_DLL "xpcom32.dll" +#define NEWS_DLL "msgnews.dll" #else #ifdef XP_MAC #include "nsMacRepository.h" #else #define NETLIB_DLL "libnetlib.so" #define XPCOM_DLL "libxpcom.so" +#define NEWS_DLL "libmsgnews.so" #endif #endif @@ -77,6 +79,7 @@ static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID); static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); +static NS_DEFINE_CID(kNntpUrlCID, NS_NNTPURL_CID); ///////////////////////////////////////////////////////////////////////////////// // Define default values to be used to drive the test @@ -218,8 +221,14 @@ nsNntpTestDriver::nsNntpTestDriver(nsINetService * pNetService, void nsNntpTestDriver::InitializeProtocol(const char * urlString) { + nsresult rv = NS_OK; + // this is called when we don't have a url nor a protocol instance yet... - NS_NewNntpUrl(&m_url, urlString); + rv = nsServiceManager::GetService(kNntpUrlCID, + nsINntpUrl::GetIID(), + (nsISupports**)&m_url); + if (NS_FAILED(rv)) return rv; + // now create a protocl instance... m_nntpProtocol = new nsNNTPProtocol(m_url, m_transport); m_protocolInitialized = PR_TRUE; @@ -655,6 +664,7 @@ int main() nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); + nsComponentManager::RegisterComponent(kNntpUrlCID, NULL, NULL, NEWS_DLL, PR_FALSE, PR_FALSE); // Create the Event Queue for this thread... nsIEventQueueService* pEventQService;