RFR: 8276167: VirtualFlow.scrollToTop doesn't scroll to the top of the last element [v3]

eduardsdv duke at openjdk.java.net
Fri Dec 10 13:49:19 UTC 2021


On Fri, 10 Dec 2021 12:33:29 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> eduardsdv has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8276170: Add junit for VirtualFlow.scrollToTop(int)
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewKeyInputTest.java line 1844:
> 
>> 1842:         }
>> 1843:         listView.setPrefHeight(130); // roughly room for four rows
>> 1844:         Toolkit.getToolkit().firePulse();
> 
> Why is this needed here?

Without this line the test fails in the line 1865 with the message 'expected:<7> but was:<8>'.
I think this is because in the line 1850 'listView.scrollTo(99)' is executed, which now does not set the position to 1.

-------------

PR: https://git.openjdk.java.net/jfx/pull/656


More information about the openjfx-dev mailing list