added an optional # to viewer.exe command line switch -p. If a number is provided, it is used as the last sample to load when running in purify. This is useful for running just a the first sample

in purify, or a small number of samples, for example.
This commit is contained in:
buster 1998-05-28 21:39:40 +00:00
Родитель c3e2859006
Коммит d31d2b36e6
2 изменённых файлов: 155 добавлений и 45 удалений

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

@ -1,42 +1,142 @@
<html> <HTML>
<TITLE>Example 4</TITLE> <HEAD>
<style> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.09 [en] (WinNT; U) [Netscape]">
<TITLE>test4</TITLE>
<STYLE>
BODY { font-size: 12pt; } BODY { font-size: 12pt; }
</style> </STYLE>
<body> </HEAD>
<BODY>
<H1>Example 4: Some simple tables.</H4> <H1>
Example 4: Some simple tables.</H1>
<table border=1> <TABLE BORDER >
<TR><TD background=bg.jpg>Color</TD><TD background=bg.jpg>Meaning</TD></TR> <TR>
<TR><TD bgcolor=lightgreen>lightgreen</TD><TD>Light green is used on cells that have a colspan</TD></TR> <TH BACKGROUND="bg.jpg">Color&nbsp;</TH>
<TR><TD bgcolor=Khaki>khaki</TD><TD>Khaki is used on cells that have a rowspan</TD></TR>
<TR><TD bgcolor="LightGrey">lightgrey</TD><TD>Light grey is used on cells that have a rowspan <B>and</B> a colspan</TD></TR>
</table>
<THREED>Column span table:</THREED> <TH BACKGROUND="bg.jpg">Meaning&nbsp;</TH>
<table border=1> </TR>
<CAPTION>top caption</CAPTION>
<TR><TD COLSPAN=2 bgcolor=lightgreen>Cell</TD><TD> Stuff to test out table cell layout. This should be long enough.</TD></TR>
<TR><TD>Cell</TD><TD COLSPAN=2 bgcolor=lightgreen> Stuff to test out table cell layout. This should be long enough.</TD></TR>
<TR><TD>Cell</TD><TD> Stuff to test out table cell layout. This should be long enough.</TD><TD>Cell</TD></TR>
</table>
<br>
<THREED>Row span table, no caption:</THREED>
<table border=1>
<CAPTION align=bottom>bottom caption</CAPTION>
<TR><TD>Cell</TD><TD ROWSPAN=2 bgcolor=khaki> Stuff to test out table cell layout. This should be long enough.</TD><TD>Cell</TD></TR>
<TR><TD>Cell</TD><TD>Cell</TD></TR>
<TR><TD>Cell</TD><TD> Stuff to test out table cell layout. This should be long enough.</TD><TD>Cell</TD></TR>
</table>
<br>
<THREED>Row and col span table:</THREED>
<table border=1>
<caption><P>Caption Text</P></caption>
<TR><TD>Cell</TD><TD COLSPAN=2 ROWSPAN=2 bgcolor=lightgrey> Stuff to test out table cell layout. This should be long enough.</TD></TR>
<TR><TD>Cell</TD></TR>
<TR><TD>Cell</TD><TD> Stuff to test out table cell layout. This should be long enough.</TD><TD><THREED>Cell</THREED></TD></TR>
</table>
</body>
</html>
<TR>
<TD BGCOLOR="#90EE90">lightgreen</TD>
<TD>Light green is used on cells that have a colspan</TD>
</TR>
<TR>
<TD BGCOLOR="#F0E68C">khaki</TD>
<TD>Khaki is used on cells that have a rowspan</TD>
</TR>
<TR>
<TD BGCOLOR="#D3D3D3">lightgrey</TD>
<TD>Light grey is used on cells that have a rowspan <B>and</B> a colspan</TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER WIDTH="100%" >
<CAPTION>Table 1 has a caption at the top.&nbsp; It is defined to be 100%
of it's parent's width.</CAPTION>
<TR>
<TD COLSPAN="2" BGCOLOR="#90EE90">Cell</TD>
<TD>Stuff to test out table cell layout. This should be long enough.</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD COLSPAN="2" BGCOLOR="#90EE90">Stuff to test out table cell layout.
This should be long enough.</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD>Stuff to test out table cell layout. This should be long enough.</TD>
<TD>Cell</TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER WIDTH="500" >
<TR>
<TD>Cell</TD>
<TD ROWSPAN="2" BGCOLOR="#F0E68C">Stuff to test out table cell layout.
This should be long enough.</TD>
<TD>Cell</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD>Cell</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD>Stuff to test out table cell layout. This should be long enough.</TD>
<TD>Cell</TD>
</TR>
<CAPTION ALIGN=BOTTOM>Table 2 has a bottom caption.&nbsp; It's width is
500 pixels.</CAPTION>
</TABLE>
&nbsp;
<TABLE BORDER >
<CAPTION>Table 3 has auto-width (no width param specified.)</CAPTION>
<TR>
<TD>Cell</TD>
<TD COLSPAN="2" ROWSPAN="2" BGCOLOR="#D3D3D3">Stuff to test out table cell
layout. This should be long enough.</TD>
</TR>
<TR>
<TD>Cell</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD>Stuff to test out table cell layout. This should be long enough.</TD>
<TD><THREED>3-D Text</THREED></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER COLS=3 >
<CAPTION>Table 4 is the same as Table 3, but with equal column widths.&nbsp;</CAPTION>
<TR>
<TD>Cell</TD>
<TD COLSPAN="2" ROWSPAN="2" BGCOLOR="#D3D3D3">Stuff to test out table cell
layout. This should be long enough.</TD>
</TR>
<TR>
<TD>Cell</TD>
</TR>
<TR>
<TD>Cell</TD>
<TD>Stuff to test out table cell layout. This should be long enough.</TD>
<TD><THREED>3-D Text</THREED></TD>
</TR>
</TABLE>
&nbsp;
</BODY>
</HTML>

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

@ -66,11 +66,12 @@ static char* class2Name = "PrintPreview";
static HANDLE gInstance, gPrevInstance; static HANDLE gInstance, gPrevInstance;
static char* startURL; static char* startURL;
static nsVoidArray* gWindows; static nsVoidArray* gWindows;
static PRBool gDoPurify; static PRBool gDoPurify; // run in Purify auto mode
static PRBool gDoQuantify; static PRBool gDoQuantify; // run in Quantify auto mode
static PRBool gLoadTestFromFile; static PRBool gLoadTestFromFile; // run in auto mode by pulling URLs from a file (gInputFileName)
static PRInt32 gDelay=1; static PRInt32 gDelay=1; // if running in an auto mode, this is the delay between URL loads
static PRInt32 gRepeatCount=1; static PRInt32 gRepeatCount=1; // if running in an auto mode, this is the number of times to cycle through the input
static PRInt32 gNumSamples=9; // if running in an auto mode that uses the samples, this is the last sample to load
static char gInputFileName[_MAX_PATH+1]; static char gInputFileName[_MAX_PATH+1];
// Debug Robot options // Debug Robot options
@ -187,7 +188,7 @@ static DocObserver* NewObserver(nsIWebWidget* ww)
void AddTestDocs(nsDocLoader* aDocLoader) void AddTestDocs(nsDocLoader* aDocLoader)
{ {
char url[500]; char url[500];
for (int docnum = 0; docnum < 9; docnum++) for (int docnum = 0; docnum < gNumSamples; docnum++)
{ {
PR_snprintf(url, 500, "%s/test%d.html", SAMPLES_BASE_URL, docnum); PR_snprintf(url, 500, "%s/test%d.html", SAMPLES_BASE_URL, docnum);
aDocLoader->AddURL(url); aDocLoader->AddURL(url);
@ -870,7 +871,7 @@ BOOL CreateRobotDialog(HWND hParent)
void PrintHelpInfo(char **argv) void PrintHelpInfo(char **argv)
{ {
fprintf(stderr, "Usage: %s [-p][-q][-md #][-f filename][-d #] [starting url]\n", argv[0]); fprintf(stderr, "Usage: %s [-p][-q][-md #][-f filename][-d #] [starting url]\n", argv[0]);
fprintf(stderr, "\t-p -- run purify\n"); fprintf(stderr, "\t-p[#] -- run purify, optionally with a # that says which sample to stop at. For example, -p2 says to run samples 0, 1, and 2.\n");
fprintf(stderr, "\t-q -- run quantify\n"); fprintf(stderr, "\t-q -- run quantify\n");
fprintf(stderr, "\t-md # -- set the crt debug flags to #\n"); fprintf(stderr, "\t-md # -- set the crt debug flags to #\n");
fprintf(stderr, "\t-d # -- set the delay between URL loads to # (in milliseconds)\n"); fprintf(stderr, "\t-d # -- set the delay between URL loads to # (in milliseconds)\n");
@ -882,8 +883,17 @@ void main(int argc, char **argv)
{ {
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
if (argv[i][0] == '-') { if (argv[i][0] == '-') {
if (strcmp(argv[i], "-p") == 0) { if (strncmp(argv[i], "-p", 2) == 0) {
gDoPurify = PR_TRUE; gDoPurify = PR_TRUE;
char *optionalSampleStopIndex = &(argv[i][2]);
if (nsnull!=*optionalSampleStopIndex)
{
if (1!=sscanf(optionalSampleStopIndex, "%d", &gNumSamples))
{
PrintHelpInfo(argv);
exit(-1);
}
}
} }
else if (strcmp(argv[i], "-q") == 0) { else if (strcmp(argv[i], "-q") == 0) {
gDoQuantify = PR_TRUE; gDoQuantify = PR_TRUE;