Skip to content

Commit

Permalink
8260331: javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.ja…
Browse files Browse the repository at this point in the history
…va failed with "ERROR: icon and imageIcon not same."

Reviewed-by: azvegint
  • Loading branch information
prsadhuk committed May 17, 2021
1 parent a29612e commit 39a454b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,6 @@ java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java 8254841 macos
java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 8256289 windows-x64
java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 8258103 linux-all
java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-x64
javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java 8260331 linux-x64


############################################################################
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ private static void getImageIconBufferedImage() throws Exception {
Rectangle rect = internalFrame.getBounds();
Rectangle captureRect = new Rectangle(
point.x + internalFrame.getInsets().left,
point.y,
rect.width,
internalFrame.getInsets().top);
point.y + internalFrame.getInsets().top,
titleImageIcon.getIconWidth(),
titleImageIcon.getIconHeight());

System.out.println("imageicon captureRect " + captureRect);
imageIconImage
= robot.createScreenCapture(captureRect);
}
Expand All @@ -206,9 +208,11 @@ private static void getIconBufferedImage() throws Exception {
Rectangle rect = internalFrame.getBounds();
Rectangle captureRect = new Rectangle(
point.x + internalFrame.getInsets().left,
point.y,
rect.width,
internalFrame.getInsets().top);
point.y + internalFrame.getInsets().top,
titleIcon.getIconWidth(),
titleIcon.getIconHeight());

System.out.println("icon captureRect " + captureRect);
iconImage
= robot.createScreenCapture(captureRect);
}
Expand Down

1 comment on commit 39a454b

@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.