<AWT Dev> [AWT Dev]  RFR JDK-8197926: java/awt/dnd/ImageTransferTest/ImageTransferTest.java doesnt close the windows in HiDPI setting
Sergey.Bylokhov at oracle.com
Wed Feb 14 22:56:33 UTC 2018
I suppose the test should dispose the frames as well(even if it fails).
I tried to emulate test failure, and got an open frame when the test
itself and jtreg exit.
On 14/02/2018 02:36, Jayathirth D V wrote:
> Hello All,
> Please review the following fix in JDK11 :
> Bug : https://bugs.openjdk.java.net/browse/JDK-8197926
> Webrev : http://cr.openjdk.java.net/~jdv/8197926/webrev.00/
> _Issue:_ If we enable HiDPi setting in Windows to approximately 125% or
> more, java/awt/dnd/ImageTransferTest/ImageTransferTest.java times out
> and doesn’t dispose the created Java windows.
> _Root cause_ : In Windows because of default insets parameters, frames
> created in test case overlap and over that if we enable HiDPi setting
> the mouse drag and drop calculation is not proper and this results in
> time out and created frames are not disposed properly.
> _Solution:_ The default frame insets behave differently in different
> platforms(Windows, Unix & MacOS). Since the main objective of test case
> is to transfer image from one frame to another and validate, there is no
> need for us to have frame with insets. Making the frame Undecorated
> results in uniform behavior across all platforms and test case passes. I
> have verified the test case after change in Windows, Ubuntu and MacOS
> and there are no side effects.
> _Observation_ : In the test case we are creating second frame using
> “ProcessCommunicator.executeChildProcess()”. If we want to reproduce
> the issue using “-Dsun.java2d.uiScale” from command prompt the
> ProcessCommunicator will pick default scale values and second window
> will not be of required dimensions. We can pass “-Dsun.java2d.uiScale”
> value to ProcessCommunicator.executeChildProcess() like
> classpath+" -Dsun.java2d.uiScale=2", args)) but I didn’t find a way to
> get “uiScale” value passed in command prompt into the test case.
> System.getProperty(sun.java2d.uiScale) returns null.
> If there is a way to get uiScale value passed in command prompt in the
> test case we can pass it to ProcessCommunicator.executeChildProcess() so
> that we can reproduce the issue by just passing VM option to jtreg. As
> of now to reproduce the issue we should go to Personalize->Display and
> change HiDPi setting.
Best regards, Sergey.
More information about the awt-dev