From 6078ccd47fa6d6f4b8030741fbb253c70640df24 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Fri, 19 Mar 1999 04:09:33 +0000 Subject: [PATCH] Helping with smoketest. When we are done running a mailbox url, write the phrase Mailbox Done followed by a line return to a text file. QA will build an automated smoketest which will look for this phrase in that particular file. I've also wrapped the change in a ENABLE_SMOKETEST ifdef.... --- mailnews/local/src/nsMailboxProtocol.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mailnews/local/src/nsMailboxProtocol.cpp b/mailnews/local/src/nsMailboxProtocol.cpp index f23f70f14cd3..68ed59c9e837 100644 --- a/mailnews/local/src/nsMailboxProtocol.cpp +++ b/mailnews/local/src/nsMailboxProtocol.cpp @@ -34,6 +34,8 @@ #include "prerror.h" #include "prprf.h" +#define ENABLE_SMOKETEST 1 + static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID); static NS_DEFINE_IID(kIWebShell, NS_IWEB_SHELL_IID); @@ -205,10 +207,17 @@ NS_IMETHODIMP nsMailboxProtocol::OnStopBinding(nsIURL* aURL, nsresult aStatus, c // is printed out to the console and determining if the mail app loaded up correctly...obviously // this solution is not very good so we should look at something better, but don't remove this // line before talking to me (mscott) and mailnews QA.... - printf("Mailbox Done\n"); +#ifdef ENABLE_SMOKETEST + PRFileDesc * smokeTestFile = PR_Open("MailSmokeTest.txt", PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 00700); + if (smokeTestFile) + { + const char * smokeString = "Mailbox Done\n"; + PR_Write(smokeTestFile,(void *) smokeString, PL_strlen(smokeString)); + PR_Close(smokeTestFile); + } +#endif return NS_OK; - } /////////////////////////////////////////////////////////////////////////////////////////////