Skip to content

Test 'javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java' failed on Windows 2025 x64 because there is a failure frame while the test case is running #26165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class HorizScrollers {
private static final String INSTRUCTIONS = """
Expand All @@ -59,12 +60,14 @@ public class HorizScrollers {
the next test phase will run automatically.
DO NOT TOUCH ANYTHING DURING TESTING!

The test will automatically FAIL during testing if something
fails. Otherwise, the test will automatically PASS after the
third testing phase.
If any step of the test fails, the automated test window will
close and the error will be output to the main test window's
text area. If so, press the fail button. Otherwise, the test
will automatically pass after the third testing phase.
""";

public static void main(String[] args) throws Exception {
checkNimbusLaf();
PassFailJFrame.builder()
.title("HorizScrollers Instructions")
.instructions(INSTRUCTIONS)
Expand Down Expand Up @@ -98,6 +101,14 @@ public static void main(String[] args) throws Exception {
When you're ready for the next part of the test to run, press GO!
""";

static void checkNimbusLaf() {
String lafName = UIManager.getLookAndFeel().getName();
if (lafName.equals("Nimbus")) {
System.err.println("Nimbus LAF not supported. Skipping.");
PassFailJFrame.forcePass();
}
}

static class ConfigPanel extends JPanel
implements ActionListener, MouseWheelListener {
JTextArea msg;
Expand Down Expand Up @@ -176,9 +187,7 @@ private void showFinalReminderIfNeeded(boolean isFailure) {
);
}

if (isFailure) {
PassFailJFrame.forceFail();
} else {
if (!isFailure) {
PassFailJFrame.forcePass();
}
}
Expand Down