This automates the test added in #9327. The test has a set of objects which store the size of the file and the expected displayed size, the file name is generated automatically. The pattern for the file names ensures the files are displayed in the expected order up to and including gigabytes, 10 digits. I added more test cases that the original test had to verify the displayed size is rounded up, an automatic test can easily verify more rows than a human can.
The finds the **Details** button in the file chooser and clicks it, then it finds the table, finds the row where the first file is displayed. The test compares the size displayed in the table to the expected one. If it doesn't match, an error is printed to `stderr`. All the file sizes are verified. The first error message, if any, is thrown to fail the test. The test passes with the fix for [JDK-8288882](https://bugs.openjdk.org/browse/JDK-8288882) and fails without it. ------------- Commit messages: - Make the test headful - 8295738: Automate javax/swing/JFileChooser/FileSizeCheck.java Changes: https://git.openjdk.org/jdk/pull/10802/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10802&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8295738 Stats: 230 lines in 1 file changed: 170 ins; 33 del; 27 mod Patch: https://git.openjdk.org/jdk/pull/10802.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10802/head:pull/10802 PR: https://git.openjdk.org/jdk/pull/10802