<Swing Dev> <AWT Dev> [14] RFR JDK-8233696:[TESTBUG]Some jtreg tests fail when CAPS_LOCK is ON

Jayathirth D V jayathirth.d.v at oracle.com
Mon Nov 11 09:16:57 UTC 2019


Hi,

 

Please find updated webrev with equalsIgnoreCase():

 

http://cr.openjdk.java.net/~jdv/8233696/webrev.01/

 

Thanks,

Jay

 

From: Jayathirth Rao 
Sent: Monday, November 11, 2019 10:45 AM
To: Sergey Bylokhov <sergey.bylokhov at oracle.com>; Phil Race <philip.race at oracle.com>
Cc: awt-dev at openjdk.java.net; swing-dev at openjdk.java.net
Subject: Re: <AWT Dev> <Swing Dev> [14] RFR JDK-8233696:[TESTBUG]Some jtreg tests fail when CAPS_LOCK is ON

 

Hi Sergey,

 

I tested with get and setLockingKeyState() and it is not supported in all platforms. I got UnsupportedOperationException in Linux and MacOS in our internal test CI system.

Also there can be cases where user has set CAPS_LOCK on explicitly and in that case also test should pass or gracefully exit instead of throwing failure.

 

And these test cases are not explicitly expecting lower case alphabets, they are just taking input to check focus.

More analysis and how it behaves in internal test system is captured in JBS.

 

@Phil : Yes we should use equalsIgnoreCase() that would be more cleaner approach. I will update the webrev.

 

Thanks,

Jay





On 08-Nov-2019, at 2:27 AM, Sergey Bylokhov <HYPERLINK "mailto:Sergey.Bylokhov at oracle.com"Sergey.Bylokhov at oracle.com> wrote:

 

On 11/7/19 4:23 am, Jayathirth D V wrote:



Solution : I tried many things like finding test cases where we might not be restoring the CAPS_LOCK state or using get/setLockingKeyState(). But they were not feasible solutions


Why this solution does not work?




so I am modifying the test cases which are failing because of CAPS_LOCK state to have proper checks. More details are in the bug.


I am not sure that this is the right thing to do if the test enters some text in
the text field and expects the low case text, then the text field should not return uppercase.

Otherwise you need to check other combinations when the shift/cmd/ctrl were pressed by other test.

-- 
Best regards, Sergey.

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20191111/ade3c45e/attachment.html>


More information about the swing-dev mailing list