JDK-8239266 : [TEST_BUG] Test RemoveAllShrinkTest clicks mouse in the wrong place
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8,11,12,13,14,15
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2020-02-17
  • Updated: 2020-03-31
  • Resolved: 2020-03-31
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 15
15Resolved
Related Reports
Relates :  
Description
The test RemoveAllShrinkTest clicks left mouse button to open Choice:

robot.mouseMove(
                pt.x + choice.getWidth() - choice.getHeight()/2,
                pt.y + choice.getHeight()/2);

The x coordinate uses  choice.getHeight()/2 which likely will result in the wrong position and Choice does not open at all.

It should be pt.x + choice.getWidth()/2.
Comments
With the modified calculation for x, Robot click the middle of the component which has the same effect: the choice control opens its drop-down list, so it is good enough. Such an algorithm is used: to click the drop-down button. (We cannot get the width of that button, and the code assumes the button is square, which is true for the majority of cases.) If Choice never allows typing an entry, the change is safe and the original algorithm is correct and works properly. No modification are required.
31-03-2020

After JDK-8225126, the test is in open part, and the problem still exists there.
18-02-2020