Hi Pankaj,

I guess you mentioned that we cannot fix completely for scaleFactor > 2. Does this fix cater to those scaleFactors too? If not, I think it should be alright to restrict the testcase to run with uiScale=1.0 as it is not testing any hidpi feature.


Regards
Prasanta
On 2/22/2018 7:56 PM, Jayathirth D V wrote:

Hi Pankaj,

Copyright year should contain only the initial creation year and latest year in which the change is made. So you should replace 2016 with 2018. No need for another webrev you can make that change while pushing.

Other changes present in webrev.01 over webrev.00 is fine.

Please wait for more inputs from others before pushing the change.

Thanks,

Jay

*From:* Pankaj Bansal
*Sent:* Thursday, February 22, 2018 7:39 PM
*To:* Jayathirth D V; swing-dev@openjdk.java.net; Sergey Bylokhov; Prasanta Sadhukhan *Subject:* RE: <Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails

Hello Jay,

Thanks for the review.

<< We need to update Copyright year, add new bug id in jtreg comment & it’s better to keep jtreg comments before code for program starts like import statements.

Done.

Webrev

http://cr.openjdk.java.net/~pbansal/8190347/webrev.01/ <http://cr.openjdk.java.net/%7Epbansal/8190347/webrev.01/>

<< I think any one condition out of “(popup.getLocationOnScreen().y > ls.y”    &  “window.getHeight() < popup.getHeight() + south.getHeight()” would be enough to verify if popup.y <<exceeds window.y or not.

No, it will not work. “popup.getLocationOnScreen().y > ls.y” is required to find whether the popup is created above or below the JComboBox.

If it is below, raise exception as color conditions should have passed and this is an issue

If it is above, then we further need to verify, if it will fit inside the window or not. If it does not fit, then popup will be opaque and raise exception as color test should have passed.

Here we are trying to be sure that when the test has failed, it was not because of the reason that popup was translucent. In case of translucent popup, the color test will not pass  and exception should not be thrown as it is expected.

<<Also I remember we discussed on call that if possible we can keep the main window starting at y = 0, so that we have enough space below the window giving test more chance to <<execute properly.

All that was required assuming that we can’t find if the popup is created below or above the JComboBox. But I was able to find that using the popup and JComboBox location and this change is no longer needed.

Regards,

Pankaj Bansal

*From:* Jayathirth D V
*Sent:* Thursday, February 22, 2018 6:26 PM
*To:* Pankaj Bansal; swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>; Sergey Bylokhov; Prasanta Sadhukhan *Subject:* RE: <Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails

Hi Pankaj,

Please find my input:

We need to update Copyright year, add new bug id in jtreg comment & it’s better to keep jtreg comments before code for program starts like import statements.

I think any one condition out of “(popup.getLocationOnScreen().y > ls.y”    &    “window.getHeight() < popup.getHeight() + south.getHeight()” would be enough to verify if popup.y exceeds window.y or not.

Also I remember we discussed on call that if possible we can keep the main window starting at y = 0, so that we have enough space below the window giving test more chance to execute properly.

Thanks,

Jay

*From:* Pankaj Bansal
*Sent:* Thursday, February 22, 2018 5:34 PM
*To:* swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>; Sergey Bylokhov; Prasanta Sadhukhan *Subject:* <Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails

Hi All,

Please review the test only fix for JDK 11.

Bug:

https://bugs.openjdk.java.net/browse/JDK-8190347

webrev:

http://cr.openjdk.java.net/~pbansal/8190347/webrev.00/ <http://cr.openjdk.java.net/%7Epbansal/8190347/webrev.00/>

Issue:

The test TranslucentJComboBox creates a Translucent JWindow and then adds a JComboBox at the bottom. Then a popup is created when clicked on JComboBox. The test always checks the popup for opaqueness whether it is created below or above the JComboBox. If it is created below the JComboBox, it will be opaque.  If it is created above the JComboBox and it does not fit within the JWindow containing JComboBox, it will be opaque.

But in some scenarios, the Popup is created above the JComboBox and it can fit within the JWindow. In this case, it be translucent and the test will fail. The test needs to consider these scenarios.

One of the scenario to reproduce this is to run this test on a 1920X1080 screen with HiDPI value 2.0. The popup will be created above and it will fit within the JWindow of size 500X500. The test fails.

Fix:

Made changes to check if the popup is created below or above the JComboBox when the color values don’t pass the conditions. If it is created below or if it is created above and If it does not fit, through the exception else ignore.

Regards,

Pankaj Bansal


Reply via email to