JDK-6504197 : test/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,solaris_10
  • CPU: generic,sparc
  • Submitted: 2006-12-13
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b09Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The test fails with JDK7.0b01 and b04 on ubuntu GNOME display. See Comments for full jtreg output.

Comments
EVALUATION The new change request about window insets is 6514125.
17-01-2007

SUGGESTED FIX --- ScreenInsetsTest.java 2007-01-17 18:58:32.000000000 +0300 *************** *** 34,39 **** --- 34,40 ---- Insets gcInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc); Frame f = new Frame("Test", gc); + f.setUndecorated(true); f.setBounds(gcBounds.x + 100, gcBounds.y + 100, 320, 240); f.setVisible(true); Util.waitForIdle(null);
17-01-2007

EVALUATION I have launched the test on Ubuntu 6.06 with GNOME desktop and it has failed. Error message is: Wrong insets for GraphicsConfig: X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x20] Expected: java.awt.Insets[top=25,left=0,bottom=21,right=0] Actual: java.awt.Insets[top=25,left=0,bottom=25,right=0] After some investigation I found that the problem is not with the test or with the screen insets code, but with frame insets code. When the frame is maximized in the test, we recieve ConfigureNotify and calculate frame's bounds using event's data and frame's insets. However, GNOME manager changes the frame's insets when the frame is maximized, so we get wrong frame bounds which causes the test to fail. To make the test more robust, I make the frame undecorated. I'm also going to file a bug about window insets.
17-01-2007

EVALUATION As the test is introduced with the fix for 4737732 which is integrated into 7.0b04, I'm not surprised that the test fails with 7.0b01. As for the fail with 7.0b04, it should be investigated.
19-12-2006