RFR: JDK-8328398 : Convert java/awt/im/4490692/bug4490692.html applet test to main [v2]

Harshitha Onkar honkar at openjdk.org
Thu Mar 21 17:36:22 UTC 2024


On Thu, 21 Mar 2024 12:11:43 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   instruction line length
>
> test/jdk/java/awt/im/bug4490692.java line 74:
> 
>> 72:                 .rows((int) INSTRUCTIONS.lines().count() + 2)
>> 73:                 .columns(40)
>> 74:                 .testUI(() -> new TestFrame("Test Accented Chars"))
> 
> Looks like a good candidate to use `splitUIRight/Bottom` (up to you).

Agreed. Updated UI.

> test/jdk/java/awt/im/bug4490692.java line 95:
> 
>> 93:     @Override
>> 94:     public void keyPressed(KeyEvent e) {
>> 95:         if (e.getKeyCode() == 23 || e.getKeyCode() == 60) {
> 
>>  CASE 2: This step is automated and applicable for both
> keyboards - LINUX & SOLARIS SPARC.
> When Tab key is pressed it should generate a-acute (à)
> character, this test automatically passes if the correct character
> is generated on keypress else fails.
> 
> Unfortunately this check doesn't work for me:
> `java.awt.event.KeyEvent[KEY_PRESSED,keyCode=0,keyText=Unknown keyCode: 0x0,keyChar='á',keyLocation=KEY_LOCATION_UNKNOWN,rawCode=23,primaryLevelUnicode=225,scancode=0,extendedKeyCode=0x10000e1] on javax.swing.JTextField...`
> 
> The `keycode` is 0, `rawCode` is desired `23`, but we can't get it it unless parsing the output of `e.toString()`
> 
> The `e.getKeyChar() == 0x00e1` check is still valid thought.

@azvegint Thanks for checking it. Update the code & added the rawCode check now. Can you please re-review it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18402#discussion_r1534350109
PR Review Comment: https://git.openjdk.org/jdk/pull/18402#discussion_r1534349827


More information about the client-libs-dev mailing list