Skip to content

Commit 39a454b

Browse files
committed
8260331: javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "ERROR: icon and imageIcon not same."
Reviewed-by: azvegint
1 parent a29612e commit 39a454b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,6 @@ java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java 8254841 macos
878878
java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 8256289 windows-x64
879879
java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 8258103 linux-all
880880
java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-x64
881-
javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java 8260331 linux-x64
882881

883882

884883
############################################################################

test/jdk/javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,11 @@ private static void getImageIconBufferedImage() throws Exception {
194194
Rectangle rect = internalFrame.getBounds();
195195
Rectangle captureRect = new Rectangle(
196196
point.x + internalFrame.getInsets().left,
197-
point.y,
198-
rect.width,
199-
internalFrame.getInsets().top);
197+
point.y + internalFrame.getInsets().top,
198+
titleImageIcon.getIconWidth(),
199+
titleImageIcon.getIconHeight());
200+
201+
System.out.println("imageicon captureRect " + captureRect);
200202
imageIconImage
201203
= robot.createScreenCapture(captureRect);
202204
}
@@ -206,9 +208,11 @@ private static void getIconBufferedImage() throws Exception {
206208
Rectangle rect = internalFrame.getBounds();
207209
Rectangle captureRect = new Rectangle(
208210
point.x + internalFrame.getInsets().left,
209-
point.y,
210-
rect.width,
211-
internalFrame.getInsets().top);
211+
point.y + internalFrame.getInsets().top,
212+
titleIcon.getIconWidth(),
213+
titleIcon.getIconHeight());
214+
215+
System.out.println("icon captureRect " + captureRect);
212216
iconImage
213217
= robot.createScreenCapture(captureRect);
214218
}

0 commit comments

Comments
 (0)