Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8193942: Regression automated test '/open/test/jdk/javax/swing/JFrame…
…/8175301/ScaledFrameBackgroundTest.java' fails

Backport-of: 32538b5
  • Loading branch information
GoeLin committed Sep 22, 2022
1 parent 9ae65e8 commit 32d4246
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -710,7 +710,6 @@ javax/swing/JComponent/4337267/bug4337267.java 8146451 windows-all
javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
javax/swing/JFileChooser/8002077/bug8002077.java 8196094 windows-all,macosx-all
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8058231 generic-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
javax/swing/JList/6462008/bug6462008.java 7156347 generic-all
javax/swing/JPopupMenu/6580930/bug6580930.java 7124313 macosx-all
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956 macosx-all
Expand Down
Expand Up @@ -44,7 +44,7 @@ public class ScaledFrameBackgroundTest {
public static void main(String[] args) throws Exception {
try {
Robot robot = new Robot();
robot.setAutoDelay(50);
robot.setAutoDelay(100);

SwingUtilities.invokeAndWait(() -> {
frame = new JFrame();
Expand All @@ -54,10 +54,11 @@ public static void main(String[] args) throws Exception {
panel.setBackground(BACKGROUND);
frame.getContentPane().add(panel);
frame.setVisible(true);
frame.setLocationRelativeTo(null);
});

robot.waitForIdle();
Thread.sleep(200);
robot.delay(1000);

Rectangle[] rects = new Rectangle[1];
SwingUtilities.invokeAndWait(() -> {
Expand All @@ -81,7 +82,7 @@ public static void main(String[] args) throws Exception {
color = robot.getPixelColor(x, y);

if (!BACKGROUND.equals(color)) {
throw new RuntimeException("Wrong backgound color!");
throw new RuntimeException("Wrong backgound color!!");
}
} finally {
if (frame != null) SwingUtilities.invokeAndWait(() -> frame.dispose());
Expand Down

1 comment on commit 32d4246

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.