RFR: 8328648: Remove applet usage from JFileChooser tests bug4150029 [v4]

Abhishek Kumar abhiscxk at openjdk.org
Wed Mar 27 05:13:24 UTC 2024


On Tue, 26 Mar 2024 22:33:45 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> Removing applet usage from manual JFileChooser tests
>
> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   moved create ui code to helper, change test pass check, add mouse release, remove getContentPane

test/jdk/javax/swing/JFileChooser/4150029/bug4150029.java line 86:

> 84:             System.out.println("Created sub-directory: " + subDir);
> 85: 
> 86:             fileChooser = new JFileChooser(subDir);

Not required here as you are initializing in `createAndShowUI` method.

test/jdk/javax/swing/JFileChooser/4150029/bug4150029.java line 137:

> 135:             clickBackSpace();
> 136:             if (prevDir == crntDir) {
> 137:                 passed_2 = true;

This condition is not satisfied and hence the test failed in win11 machine. In linux machine, once the current directory is at `root` then pressing the backspace key doesn't have any effect.
But looks like it is different in windows and mac. Checked in windows native explorer, once it reached to `home` folder, it toggles between `home` and `Desktop` on backspace key press. The condition checked here will never satisfy and `passed_2` variable remains false.

So, either you can check the condition differently or may remove this check for windows and mac.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18415#discussion_r1540454288
PR Review Comment: https://git.openjdk.org/jdk/pull/18415#discussion_r1540474274


More information about the client-libs-dev mailing list