<Swing Dev> [9] JDK-8169897: [PIT] javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails

Philip Race philip.race at oracle.com
Wed Mar 15 15:21:12 UTC 2017


This test sounds flaky and changing the font is clearly the wrong fix.

-phil.

On 3/14/17, 11:21 PM, Prasanta Sadhukhan wrote:
>
>
> On 3/14/2017 6:48 PM, Alexandr Scherbatiy wrote:
>> On 3/14/2017 3:37 PM, Philip Race wrote:
>>> I am not sure why the test went to the trouble of looking for Arial.
>>> If there was a good reason (Alexander ??) an alternative is to 
>>> initialise
>>   The test tries to calculate number of intersection with letter O 
>> and its underline. It is sensitive to the position of the letter.
>>
> If I use "SansSerif", it passes in windows,linux but
> fails in mac and screenshot of the letter O in mac is different 
> compared to windows,linux [1]
> For Serif, the screenshot are same in all platforms.
>
> Alex, can you tell me how do you arrive at this hardcoded intersection 
> number?
> if (backgroundChangesCount != intersections * 2) {
>             throw new RuntimeException("String is not properly drawn!");
>         }
>
> [1] screenshot windows: 
> http://cr.openjdk.java.net/~psadhukhan/8169897/8132119-windows.png
>       linux: 
> http://cr.openjdk.java.net/~psadhukhan/8169897/8132119-ubuntu.png
>       mac: http://cr.openjdk.java.net/~psadhukhan/8169897/8132119-mac.png
>
> Regards
> Prasanta
>>   Thanks,
>>   Alexandr.
>>> String fontName = "Serif".
>>>
>>> although swapping out Arial for Serif is a very odd choice.
>>> Arial is a Sans Serif font and Serif fonts are not usually used in UIs.
>>>
>>> So "SansSerif" would be better
>>> -phil.
>>>
>>> On 3/14/17, 4:46 AM, Prasanta Sadhukhan wrote:
>>>> Hi All,
>>>>
>>>> Please review a testbug fix where the testcase is failing in linux 
>>>> because it is not able to find "Arial" font and tries to use the 
>>>> font found in 0th index of getAvailableFontFamilyNames()
>>>> which is "Abyssinica SIL".
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8169897
>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/8169897/webrev.00/
>>>>
>>>> Modified the testcode to use "Serif" which is present in all 
>>>> platforms. Tested in windows,linux,mac.
>>>>
>>>> Regards
>>>> Prasanta
>>
>



More information about the swing-dev mailing list