looks ok to me.

Regards

Prasanta

On 15-Nov-19 4:04 PM, Jayathirth D V wrote:

Yes exactly. I was under the impression that waitTillShown() calls getLocationOnScreen() and makes sure that focus is on that component. But waitTillShown() also adds 100ms delay, so looks like just adding a delay helps in recording mouse entry event back to the frame.

I have updated the webrev to just add robot.delay() for mouse entry into the frame:

http://cr.openjdk.java.net/~jdv/8234184/webrev.04/

Thanks,

Jay

*From:*Prasanta Sadhukhan
*Sent:* Friday, November 15, 2019 3:14 PM
*To:* Jayathirth D V <jayathirth....@oracle.com>; awt-dev@openjdk.java.net
*Subject:* Re: <AWT Dev> [14] RFR JDK-8234184:[TESTBUG] java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java fails in Windows

On 15-Nov-19 3:10 PM, Prasanta Sadhukhan wrote:

    Hi Jay,

    On 15-Nov-19 3:00 PM, Jayathirth D V wrote:

        Hi Prasanta,

        InvokeAndWait() for createAndShowGUI will not make sure that
        frame is visible?

    Yes, with invokeAndWait() with waitForIdle() it should be.

        When InvokeLater was used for createAndShowGUI() we had
        waitUntilShown(frame) inside createAndShowGUI to make sure
        frame is visible.

        Main issue in this test is mouse exit from frame and entry
        into frame is not recorded properly.

        After frame is created when we create dialog, having
        waitTillShown(dialog) makes sure that we count mouse exit from
        frame properly.

        When we close the dialog, having waitTillShown(frame) makes
        sure that we count mouse entry into frame properly.

    As I understand, Util.clickOnComp(openButton,..) will open the
    dialog so it's ok to call waitTillSHown(dialog)

    but the frame is already visible by the time waitTillShown(dialog) is 
called bcoz of above reason, so why to wait for frame being visible by calling 
waitTillShown(frame)?

maybe, you mean to call robot.delay() to just add a delay...

    Regards

    Prasanta

        For frame.dispose() EDT here is updated webrev:

        http://cr.openjdk.java.net/~jdv/8234184/webrev.03/

        Thanks,

        Jay

        *From:*Prasanta Sadhukhan
        *Sent:* Friday, November 15, 2019 2:38 PM
        *To:* Jayathirth D V <jayathirth....@oracle.com>
        <mailto:jayathirth....@oracle.com>; awt-dev@openjdk.java.net
        <mailto:awt-dev@openjdk.java.net>
        *Subject:* Re: <AWT Dev> [14] RFR JDK-8234184:[TESTBUG]
        java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java
        fails in Windows

        Then shouldn't the waitUntilShown(frame) to be called
        immediately after createAndShowGUI and then proceed with the
        test because we are doing clickOnComp(frame,....) which will
        be a noop if the frame is not shown,right?

        Also, frame.dispose() should be under EDT.

        Regards

        Prasanta

        On 15-Nov-19 2:31 PM, Jayathirth D V wrote:

            Hi Prasanta,

            I have added frame disposal.

            And we need waitUntilShown() that is present especially
            for frame. Because without waitUntilShown(frame) sometimes
            dialog closes and then we validate mouseenter count before
            it is actually recorded in the listener and test fails.

            Please find updated webrev:

            http://cr.openjdk.java.net/~jdv/8234184/webrev.02/

            Thanks,

            Jay

            *From:*Prasanta Sadhukhan
            *Sent:* Friday, November 15, 2019 1:19 PM
            *To:* Jayathirth D V <jayathirth....@oracle.com>
            <mailto:jayathirth....@oracle.com>;
            awt-dev@openjdk.java.net <mailto:awt-dev@openjdk.java.net>
            *Subject:* Re: <AWT Dev> [14] RFR JDK-8234184:[TESTBUG]
            java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java
            fails in Windows

            I also believe with use of invokeAndWait(), we probably do
            not need waitUntilShown(frame) too.

            On 15-Nov-19 1:04 PM, Prasanta Sadhukhan wrote:

                Hi Jay,

                I guess we should also do the dispose of the JFrame
                via try-finally in main() for the cleanup.

                Regards

                Prasanta

                On 15-Nov-19 12:50 PM, Jayathirth D V wrote:

                    Hi Prasanta,

                    waitUntilShown() inside createAndShowGUI() was
                    doing the same job, but its good if we use
                    InvokeAndWait().

                    Please find updated webrev:

                    http://cr.openjdk.java.net/~jdv/8234184/webrev.01/

                    Latest webrev is green in internal CI test system.

                    Thanks,

                    Jay

                    *From:*Prasanta Sadhukhan
                    *Sent:* Thursday, November 14, 2019 11:00 PM
                    *To:* Jayathirth D V <jayathirth....@oracle.com>
                    <mailto:jayathirth....@oracle.com>;
                    awt-dev@openjdk.java.net
                    <mailto:awt-dev@openjdk.java.net>
                    *Subject:* Re: <AWT Dev> [14] RFR
                    JDK-8234184:[TESTBUG]
                    
java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java
                    fails in Windows

                    Probably we can call invokeAndWait() for
                    createAndShowGUI instead of invokeLater for frame
                    to be shown, which may beĀ  more cleaner approach.

                    Regards

                    Prasanta

                    On 14-Nov-19 10:46 PM, Jayathirth D V wrote:

                        Hello All,

                        Please review the following fix in JDK14:

                        Bug :
                        https://bugs.openjdk.java.net/browse/JDK-8234184

                        Webrev :
                        http://cr.openjdk.java.net/~jdv/8234184/webrev.00/


                        Issue : We are disposing the frame even before
                        we record Mouse Entry event.

                        Solution : Added appropriate waits to record
                        Mouse entry event.

                        Test fails every time without fix in Internal
                        CI and passes everytime with fix.

                        Thanks,

                        Jay

Reply via email to