Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8174237

[TESTBUG] [macosx] Jemmy: JSlider cannot scroll to negative value on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • client-libs
    • b161

        If we try to use JSliderOperator.scrollToMinimum() for a slider which has a negative minimum value, then the slider scrolls till 0 and then gets stuck, leading to timeout error.

        This happens only on Mac, it is not reproducible on windows, Linux and Solaris.

        This issue was encountered when automating Slider Demo .
        When we were using checkMinimum(jso, -10);

        on line 81 for SliderDemoTest, the following calls were made:

        > SliderDemoTest.checkMinimum(JSliderOperator jso, int minValue)
        > JSliderOperator.scrollToMinimum()
        > JSliderOperator. scrollToValue(getMinimum())
        > JSliderOperator.scrollTo(final ScrollAdjuster adj)
        > AbstractScrollDriver.scroll(ComponentOperator oper, ScrollAdjuster adj)

        At this point for windows, canPushAndWait(oper) was being executed , while for mac doJumps(oper, adj) was being executed
        this called:

        > JSliderAPIDriver.jump(final ComponentOperator oper, final ScrollAdjuster adj)

        in this function, newValue = -1; was being done, and after assigning a new value to newValue conditionally, it was calling JSliderAPIDriver. setValue(ComponentOperator oper, int value)

        which was setting the new value using JSliderOperator.setValue only if the newValue is not -1, which had been set as initial value, this was being done as a check that the value of newValue has not changed, but when the slider needs to goto a negative value, then this gets stuck at 0, because -1 value cannot be assigned.

              vagarwal Vikrant Agarwal
              vagarwal Vikrant Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: