Loading layout/tools/reftest/clean-reftest-output.pl +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ while (<>) { next unless /REFTEST/; chomp; chop if /\r$/; s,(PASS|FAIL):( \(!=\))? (.*),\1:\2 <a href="\3">\3</a>,; s,(PASS|FAIL)([^:]*):( \(!=\))? (.*),\1\2:\3 <a href="\4">\4</a>,; s,(IMAGE[^:]*): (data:.*),<a href="\2">\1</a>,; print; print "\n"; Loading layout/tools/reftest/reftest-to-html.pl +17 −14 Original line number Diff line number Diff line Loading @@ -106,29 +106,32 @@ while (<>) { if (/^PASS(.*)$/) { my $class = $randomresult ? "PASSRANDOM" : "PASS"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED PASS(.*)$/) { my $class = $randomresult ? "PASSRANDOM" : "WEIRDPASS"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED FAIL: (.*)$/) { my $class = $randomresult ? "FAILRANDOM" : "FAIL"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED (....): (.*)$/) { if ($randomresult) { die "Error on line $l: UNEXPECTED with test marked random?!"; } my $class = ($1 eq "PASS") ? "WEIRDPASS" : "FAIL"; print '<tr><td class="' . $class . '">' . do_html($2) . "</td></tr>\n"; # FAILs are followed by images # UNEXPECTED results can be followed by one or two images $testline = &readcleanline; $refline = &readcleanline; print '<tr><td class="FAILIMAGES">'; { die "Error on line $l" unless $testline =~ /REFTEST IMAGE 1 \(TEST\): (data:.*)$/; if ($testline =~ /REFTEST IMAGE: (data:.*)$/) { print '<a href="' . $1 . '"><img class="testresult" src="' . $1 . '"></a>'; } elsif ($testline =~ /REFTEST IMAGE 1 \(TEST\): (data:.*)$/) { $refline = &readcleanline; print '<a href="' . $1 . '"><img class="testresult" src="' . $1 . '"></a>'; } { die "Error on line $l" unless $refline =~ /REFTEST IMAGE 2 \(REFERENCE\): (data:.*)$/; print '<a href="' . $1 . '"><img class="testref" src="' . $1 . '"></a>'; } } else { die "Error on line $l"; } print "</td></tr>\n"; } elsif (/^KNOWN FAIL(.*$)/) { my $class = $randomresult ? "XFAILRANDOM" : "XFAIL"; Loading layout/tools/reftest/reftest.js +9 −4 Original line number Diff line number Diff line Loading @@ -436,10 +436,15 @@ function DocumentLoaded() } result += gURLs[0].prettyPath; // the URL being tested dump(result + "\n"); if (!test_passed && expected == EXPECTED_PASS) { if (!test_passed && expected == EXPECTED_PASS || test_passed && expected == EXPECTED_FAIL) { if (equal) { dump("REFTEST IMAGE 1 (TEST): " + gCanvas1.toDataURL() + "\n"); dump("REFTEST IMAGE 2 (REFERENCE): " + gCanvas2.toDataURL() + "\n"); dump("REFTEST number of differing pixels: " + differences + "\n"); } else { dump("REFTEST IMAGE: " + gCanvas1.toDataURL() + "\n"); } } gURLs.shift(); Loading Loading
layout/tools/reftest/clean-reftest-output.pl +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ while (<>) { next unless /REFTEST/; chomp; chop if /\r$/; s,(PASS|FAIL):( \(!=\))? (.*),\1:\2 <a href="\3">\3</a>,; s,(PASS|FAIL)([^:]*):( \(!=\))? (.*),\1\2:\3 <a href="\4">\4</a>,; s,(IMAGE[^:]*): (data:.*),<a href="\2">\1</a>,; print; print "\n"; Loading
layout/tools/reftest/reftest-to-html.pl +17 −14 Original line number Diff line number Diff line Loading @@ -106,29 +106,32 @@ while (<>) { if (/^PASS(.*)$/) { my $class = $randomresult ? "PASSRANDOM" : "PASS"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED PASS(.*)$/) { my $class = $randomresult ? "PASSRANDOM" : "WEIRDPASS"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED FAIL: (.*)$/) { my $class = $randomresult ? "FAILRANDOM" : "FAIL"; print '<tr><td class="' . $class . '">' . do_html($1) . "</td></tr>\n"; } elsif (/^UNEXPECTED (....): (.*)$/) { if ($randomresult) { die "Error on line $l: UNEXPECTED with test marked random?!"; } my $class = ($1 eq "PASS") ? "WEIRDPASS" : "FAIL"; print '<tr><td class="' . $class . '">' . do_html($2) . "</td></tr>\n"; # FAILs are followed by images # UNEXPECTED results can be followed by one or two images $testline = &readcleanline; $refline = &readcleanline; print '<tr><td class="FAILIMAGES">'; { die "Error on line $l" unless $testline =~ /REFTEST IMAGE 1 \(TEST\): (data:.*)$/; if ($testline =~ /REFTEST IMAGE: (data:.*)$/) { print '<a href="' . $1 . '"><img class="testresult" src="' . $1 . '"></a>'; } elsif ($testline =~ /REFTEST IMAGE 1 \(TEST\): (data:.*)$/) { $refline = &readcleanline; print '<a href="' . $1 . '"><img class="testresult" src="' . $1 . '"></a>'; } { die "Error on line $l" unless $refline =~ /REFTEST IMAGE 2 \(REFERENCE\): (data:.*)$/; print '<a href="' . $1 . '"><img class="testref" src="' . $1 . '"></a>'; } } else { die "Error on line $l"; } print "</td></tr>\n"; } elsif (/^KNOWN FAIL(.*$)/) { my $class = $randomresult ? "XFAILRANDOM" : "XFAIL"; Loading
layout/tools/reftest/reftest.js +9 −4 Original line number Diff line number Diff line Loading @@ -436,10 +436,15 @@ function DocumentLoaded() } result += gURLs[0].prettyPath; // the URL being tested dump(result + "\n"); if (!test_passed && expected == EXPECTED_PASS) { if (!test_passed && expected == EXPECTED_PASS || test_passed && expected == EXPECTED_FAIL) { if (equal) { dump("REFTEST IMAGE 1 (TEST): " + gCanvas1.toDataURL() + "\n"); dump("REFTEST IMAGE 2 (REFERENCE): " + gCanvas2.toDataURL() + "\n"); dump("REFTEST number of differing pixels: " + differences + "\n"); } else { dump("REFTEST IMAGE: " + gCanvas1.toDataURL() + "\n"); } } gURLs.shift(); Loading