changeset 785:e9bbfa68cc70 draft

Updated comments in the class HtmlWriter.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Wed, 06 Jan 2016 12:12:52 +0100
parents 61cadaf2583d
children 6e2bcc48fba8
files ChangeLog src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.java
diffstat 2 files changed, 33 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 04 11:04:54 2016 +0100
+++ b/ChangeLog	Wed Jan 06 12:12:52 2016 +0100
@@ -1,3 +1,8 @@
+2016-01-06  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.java:
+	Updated comments in the class HtmlWriter.
+
 2016-01-04  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java:
--- a/src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.java	Mon Jan 04 11:04:54 2016 +0100
+++ b/src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.java	Wed Jan 06 12:12:52 2016 +0100
@@ -1,7 +1,7 @@
 /*
   Java gfx-test framework
 
-   Copyright (C) 2010, 2011  Red Hat
+   Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  Red Hat
 
 This file is part of IcedTea.
 
@@ -47,8 +47,16 @@
 import org.gfxtest.ImageDiffer.ComparisonResult;
 import org.gfxtest.ImageDiffer.Configuration;
 
+
+
+/**
+ * Class that can generates HTML page containing test results.
+ */
 public class HtmlWriter extends ResultWriter
 {
+    /**
+     * Header of HTML page + first part of its body.
+     */
     private static final String HTML_HEADER =
         "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n " +
         "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n " +
@@ -62,30 +70,49 @@
         "        <table border='1' frame='border' cellspacing='3' cellpadding='1' style='background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080' summary=''>\n" +
         "            <tr style='background-color:#a0c0c0;'><th>Test</th><th>Comparison result</th><th>Images</th><th colspan='2'>Perception</th><td>Diff image thumbnail</td></tr>\n";
 
+    /**
+     * Footer of HTML page.
+     */
     private static final String HTML_FOOTER =
         "        </table>\n" +
         "    </body>\n" +
         "</html>\n";
 
+    /**
+     * Name of output file.
+     */
     private static final String HTML_FILE_NAME = "results.html";
 
+    /**
+     * Constructor that accepts directory, where the resulting HTML page should
+     * be stored.
+     */
     public HtmlWriter(File outputDirectory) throws IOException
     {
         super(outputDirectory, HTML_FILE_NAME);
     }
 
+    /**
+     * Print HTML header.
+     */
     @Override
     public void printHeader() throws IOException
     {
         this.writer.write(HTML_HEADER);
     }
 
+    /**
+     * Print HTML footer.
+     */
     @Override
     public void printFooter() throws IOException
     {
         this.writer.write(HTML_FOOTER);
     }
 
+    /**
+     * Print result for one result from image comparison into HTML page.
+     */
     @Override
     public void printResultForOneImage(Configuration configuration, String imageFileName, BufferedImage[] sourceImages,
             ComparisonResult comparisonResult) throws IOException