United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6616792 five AWT focus regression tests should be fixed
JDK-6616792 : five AWT focus regression tests should be fixed

Details
Type:
Bug
Submit Date:
2007-10-15
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
The following tests fail on Linux:

- test/closed/java/awt/Focus/ActualFocusedWindowRetaining/ActualFocusedWindowRetaining.java
- test/closed/java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java
- test/closed/java/awt/Focus/NonFocusableWindows/NonfocusableOwnerTest/NonfocusableOwnerTest.java
- test/closed/java/awt/Focus/TestNonFocusableMove/FrameJumpingToMouse.java

The following test fails on all platforms:

- test/closed/java/awt/Focus/TypeAhead/TestFocusFreeze.java

                                    

Comments
EVALUATION

1. test/closed/java/awt/Focus/ActualFocusedWindowRetaining/ActualFocusedWindowRetaining.java

Sometimes two quick clicks in one frame's title and then another is treated like a
double click in the latter frame and so causes it to maximize. Additional delays
should be added to the test.

2. test/closed/java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java

Long delay between robot.keyPress() and robot.keyRelease() ends up by generating more than
one KEY_TYPED.

3. test/closed/java/awt/Focus/NonFocusableWindows/NonfocusableOwnerTest/NonfocusableOwnerTest.java

AWT has a bug that consists in that DKFM keeps focus on a component after it has been removed.
This breaks the test.

4. test/closed/java/awt/Focus/TestNonFocusableMove/FrameJumpingToMouse.java

The regtesthelpers utilities should be used.

5. test/closed/java/awt/Focus/TypeAhead/TestFocusFreeze.java

The test contains a pitfall in its synchronization logic. Namely in showing the modal dialog
and pressing SPACE. These events are assumed to occur in a fixed order but this is not the case.
They really could occur in any order in the way it is written in the test.
                                     
2007-10-15
SUGGESTED FIX

The webrev is attached.
                                     
2008-03-27



Hardware and Software, Engineered to Work Together