This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -742,9 +742,11 @@ class PanZoomControllerTest : BaseSessionTest() {
742
742
}
743
743
})
744
744
745
+ val fuzzyEqual = { a: Float , b: Float -> Math .abs(a - b) <= 1.0 }
746
+
745
747
// Scroll down to the bottom using touch gestures, and check
746
748
// that the expected scroll updates are reported
747
- while (updates.size == 0 || updates[updates.size - 1 ].scrollY < scrollMaxY) {
749
+ while (updates.size == 0 || ! fuzzyEqual( updates[updates.size - 1 ].scrollY, scrollMaxY) ) {
748
750
pan(25f , 15f )
749
751
mainSession.flushApzRepaints()
750
752
}
@@ -765,7 +767,7 @@ class PanZoomControllerTest : BaseSessionTest() {
765
767
766
768
// Scroll back up to the top using script, and check that
767
769
// the expected scroll updates are reported
768
- while (updates.size == 0 || updates[updates.size - 1 ].scrollY > 0 ) {
770
+ while (updates.size == 0 || ! fuzzyEqual( updates[updates.size - 1 ].scrollY, 0 ) ) {
769
771
mainSession.evaluateJS(" window.scrollBy(0, -10)" )
770
772
mainSession.flushApzRepaints()
771
773
}
You can’t perform that action at this time.
0 commit comments