-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b161
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176991 | 10 | Alexander Kuznetcov | P4 | Resolved | Fixed | b03 |
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.
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.
- backported by
-
JDK-8176991 [TESTBUG] [macosx] Jemmy: JSlider cannot scroll to negative value on Mac
-
- Resolved
-