Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8193942: Regression automated test '/open/test/jdk/javax/swing/JFrame…
…/8175301/ScaledFrameBackgroundTest.java' fails

Reviewed-by: serb
  • Loading branch information
prsadhuk committed Jan 6, 2021
1 parent 52d3fee commit 32538b5b1d403b5d6b0e48bceef97a47cf9ddbe7
Showing with 4 additions and 4 deletions.
  1. +0 −1 test/jdk/ProblemList.txt
  2. +4 −3 test/jdk/javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java
@@ -740,7 +740,6 @@ javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all
javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all,macosx-all
javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8198003 generic-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
javax/swing/JPopupMenu/6580930/bug6580930.java 7124313 macosx-all
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956 macosx-all
javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
@@ -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();
@@ -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(() -> {
@@ -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());

0 comments on commit 32538b5

Please sign in to comment.