/hg/gfx-test: Template HTML files are moved to directory 'templa...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Jul 12 02:24:22 PDT 2011


changeset 8e10b41701d6 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=8e10b41701d6
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jul 12 11:25:38 2011 +0200

	Template HTML files are moved to directory 'templates'


diffstat:

 src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java |   4 +-
 src/org/gfxtest/reporter/Reporter.java                             |   4 +-
 template_different_images.html                                     |  52 ----------
 template_same_images.html                                          |  52 ----------
 template_test_result.html                                          |  37 -------
 templates/template_different_images.html                           |  52 ++++++++++
 templates/template_same_images.html                                |  52 ++++++++++
 templates/template_test_result.html                                |  37 +++++++
 8 files changed, 147 insertions(+), 143 deletions(-)

diffs (348 lines):

diff -r 9e7e2cc488e3 -r 8e10b41701d6 src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java
--- a/src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java	Thu Oct 07 18:24:55 2010 +0200
+++ b/src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java	Tue Jul 12 11:25:38 2011 +0200
@@ -63,6 +63,8 @@
  */
 public class HtmlStructureWriter
 {
+    private static final String TEMPLATE_DIR = "templates";
+
     static Log log = new Log(HtmlStructureWriter.class.getName(), true);
 
     public static void createAndFillResultDirectory(Configuration configuration, BufferedImage[] sourceImages,
@@ -90,7 +92,7 @@
     {
         String templateName = cr.isEqualsImages() ? "template_same_images.html" : "template_different_images.html";
         BufferedWriter writer = new BufferedWriter(new FileWriter(new File(newDir, "result.html")));
-        BufferedReader template = new BufferedReader(new FileReader(templateName));
+        BufferedReader template = new BufferedReader(new FileReader(new File(TEMPLATE_DIR, templateName)));
         String line;
         while ((line = template.readLine()) != null)
         {
diff -r 9e7e2cc488e3 -r 8e10b41701d6 src/org/gfxtest/reporter/Reporter.java
--- a/src/org/gfxtest/reporter/Reporter.java	Thu Oct 07 18:24:55 2010 +0200
+++ b/src/org/gfxtest/reporter/Reporter.java	Tue Jul 12 11:25:38 2011 +0200
@@ -60,6 +60,8 @@
 
     private ReporterConfiguration configuration = null;
 
+    private static final String TEMPLATE_DIR = "templates";
+
     private static final String INPUT_FILE_NAME = "template_test_result.html";
 
     private static final String OUTPUT_FILE_NAME = "index.html";
@@ -108,7 +110,7 @@
         {
             this.configuration = new ReporterConfiguration(args, this.log);
             Map<String, TestResult> testResults = readAllTestResults();
-            input = new BufferedReader(new FileReader(new File(INPUT_FILE_NAME)));
+            input = new BufferedReader(new FileReader(new File(TEMPLATE_DIR, INPUT_FILE_NAME)));
             output = new BufferedWriter(new FileWriter(new File(this.configuration.getOutputPath(), OUTPUT_FILE_NAME)));
             writeHtmlHeader(input, output);
             writeHeaderForCommonTests(output);
diff -r 9e7e2cc488e3 -r 8e10b41701d6 template_different_images.html
--- a/template_different_images.html	Thu Oct 07 18:24:55 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-    <head>
-        <title>${TestName}</title>
-        <meta name="Author" content="Pavel Tisnovsky" />
-        <meta name="Generator" content="ImageDiffer" />
-        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-        <meta name="keywords" content="test, java" />
-        <style type="text/css">
-            <!--
-            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
-            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
-            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
-            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
-            a:link         {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:hover        {color:#ffffff; background:#404040}
-            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
-            .key           {color: #0000aa}
-            .value         {color: #aa0000}
-            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
-            -->
-        </style>
-    </head>
-    <body>
-        <h1>${TestName}</h2>
-        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
-            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
-                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
-                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
-                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
-            </tr>
-            <tr><td colspan="2">&nbsp;</td></tr>
-            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
-            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
-            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
-            <tr><td class="key">Different pixels:              </td><td class="value">${DifferentPixels}</td></tr>
-            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
-            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
-            <tr><td colspan="2">&nbsp;</td></tr>
-            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
-            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
-            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
-        </table>
-        <br clear="all" />
-        <hr noshade size="1" width="100%" />
-        <p>Generated by <strong>ImageDiffer</strong></p>
-    </body>
-</html>
-
diff -r 9e7e2cc488e3 -r 8e10b41701d6 template_same_images.html
--- a/template_same_images.html	Thu Oct 07 18:24:55 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-    <head>
-        <title>${TestName}</title>
-        <meta name="Author" content="Pavel Tisnovsky" />
-        <meta name="Generator" content="ImageDiffer" />
-        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-        <meta name="keywords" content="test, java" />
-        <style type="text/css">
-            <!--
-            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
-            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
-            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
-            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
-            a:link         {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:hover        {color:#ffffff; background:#404040}
-            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
-            .key           {color: #0000aa}
-            .value         {color: #aa0000}
-            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
-            -->
-        </style>
-    </head>
-    <body>
-        <h1>${TestName}</h2>
-        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
-            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
-                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
-                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
-                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
-            </tr>
-            <tr><td colspan="2">&nbsp;</td></tr>
-            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
-            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
-            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
-            <tr><td class="key">Different pixels:              </td><td class="value">${DifferentPixels}</td></tr>
-            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
-            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
-            <tr><td colspan="2">&nbsp;</td></tr>
-            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
-            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
-            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
-        </table>
-        <br clear="all" />
-        <hr noshade size="1" width="100%" />
-        <p>Generated by <strong>ImageDiffer</strong></p>
-    </body>
-</html>
-
diff -r 9e7e2cc488e3 -r 8e10b41701d6 template_test_result.html
--- a/template_test_result.html	Thu Oct 07 18:24:55 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-    <head>
-        <title>Graphics test report</title>
-        <meta name="Author" content="Pavel Tisnovsky" />
-        <meta name="Generator" content="Reporter" />
-        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-        <meta name="keywords" content="test, java" />
-        <style type="text/css">
-            <!--
-            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
-            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
-            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
-            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
-            a:link         {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:visited      {color:#0000ff}
-            a:hover        {color:#ffffff; background:#404040}
-            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
-            .key           {color: #0000aa}
-            .value         {color: #aa0000}
-            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
-            -->
-        </style>
-    </head>
-    <body>
-        <h1>Graphics test report</h2>
-        <table border="1" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
-            ${RESULT}
-        </table>
-        <br clear="all" />
-        <hr noshade size="1" width="100%" />
-        <p>Generated by <strong>Reporter</strong></p>
-    </body>
-</html>
-
diff -r 9e7e2cc488e3 -r 8e10b41701d6 templates/template_different_images.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/template_different_images.html	Tue Jul 12 11:25:38 2011 +0200
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <title>${TestName}</title>
+        <meta name="Author" content="Pavel Tisnovsky" />
+        <meta name="Generator" content="ImageDiffer" />
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <meta name="keywords" content="test, java" />
+        <style type="text/css">
+            <!--
+            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
+            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
+            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
+            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
+            a:link         {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:hover        {color:#ffffff; background:#404040}
+            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
+            .key           {color: #0000aa}
+            .value         {color: #aa0000}
+            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
+            -->
+        </style>
+    </head>
+    <body>
+        <h1>${TestName}</h2>
+        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
+            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
+                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
+            </tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
+            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
+            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
+            <tr><td class="key">Different pixels:              </td><td class="value">${DifferentPixels}</td></tr>
+            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
+            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
+            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
+            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
+        </table>
+        <br clear="all" />
+        <hr noshade size="1" width="100%" />
+        <p>Generated by <strong>ImageDiffer</strong></p>
+    </body>
+</html>
+
diff -r 9e7e2cc488e3 -r 8e10b41701d6 templates/template_same_images.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/template_same_images.html	Tue Jul 12 11:25:38 2011 +0200
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <title>${TestName}</title>
+        <meta name="Author" content="Pavel Tisnovsky" />
+        <meta name="Generator" content="ImageDiffer" />
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <meta name="keywords" content="test, java" />
+        <style type="text/css">
+            <!--
+            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
+            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
+            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
+            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
+            a:link         {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:hover        {color:#ffffff; background:#404040}
+            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
+            .key           {color: #0000aa}
+            .value         {color: #aa0000}
+            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
+            -->
+        </style>
+    </head>
+    <body>
+        <h1>${TestName}</h2>
+        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
+            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
+                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
+            </tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
+            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
+            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
+            <tr><td class="key">Different pixels:              </td><td class="value">${DifferentPixels}</td></tr>
+            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
+            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
+            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
+            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
+        </table>
+        <br clear="all" />
+        <hr noshade size="1" width="100%" />
+        <p>Generated by <strong>ImageDiffer</strong></p>
+    </body>
+</html>
+
diff -r 9e7e2cc488e3 -r 8e10b41701d6 templates/template_test_result.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/template_test_result.html	Tue Jul 12 11:25:38 2011 +0200
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <title>Graphics test report</title>
+        <meta name="Author" content="Pavel Tisnovsky" />
+        <meta name="Generator" content="Reporter" />
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <meta name="keywords" content="test, java" />
+        <style type="text/css">
+            <!--
+            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
+            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
+            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
+            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
+            a:link         {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:hover        {color:#ffffff; background:#404040}
+            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
+            .key           {color: #0000aa}
+            .value         {color: #aa0000}
+            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
+            -->
+        </style>
+    </head>
+    <body>
+        <h1>Graphics test report</h2>
+        <table border="1" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
+            ${RESULT}
+        </table>
+        <br clear="all" />
+        <hr noshade size="1" width="100%" />
+        <p>Generated by <strong>Reporter</strong></p>
+    </body>
+</html>
+



More information about the distro-pkg-dev mailing list