sr=waterson r=karnaze. Fixed printing regression tests.

This commit is contained in:
dcone%netscape.com 2001-05-03 22:12:35 +00:00
Родитель 51c0be37d7
Коммит 753055d4d5
3 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -416,7 +416,8 @@ PrintHelpInfo(char **argv)
fprintf(stderr, "-A domain -- add a domain/host that should be avoided (e.g. microsoft.com)\n");
fprintf(stderr, "-N pages -- set the max # of pages to crawl\n");
fprintf(stderr, "-x -- startup and just shutdown to test for leaks under Purify\n");
fprintf(stderr, "-Prt -- printer test will be run\n");
fprintf(stderr, "-Prt -- number of the printer test 1=regression, no printout \n");
fprintf(stderr, "-B -- Setting for regression output 1=brief, 2=verbose \n");
#if defined(NS_DEBUG) && defined(XP_WIN)
fprintf(stderr, "-md # -- set the crt debug flags to #\n");
#endif
@ -633,6 +634,15 @@ nsViewerApp::ProcessArguments(int argc, char** argv)
else if (PL_strcmp(argv[i], "-?") == 0) {
PrintHelpInfo(argv);
}
else if (PL_strcmp(argv[i], "-B") == 0) {
int regressionOutput;
i++;
if (i>=argc || 1!=sscanf(argv[i], "%d", &regressionOutput)){
PrintHelpInfo(argv);
exit(-1);
}
mCrawler->RegressionOutput(regressionOutput);
}
else if (PL_strcmp(argv[i], "-Prt") == 0) {
int printTestType;
i++;

Просмотреть файл

@ -204,6 +204,7 @@ nsWebCrawler::nsWebCrawler(nsViewerApp* aViewer)
LL_I2L(mStartLoad, 0);
mRegressing = PR_FALSE;
mPrinterTestType = 0;
mRegressionOutputLevel = 0; // full output
mIncludeStyleInfo = PR_TRUE;
mLastWebShell = nsnull;
}
@ -992,7 +993,7 @@ nsWebCrawler::PerformRegressionTest(const nsString& aOutputName)
NS_RELEASE(fu);
return;
}
rv = fu->CompareRegressionData(f1, f2);
rv = fu->CompareRegressionData(f1, f2,mRegressionOutputLevel);
NS_RELEASE(fu);
char dirName[BUF_SIZE];

Просмотреть файл

@ -71,6 +71,8 @@ public:
void SetPrintTest(PRInt32 aTestType) { mPrinterTestType = aTestType; }
void RegressionOutput(PRInt32 aRegressionOutputLevel) { mRegressionOutputLevel = aRegressionOutputLevel; }
void EnableJiggleLayout() {
mJiggleLayout = PR_TRUE;
}
@ -179,6 +181,7 @@ protected:
PRBool mVerbose;
PRBool mRegressing;
PRInt32 mPrinterTestType;
PRInt32 mRegressionOutputLevel;
nsString mRegressionDir;
PRBool mIncludeStyleInfo;