# HG changeset patch # User Pavel Tisnovsky # Date 1452078772 -3600 # Node ID e9bbfa68cc7037c88893ad3936be2ae433224a8a # Parent 61cadaf2583dbb32c783c6b7bfdc3e2ada6d2831 Updated comments in the class HtmlWriter. diff -r 61cadaf2583d -r e9bbfa68cc70 ChangeLog --- 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 + + * src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.java: + Updated comments in the class HtmlWriter. + 2016-01-04 Pavel Tisnovsky * src/org/gfxtest/ImageDiffer/ResultWriters/HtmlStructureWriter.java: diff -r 61cadaf2583d -r e9bbfa68cc70 src/org/gfxtest/ImageDiffer/ResultWriters/HtmlWriter.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 = "\n " + @@ -62,30 +70,49 @@ " \n" + " \n"; + /** + * Footer of HTML page. + */ private static final String HTML_FOOTER = "
TestComparison resultImagesPerceptionDiff image thumbnail
\n" + " \n" + "\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