<Swing Dev> [9] RFR JDK-7190578: Nimbus: css test for 4936917 fails

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Wed Nov 16 09:38:22 UTC 2016


Hi All,

Please review a simple fix for a swing issue where it is seen that a 
closed test was failing on Nimbus LaF

Bug: https://bugs.openjdk.java.net/browse/JDK-7190578
webrev: http://cr.openjdk.java.net/~psadhukhan/7190578/webrev.00/

This is is continuation to the closed review and this just moves the 
fixed test from closed to open.

The failure was happening because Nimbus LAF#getDefaults() sets 
TitledBorder via LoweredBorder constructor which sets insets to 10
http://hg.openjdk.java.net/jdk9/client/jdk/file/a4d2db195b23/src/java.desktop/share/classes/javax/swing/plaf/nimbus/LoweredBorder.java#l48 


so we get a white border for Nimbus but other LAF, there is no default 
border set but the test checks for background color at a location (8,45) 
which falls within the white border.
Proposed fix is to move the background location x position which needs 
to be tested by 15 pixels same as y so that we move out of the white 
border. This does not affect the test as the background is set outside 
the border.

I intended to open this testcase so remove dependancy on Util library.
I tested with other LAFs and it passed.

Regards
Prasanta





More information about the swing-dev mailing list