RFR: 8346753: Test javax/swing/JMenuItem/RightLeftOrientation/RightLeftOrientation.java fails on Windows Server 2025 x64 because the icons of RBMenuItem and CBMenuItem are not visible in Nimbus LookAndFeel
Alexey Ivanov
aivanov at openjdk.org
Fri Jul 4 12:42:39 UTC 2025
On Fri, 4 Jul 2025 12:07:26 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> > The test has to re-create its UI after testing for a L&F is complete. Such a scenario isn't supported by `PassFailJFrame` at the moment, see [JDK-8357455](https://bugs.openjdk.org/browse/JDK-8357455) and [#24439 (comment)](https://github.com/openjdk/jdk/pull/24439#discussion_r2100038079). There's no easy workaround.
> > The test doesn't receive events from `PassFailJFrame`, so the needs to be a custom UI, or the test should be run several times for different L&Fs.
>
> So do you propose to test like what is being done in https://github.com/openjdk/jdk/pull/24439/files passing L&F argument to jtreg tag?
Yes, this is the simplest way.
Another option is to have a driver class. For example, if no arguments are passed to `main`, the test gets the list of all available or specific L&F as hard-coded now, then runs the same test with a parameter that specifies a L&F to test. The driver then captures both standard output and error streams of the process and throws an exception if the exit code from the subprocess isn't 0.
The first approach is simpler as it uses jtreg to run the test with different parameters.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25907#issuecomment-3036103833
More information about the client-libs-dev
mailing list