Fix ScrollViewTest testSmoothScrollBy and testSmoothScrollTo.
Change test to expect the X position to not scroll.
Bug 2558855
Change-Id: If4bb8a1370209361c64a747f208246f009af2131
diff --git a/tests/tests/widget/src/android/widget/cts/ScrollViewTest.java b/tests/tests/widget/src/android/widget/cts/ScrollViewTest.java
index 10a63af..b852e5b 100644
--- a/tests/tests/widget/src/android/widget/cts/ScrollViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/ScrollViewTest.java
@@ -546,8 +546,9 @@
mScrollView.smoothScrollBy(mScrollRight, mScrollBottom);
}
});
- delayedCheckSmoothScrolling(0, mScrollRight, 0, mScrollBottom);
- assertEquals(mScrollRight, mScrollView.getScrollX());
+ // smoothScrollBy doesn't scroll in X
+ delayedCheckSmoothScrolling(0, 0, 0, mScrollBottom);
+ assertEquals(0, mScrollView.getScrollX());
assertEquals(mScrollBottom, mScrollView.getScrollY());
runTestOnUiThread(new Runnable() {
@@ -574,8 +575,9 @@
mScrollView.smoothScrollTo(mScrollRight, mScrollBottom);
}
});
- delayedCheckSmoothScrolling(0, mScrollRight, 0, mScrollBottom);
- assertEquals(mScrollRight, mScrollView.getScrollX());
+ // smoothScrollTo doesn't scroll in X
+ delayedCheckSmoothScrolling(0, 0, 0, mScrollBottom);
+ assertEquals(0, mScrollView.getScrollX());
assertEquals(mScrollBottom, mScrollView.getScrollY());
runTestOnUiThread(new Runnable() {
@@ -583,8 +585,8 @@
mScrollView.smoothScrollTo(mPageWidth, mPageHeight);
}
});
- delayedCheckSmoothScrolling(mScrollRight, mPageWidth, mScrollBottom, mPageHeight);
- assertEquals(mPageWidth, mScrollView.getScrollX());
+ delayedCheckSmoothScrolling(0, 0, mScrollBottom, mPageHeight);
+ assertEquals(0, mScrollView.getScrollX());
assertEquals(mPageHeight, mScrollView.getScrollY());
}