RFR: 8295738: Automate javax/swing/JFileChooser/FileSizeCheck.java [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Oct 21 15:29:44 UTC 2022


On Thu, 20 Oct 2022 23:31:58 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Alexey Ivanov has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Set the locale to US
>>  - Adjust wrapping for error message
>>  - Use local variable to store first error message
>>  - Shorter error message
>
> test/jdk/javax/swing/JFileChooser/FileSizeCheck.java line 51:
> 
>> 49:  * @bug 8288882
>> 50:  * @key headful
>> 51:  * @requires (os.family == "linux")
> 
> Why the linux platform only? I think it should be able to work on all platform if Metal is used?

The original bug was seen on Linux.

On Windows, `JFileChooser` extensively uses `ShellFolder` and displays additional columns in the detailed view, the displayed file size comes from the Windows shell too. If I run this test on Windows, it fails for each file size:

Wrong rendered size for F0: 0 bytes vs. 0.0 KB
Wrong rendered size for F1: 1 bytes vs. 0.1 KB
Wrong rendered size for F99: 99 bytes vs. 0.1 KB
…
Wrong rendered size for F2_800_000: 2.66 MB vs. 2.8 MB


The test can be run on macOS if `MetalLookAndFeel` is set, but I don't see much value in doing so because the number of Mac systems is usually scarce compared to Linux ones and the behaviour is well verified by running the test on Linux.

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

PR: https://git.openjdk.org/jdk/pull/10802



More information about the client-libs-dev mailing list