RFR: 8282789: Create a regression test for the JTree usecase of JDK-4618767
Manukumar V S
mvs at openjdk.java.net
Tue Mar 8 10:59:24 UTC 2022
Create a regression test for the JTree usecase of [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767)
Context: Migrating tests from a closed tonga based test suite to open regression based one.
Issue identified in [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767):
Typing a letter while a JTree has focus now makes the selection jump to the first/next node/item whose text starts with that letter even though that letter is accompanied by modifier keys such as ALT or CTRL.
Fix:
Only enable JTree letter navigation when the user doesn't press any modifier keys such as ALT or CTRL.
Testing:
Java 1.4.0 -> Test Failed.
$ ./j2sdk1.4.0/bin/java JTreeOld
LookAndFeel: javax.swing.plaf.metal.MetalLookAndFeel
OS = windows nt (unknown)
java.lang.RuntimeException: Test Failed, expected colors, but got food
at JTreeOld.doTest(JTreeOld.java:166)
at JTreeOld.main(JTreeOld.java:32)
Exception in thread "main"
Java 1.4.1 -> Test Passed.
$ ./j2sdk1.4.1/bin/java JTreeOld
LookAndFeel: javax.swing.plaf.metal.MetalLookAndFeel
OS = windows nt (unknown)
Test passed javax.swing.plaf.metal.MetalLookAndFeel
LookAndFeel: com.sun.java.swing.plaf.motif.MotifLookAndFeel
OS = windows nt (unknown)
Test passed com.sun.java.swing.plaf.motif.MotifLookAndFeel
LookAndFeel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
OS = windows nt (unknown)
Test passed com.sun.java.swing.plaf.windows.WindowsLookAndFeel
-------------
Commit messages:
- 8282789: Create a regression test for the JTree usecase of JDK-4618767
Changes: https://git.openjdk.java.net/jdk/pull/7742/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7742&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8282789
Stats: 226 lines in 1 file changed: 226 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7742.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7742/head:pull/7742
PR: https://git.openjdk.java.net/jdk/pull/7742
More information about the client-libs-dev
mailing list