changeset 42185:1f7a0a6eb773

8159132: [PIT][TEST_BUG] java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java fails Reviewed-by: alexsch, aghaisas
author pkbalakr
date Wed, 02 Nov 2016 08:46:41 +0530
parents a97f27c928d3
children 7092af944dca
files jdk/test/java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java
diffstat 1 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java	Tue Nov 01 12:56:11 2016 +0300
+++ b/jdk/test/java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java	Wed Nov 02 08:46:41 2016 +0530
@@ -22,21 +22,28 @@
  */
 
 /* @test
- * @bug 8157163
+ * @bug 8157163 8159132
  * @summary AWT FileDialog does not inherit icon image from parent Frame
  * @requires os.family=="windows"
  * @run main FileDialogIconTest
  */
-import javax.swing.*;
-import java.awt.*;
+
+import java.awt.Color;
+import java.awt.Dialog;
+import java.awt.FileDialog;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Image;
 import java.awt.image.BufferedImage;
-import java.lang.reflect.InvocationTargetException;
+import javax.swing.SwingUtilities;
 
 public class FileDialogIconTest {
     private static Frame frame;
     private static Dialog dialog;
 
-    public static void main(final String[] args) throws InterruptedException, InvocationTargetException, AWTException {
+    public static void main(final String[] args) throws Exception {
         Robot robot;
         Point p;
         try {
@@ -51,9 +58,9 @@
             dialog.setModal(false);
             dialog.setVisible(true);
             robot.waitForIdle();
-            robot.delay(200);
+            robot.delay(1000);
 
-            p = new Point(10, 10);
+            p = new Point(20, 20);
             SwingUtilities.convertPointToScreen(p, dialog);
             Color color = robot.getPixelColor(p.x, p.y);
             if (!Color.RED.equals(color)) {