Regression Test files.

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@73536 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2000-06-29 21:41:02 +00:00
parent 23041af290
commit 36b124ebdc
24 changed files with 750 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<html>
<body>
<form>
<table bgcolor=red>
<input>
<tr><td><input></td></tr>
</table>
</form>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<HTML><HEAD>
<style type="text/css">
span:before { content: "<" attr(class) ">" }
span:after { content: "</" attr(class) ">" }
span.a {
font-size: 130%;
color: blue;
}
span.z {
padding-left: 50px;
display: block;
color: green;
}
</style>
</HEAD>
<BODY><FONT FACE="Arial"><!-- Deleting this font tag fixes the bug -->
<P>testcase 4</P><!-- Deleting this paragraph or adding a space
before or after this comment fixes the bug -->
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
</font></body></html>

View File

@@ -0,0 +1,20 @@
<HTML>
<BODY>
<TABLE width=500>
<TR>
<TD width=100 bgcolor=yellow>
<B>
<FORM>
<NOBR>
<IMG SRC="http://bugzilla.mozilla.org/ant.jpg" width=100 HEIGHT=30>
</NOBR>
</FORM>
UNSER ANGEBOT
</TD>
<TD width=400>
Foo
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@@ -0,0 +1,17 @@
<HTML>
<TABLE BORDER="1">
<tr>
<td>
<b>
Test
</td>
</tr>
<TD>
Test
</TD>
</TR>
</TABLE>
</html>

View File

@@ -0,0 +1,15 @@
<html>
<body>
<script>
document.write('<style>')
document.write(".menured { color: red; } \n")
document.write('</style>')
</script>
<p class="menured">This should be the only text visible and it should be red</p>
</body></html>

View File

@@ -0,0 +1,19 @@
<html>
<body>
<p>
<font face="arial, helvetica" color=red>
<table border="1">
<tr><td><font size=+1><a href=foo.html>SHOULD BE TIMES ROMAN</a></font></td></tr>
</table>
<p>
<font size='+1'>
<b>
<a href=foo.html>SHOULD BE HELVETICA
</a>
</b>
</font>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<html>
<head>
<title>Bug</title>
</head>
<body>
BUG:<BR>
<SPAN style="color:blue">&lt;SPAN>
<DIV style="color:red">&lt;DIV>
<SPAN style="color:green">&lt;SPAN>
&lt;/SPAN></SPAN>
&lt;/DIV></DIV>
&lt;/SPAN></SPAN>
<HR>
NO BUG:<BR>
<SPAN style="color:blue">&lt;SPAN>
<DIV style="color:red">&lt;DIV>
<B style="color:green">&lt;B>
&lt;/B></B>
&lt;/DIV></DIV>
&lt;/SPAN></SPAN>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Welcome to MSN.com</TITLE>
</head>
<body>
<a href="http://ads.msn.com/ads/adredir.asp?url=http://www.fidelity.com&image=http://ads.msn.com/ads/MSNBTA/FI610001_TR.gif">
fidelity
</body>
</html>

View File

@@ -0,0 +1,94 @@
#/usr/bin/perl
die "\nUsage: perl RtestDTD.pl [FLAG] url_list.txt.
FLAGS:
-v = verify ( would create rtest_html.veri )
-b = baseline ( would create rtest_html.base )
-help = info. on running the script\n"
if( @ARGV[0]!~/-help/ && ((@ARGV >2 || @ARGV < 2) || ($ARGV[0]!~m/-v/ && $ARGV[0]!~m/-b/)));
if($ARGV[0]=~m/-help/) {
print "
1. \"url_list.txt\" can be generated by running UrlGen.pl
Ex. perl UrlGen.pl.
2. Run base line (-b) before making changes in your tree.
This will generate rtest_html.base file [DO NOT CHANGE THIS].
3. Run verification (-v) after making changes in your tree.
This will generate rtest_html.veri file and will compare
rtest_html.base and rtest_html.veri.
NOTE: Need perl version 5.0 or greater. \n";
exit(0);
}
use Cwd;
$ENV{"PARSER_DUMP_CONTENT"}=1;
($drive,@path)=split(/:/,`cd`);
system("$drive:\\mozilla\\dist\\win32_d.obj\\bin\\viewer.exe -f $ARGV[1]");
if($ARGV[0]=~m/-b/) {
rename("rtest_html.txt","rtest_html.base");
}
elsif($ARGV[0]=~m/-v/) {
rename("rtest_html.txt","rtest_html.veri");
@result=CompareFiles("rtest_html.base","rtest_html.veri");
Display(@result);
}
sub CompareFiles {
open(BASE,"<$_[0]") || die "Can't output $_[0] $!";
open(VERI,"<$_[1]") || die "Can't output $_[1] $!";
#Separate file contents into URL and DOCUMENT
while(<BASE>) {
($url,$document1)=split/;/;
push(@url1,$url);
push(@documents1,$document1);
}
while(<VERI>) {
($url,$document2)=split/;/;
push(@url2,$url);
push(@documents2,$document2);
}
#Search for documents that don't match
for($i=0;$i<=$#documents1+1;$i++) {
if($documents1[$i] !~ /$documents2[$i]/) {
(@string1)=split(//,$documents1[$i]);
(@string2)=split(//,$documents2[$i]);
for($j=0;$j<=$#string1;$j++) {
# Find the character that failed
if($string1[$j] !~ /$string2[$j]/) {
push(@result,$url1[$i],$string2[$j],$j);
$j=@string1; # Stop looping
}
}
}
}
close(BASE);
close(VERI);
return @result;
}
sub Display {
for($i=0;$i<@_;$i++) {
print "\n $_[$i++] failed on character '$_[$i++]' at location $_[$i]";
}
print "\n--------------------\n";
$count=@_/3;
if(($count)>0) {
print "$count url(s) failed\n";
}
else {
print "\nALL SUCCEEDED\n";
}
}

View File

@@ -0,0 +1,62 @@
<html>
<head>
<title> Bad Content </title>
</head>
<style>
table {
border: solid red;
background-color:yellow;
}
P { background-color: pink; }
</style>
<body>
<table >
<tr>
<td>
<P> some text
two</td>
</tr>
</table>
<table>
<tr>
<P>ss
<td>three</td>
</tr>
</table>
<table>
<tr>
<P>one
<td>
<table>
<P>last
<tr>
<P>two
<td>
<table>
<tr>
<P>three
<td>
<table>
<tr>
<td>
4TD
</td>
</tr>
</table>
</td>
<P>three last
</tr>
</table>
</td>
<P>two last
</tr>
</table>
</td>
<P>one last
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<html>
<head>
<title> Bad Content </title>
</head>
<style>
body { color:blue; }
table {
border: solid red;
background-color:yellow;
}
P { background-color: pink; color:red;}
H1 { background-color:green; }
</STYLE>
<body>
<table border=1>
<tr><P style="color:red">red<A href="foo.htm">hello</A>there
<td>
<table border=1 bgcolor=green>
<tr>
<P style="color:blue"> blue
<td>
<table border=1>
<tr>
<td>
<table border=1>
<tr>
<P style="color:green">green
<td>
<table border=1>
<tr>
<td>
HELLO
</td>
</tr>
</table>
</td>
<P style="color:orange">orange
</tr>
</body>
</html>

View File

@@ -0,0 +1,20 @@
#!/usr/bin/perl
use Cwd;
$curr_dir=`cd`;
open(OUTFILE,">url_list.txt") || die "Can't open url.txt $!";
opendir(D,".");
@files=readdir(D);
$curr_dir=~s/\\/\//g;
chomp($curr_dir);
foreach $file(@files) {
if($file=~m/\.htm/) {
print OUTFILE "file:///$curr_dir/$file\n";
}
}

View File

@@ -0,0 +1,10 @@
<html>
<body>
<form>
<table bgcolor=red>
<input>
<tr><td><input></td></tr>
</table>
</form>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<HTML><HEAD>
<style type="text/css">
span:before { content: "<" attr(class) ">" }
span:after { content: "</" attr(class) ">" }
span.a {
font-size: 130%;
color: blue;
}
span.z {
padding-left: 50px;
display: block;
color: green;
}
</style>
</HEAD>
<BODY><FONT FACE="Arial"><!-- Deleting this font tag fixes the bug -->
<P>testcase 4</P><!-- Deleting this paragraph or adding a space
before or after this comment fixes the bug -->
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN><br>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
<SPAN CLASS="z">[span class z]</SPAN>
<P><SPAN CLASS="a">[span class a]</SPAN></P>
</font></body></html>

View File

@@ -0,0 +1,20 @@
<HTML>
<BODY>
<TABLE width=500>
<TR>
<TD width=100 bgcolor=yellow>
<B>
<FORM>
<NOBR>
<IMG SRC="http://bugzilla.mozilla.org/ant.jpg" width=100 HEIGHT=30>
</NOBR>
</FORM>
UNSER ANGEBOT
</TD>
<TD width=400>
Foo
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@@ -0,0 +1,17 @@
<HTML>
<TABLE BORDER="1">
<tr>
<td>
<b>
Test
</td>
</tr>
<TD>
Test
</TD>
</TR>
</TABLE>
</html>

View File

@@ -0,0 +1,15 @@
<html>
<body>
<script>
document.write('<style>')
document.write(".menured { color: red; } \n")
document.write('</style>')
</script>
<p class="menured">This should be the only text visible and it should be red</p>
</body></html>

View File

@@ -0,0 +1,19 @@
<html>
<body>
<p>
<font face="arial, helvetica" color=red>
<table border="1">
<tr><td><font size=+1><a href=foo.html>SHOULD BE TIMES ROMAN</a></font></td></tr>
</table>
<p>
<font size='+1'>
<b>
<a href=foo.html>SHOULD BE HELVETICA
</a>
</b>
</font>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<html>
<head>
<title>Bug</title>
</head>
<body>
BUG:<BR>
<SPAN style="color:blue">&lt;SPAN>
<DIV style="color:red">&lt;DIV>
<SPAN style="color:green">&lt;SPAN>
&lt;/SPAN></SPAN>
&lt;/DIV></DIV>
&lt;/SPAN></SPAN>
<HR>
NO BUG:<BR>
<SPAN style="color:blue">&lt;SPAN>
<DIV style="color:red">&lt;DIV>
<B style="color:green">&lt;B>
&lt;/B></B>
&lt;/DIV></DIV>
&lt;/SPAN></SPAN>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Welcome to MSN.com</TITLE>
</head>
<body>
<a href="http://ads.msn.com/ads/adredir.asp?url=http://www.fidelity.com&image=http://ads.msn.com/ads/MSNBTA/FI610001_TR.gif">
fidelity
</body>
</html>

View File

@@ -0,0 +1,94 @@
#/usr/bin/perl
die "\nUsage: perl RtestDTD.pl [FLAG] url_list.txt.
FLAGS:
-v = verify ( would create rtest_html.veri )
-b = baseline ( would create rtest_html.base )
-help = info. on running the script\n"
if( @ARGV[0]!~/-help/ && ((@ARGV >2 || @ARGV < 2) || ($ARGV[0]!~m/-v/ && $ARGV[0]!~m/-b/)));
if($ARGV[0]=~m/-help/) {
print "
1. \"url_list.txt\" can be generated by running UrlGen.pl
Ex. perl UrlGen.pl.
2. Run base line (-b) before making changes in your tree.
This will generate rtest_html.base file [DO NOT CHANGE THIS].
3. Run verification (-v) after making changes in your tree.
This will generate rtest_html.veri file and will compare
rtest_html.base and rtest_html.veri.
NOTE: Need perl version 5.0 or greater. \n";
exit(0);
}
use Cwd;
$ENV{"PARSER_DUMP_CONTENT"}=1;
($drive,@path)=split(/:/,`cd`);
system("$drive:\\mozilla\\dist\\win32_d.obj\\bin\\viewer.exe -f $ARGV[1]");
if($ARGV[0]=~m/-b/) {
rename("rtest_html.txt","rtest_html.base");
}
elsif($ARGV[0]=~m/-v/) {
rename("rtest_html.txt","rtest_html.veri");
@result=CompareFiles("rtest_html.base","rtest_html.veri");
Display(@result);
}
sub CompareFiles {
open(BASE,"<$_[0]") || die "Can't output $_[0] $!";
open(VERI,"<$_[1]") || die "Can't output $_[1] $!";
#Separate file contents into URL and DOCUMENT
while(<BASE>) {
($url,$document1)=split/;/;
push(@url1,$url);
push(@documents1,$document1);
}
while(<VERI>) {
($url,$document2)=split/;/;
push(@url2,$url);
push(@documents2,$document2);
}
#Search for documents that don't match
for($i=0;$i<=$#documents1+1;$i++) {
if($documents1[$i] !~ /$documents2[$i]/) {
(@string1)=split(//,$documents1[$i]);
(@string2)=split(//,$documents2[$i]);
for($j=0;$j<=$#string1;$j++) {
# Find the character that failed
if($string1[$j] !~ /$string2[$j]/) {
push(@result,$url1[$i],$string2[$j],$j);
$j=@string1; # Stop looping
}
}
}
}
close(BASE);
close(VERI);
return @result;
}
sub Display {
for($i=0;$i<@_;$i++) {
print "\n $_[$i++] failed on character '$_[$i++]' at location $_[$i]";
}
print "\n--------------------\n";
$count=@_/3;
if(($count)>0) {
print "$count url(s) failed\n";
}
else {
print "\nALL SUCCEEDED\n";
}
}

View File

@@ -0,0 +1,62 @@
<html>
<head>
<title> Bad Content </title>
</head>
<style>
table {
border: solid red;
background-color:yellow;
}
P { background-color: pink; }
</style>
<body>
<table >
<tr>
<td>
<P> some text
two</td>
</tr>
</table>
<table>
<tr>
<P>ss
<td>three</td>
</tr>
</table>
<table>
<tr>
<P>one
<td>
<table>
<P>last
<tr>
<P>two
<td>
<table>
<tr>
<P>three
<td>
<table>
<tr>
<td>
4TD
</td>
</tr>
</table>
</td>
<P>three last
</tr>
</table>
</td>
<P>two last
</tr>
</table>
</td>
<P>one last
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<html>
<head>
<title> Bad Content </title>
</head>
<style>
body { color:blue; }
table {
border: solid red;
background-color:yellow;
}
P { background-color: pink; color:red;}
H1 { background-color:green; }
</STYLE>
<body>
<table border=1>
<tr><P style="color:red">red<A href="foo.htm">hello</A>there
<td>
<table border=1 bgcolor=green>
<tr>
<P style="color:blue"> blue
<td>
<table border=1>
<tr>
<td>
<table border=1>
<tr>
<P style="color:green">green
<td>
<table border=1>
<tr>
<td>
HELLO
</td>
</tr>
</table>
</td>
<P style="color:orange">orange
</tr>
</body>
</html>

View File

@@ -0,0 +1,20 @@
#!/usr/bin/perl
use Cwd;
$curr_dir=`cd`;
open(OUTFILE,">url_list.txt") || die "Can't open url.txt $!";
opendir(D,".");
@files=readdir(D);
$curr_dir=~s/\\/\//g;
chomp($curr_dir);
foreach $file(@files) {
if($file=~m/\.htm/) {
print OUTFILE "file:///$curr_dir/$file\n";
}
}