JDK-8194048 : Regression automated test '/open/test/jdk/javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java' fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 10,11,13,14
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2017-12-07
  • Updated: 2024-07-18
  • Resolved: 2022-12-19
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 20 JDK 21
20 b29Fixed 21Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Testsuite: Regression-se-gui
Test name(s): javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java
Product(s) tested: JDK 10-clien-nightly.132 (64bit)
OS/architecture: Windows 7 SP1 x64

Actual results:
The case HidingSelectionTest failed automatically. 

Comments
This fix was backed out using: JDK-8299123 [BACKOUT] 4512626 Non-editable JTextArea provides no visual indication of keyboard focus
20-12-2022

Changeset: 3e17e3c1 Author: Alexander Zuev <kizune@openjdk.org> Date: 2022-12-19 22:16:56 +0000 URL: https://git.openjdk.org/jdk20/commit/3e17e3c1c12d71461213bf15cdb72d4d93c88460
19-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk20/pull/21 Date: 2022-12-12 22:33:51 +0000
15-12-2022

Evaluation: Issue: The test fails only on windows 7. Test fails on line 131 with the exception "Test fails: selection ownership is lost selection is shown" Cause: ScreenCapture on line 131 is same as ScreenCapture on line 80(i.e, sel). Because of this biEqual(robot.createScreenCapture(bounds), sel) returns true and the test fails. Fix: Check that the selected text field in first window should be shown selected after some text field is selected on second window in Windows 7 platform, while it should not be shown selected in other platforms. Note: Test passes on Windows 10 and Mac platform because the CreateCapture differs on line 131 from line 80(i.e,) in terms of color. And in Linux the test passes because selection clears if another selection was made in another window. So in all the above cases the biEqual(robot.createScreenCapture(bounds), sel) returns false.
18-06-2019

This is a test bug. Actually selection should not be cleared if another selection was made in another window.
21-12-2017

I reproduced this test failure on Windows 7.
21-12-2017