United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6888634 test/closed/javax/swing/Popup/TaskbarPositionTest.java fails
JDK-6888634 : test/closed/javax/swing/Popup/TaskbarPositionTest.java fails

Details
Type:
Bug
Submit Date:
2009-10-06
Status:
Resolved
Updated Date:
2012-05-17
Project Name:
JDK
Resolved Date:
2012-04-10
Component:
client-libs
OS:
windows_vista,generic
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10,7,7u4
Fixed Versions:

Related Reports
Backport:
Duplicate:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
The regression test fails with JDK 7b73 on X11 (linux-i586, Gnome/Metacity 2.24) with the following output:

----------System.out:(2/236)----------
We do not match! java.awt.Rectangle[x=0,y=24,width=1920,height=1176] / java.awt.Rectangle[x=0,y=0,width=0,height=0]
We do not match! java.awt.Rectangle[x=0,y=24,width=1920,height=1176] / java.awt.Rectangle[x=0,y=0,width=109,height=121]
----------System.err:(13/704)----------
java.lang.RuntimeException: Test failed
	at TaskbarPositionTest.main(TaskbarPositionTest.java:379)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:617)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

                                    

Comments
EVALUATION

The test opens various types of popup menus and checks are their rectangles fit in screen dimension. In particular it positions a menu nearly the bottom of the screen and observes that its rectangle is outside the screen. Visually it's not the case. Indeed the java api provides screen size minus talkbar rectangle size. 
On my Win7 it's less than original screen size for about 40 pixels. On ubuntu it also doesn't take into consideration the taskbar. Although it doesn't prevent the popups to be shown properly on screen (they may overlap taksbars), test fails.
It's a long story (e.g. 6677463) with screen borders and I don't see a problem with current java api concerning this particular test.
                                     
2011-04-26
EVALUATION

There are two problems:
1. After fis of CR 6580930 popup can overlap taskbar. Therefore TaskbarPositionTest.java should be corrected
2. There is a regression after fix of CR 6694823: if left part of combobox is off the screen then popup coordinates is not corrected and popup is partial visible. We should fix the regression
                                     
2012-03-21



Hardware and Software, Engineered to Work Together