JDK-8080982 : [TESTBUG] Test java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u60,9,11,11.0.6-oracle,13,14,15
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2015-05-25
  • Updated: 2023-10-09
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Testsuite name: Regression(jdk_awt)
Test name(s):  java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java
Product(s) tested: JDK 9b65(64-bit), JDK 8u60b14(64-bit)
OS/architecture: Windows/x64, Linux/x64
Reproducible: Always
Reproducible on machine: spb23313.ru.oracle.com(Linux), spb23265.ru.oracle.com(Windows)
Is it a Regression: No
Regression introduced in release/build: N/A
Is it a platform specific issue: No(fails on Windows, Linux and MacOSX)
[If platform specific issue] Is it a new (previously unsupported) OS/browser/mode testing: No
[If new configuration testing] Issue specific to execution mode or OS/browser version:No

Exception/Error from Log:
----------System.out:(0/0)----------
----------System.err:(14/981)----------
java.lang.RuntimeException: TEST FAILED: Image with wrong resolution is used for drag image!
	at MultiResolutionDragImageTest.testDrag(MultiResolutionDragImageTest.java:101)
	at MultiResolutionDragImageTest.main(MultiResolutionDragImageTest.java:55)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: Image with wrong resolution is used for drag image!
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: TEST FAILED: Image with wrong resolution is used for drag image!

Test run log location: see comments
Comments
Ran test case in Windows 7 machine. We dont see any image being dragged even though there is TransferHandler.setDragImage(), because of this robot.getPixelColor() picks the white color present in JTextField and the test fails. It is mentioned as test issue by Alexander but not the exact cause.
26-10-2021

This test passes in macOS and fails in Windows and Linux in our CI systems. Looks like we have test as well as product issue in this bug : Test issue : Only in case of macOS when we call setVisible(true) on JTextField whole text field is getting selected and we are able to the content of JTextField and test works as it supposed to work. In case of Windows when i run this test JTextField content is not highlighted so we never drag the content in JTextField so no image is shown. If i modify the test case to just create GUI and then manually if i select whole "Drag Me" text and drag it i can see that non-HiDPI image is getting dragged. Product issue : In case of macOS i see that we have support for MultiResolutionImage in sun.lwawt.macosx.CImage and sun.lwawt.macosx.CDragSourceContextPeer. So i am able to see HiDPI image getting selected when scale factor is > 1. But in case of sun.awt.X11.XDragSourceContextPeer and sun.awt.windows.WDragSourceContextPeer i dont see any MultiResolutionImage specific code where we check like if dragimage is instance of MultiResolutionImage and set appropriate image. Looks like we dont have MultiResolution image support for DnD in Windows and Linux. If that is the case shouldn't we run this MultiResolutionDragImageTest.java only in macOS and raise separate product issue. WIP. More details : JEP 251 : https://bugs.openjdk.java.net/browse/JDK-8046010 Custom MultiResolution image support on HiDPI displays : https://bugs.openjdk.java.net/browse/JDK-8029339
26-10-2021

This bug is "In Progress" status now, so re-targeting back to Fix Version 9. If you are not working on this bug fix anymore, please update the bug from "In Progress" to just "Open"
13-11-2015

This is a bug in the test.
26-05-2015

Alexandr, is it a test bug? Please evaluate.
26-05-2015