<Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Fri Feb 23 05:57:55 UTC 2018
looks fine to me.
Regards
Prasanta
On 2/23/2018 11:10 AM, Pankaj Bansal wrote:
>
> Hi Prasanta,
>
> Thanks for the review.
>
> <<ok. thanks for the clarification. One point however, in spec it is
> mentioned to use "As of v1.3, it is recommended that <<developers call
> |Component.AccessibleAWTComponent.getAccessibleChild()| instead of this"
>
> Done.
>
> Webrev:
>
> http://cr.openjdk.java.net/~pbansal/8190347/webrev.02/
> <http://cr.openjdk.java.net/%7Epbansal/8190347/webrev.02/>
>
> Regards,
>
> Pankaj Bansal
>
> *From:*Prasanta Sadhukhan
> *Sent:* Thursday, February 22, 2018 8:59 PM
> *To:* Pankaj Bansal; swing-dev at openjdk.java.net
> *Subject:* Re: <Swing Dev> [11] JDK-8190347: [TESTBUG] Test
> javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java
> fails
>
> ok. thanks for t he clarification. One point however, in spec it is
> mentioned to use "As of v1.3, it is recommended that developers call
> |Component.AccessibleAWTComponent.getAccessibleChild()| instead of this"
>
> getAccessibleChild(JComponent c,
> int i)
>
> Regards
> Prasanta
>
> On 2/22/2018 8:36 PM, Pankaj Bansal wrote:
>
> Hi Prasanta,
>
> Thanks for the review.
>
> <<I guess you mentioned that we cannot fix completely for
> scaleFactor > 2. Does this fix cater to those scaleFactors too?
>
> This fix is not specific to any particular scale factor. I have
> just modified it to work independent of the fact popup is created
> above or below. This change is independent of any HiDPI settings.
> Using HiDPi scale >= 2 is just one of reproducing this issue. It
> can be reproduced altering the window size, changing number of
> items in popUp etc. basically the test case should not assume that
> popup will be opaque always when there are scenarios, when it
> won’t be opaque.
>
> << 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.
> I found this issue while working on a bug
> https://bugs.openjdk.java.net/browse/JDK-8164811, which involves
> using translucent components with HiDPI screens and that issue was
> found because of this test case only. So I think this test case is
> supposed to work well on HiDPI screens. All the test cases in the
> same folder are run on 1.5 scale by default.
>
> Regards,
>
> Pankaj Bansal
>
>
> *From:*Prasanta Sadhukhan
> *Sent:* Thursday, February 22, 2018 8:14 PM
> *To:* Jayathirth D V; Pankaj Bansal; swing-dev at openjdk.java.net
> <mailto:swing-dev at openjdk.java.net>; Sergey Bylokhov
> *Subject:* Re: <Swing Dev> [11] JDK-8190347: [TESTBUG] Test
> javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java
> fails
>
> 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 at openjdk.java.net
> <mailto:swing-dev at 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 at openjdk.java.net
> <mailto:swing-dev at 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 at openjdk.java.net
> <mailto:swing-dev at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180223/2ace32a1/attachment.html>
More information about the swing-dev
mailing list