On Fri, 12 Feb 2021 12:37:25 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> test/jdk/javax/swing/text/html/StyleSheet/TestWrongCSSFontSize.java line 149: >> >>> 147: >>> 148: public static void main(String[] args) throws Throwable { >>> 149: TestWrongCSSFontSize test = new TestWrongCSSFontSize( >> >> A minor nit... >> Actually in all ImageIO.write() we normally pass the file with extension >> like image.png but here if the argument passed to testcase does not give >> .png extension, it just stores as that name, which is kind of irritation. I >> think we can hardcode the filename in call to ImageIO.write to CSSimage.png >> or something similar, instead of getting the path in main. > > This is a side effect of my change: one parameter is always passed to the > test and now the test always save an image; the test should not save the > image by default. To enable saving the image, a second parameter needs to be > passed. Hardcoding the name of the image, perhaps based on the first > parameter `w3cUnits` seems reasonable. I guess instead of depending on passed parameter, it will be better to capture the image only on failure. ------------- PR: https://git.openjdk.java.net/jdk/pull/2515