Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2296)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java

Issue 1015273002: Add back the truncation of scroll_delta (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove blank line Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
index 9224b2bda0c6e0be0817ff1651225dca5c8aefb9..a5d73234a1da62fd8f81794e84e139e15ee5a03e 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
@@ -219,7 +219,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
private void assertScrollInJs(final AwContents awContents,
final TestAwContentsClient contentsClient,
- final double xCss, final double yCss) throws Exception {
+ final int xCss, final int yCss) throws Exception {
poll(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
@@ -227,8 +227,8 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
"window.scrollX");
String y = executeJavaScriptAndWaitForResult(awContents, contentsClient,
"window.scrollY");
- return (Math.abs(xCss - Double.parseDouble(x)) < 0.001
- && Math.abs(yCss - Double.parseDouble(y)) < 0.001);
+ return (Integer.toString(xCss).equals(x)
+ && Integer.toString(yCss).equals(y));
}
});
}
@@ -421,8 +421,8 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
// Make sure we can't hit these values simply as a result of scrolling.
assert (maxScrollXPix % dragStepSize) != 0;
assert (maxScrollYPix % dragStepSize) != 0;
- final double maxScrollXCss = maxScrollXPix / deviceDIPScale;
- final double maxScrollYCss = maxScrollYPix / deviceDIPScale;
+ final int maxScrollXCss = (int) Math.floor(maxScrollXPix / deviceDIPScale);
+ final int maxScrollYCss = (int) Math.floor(maxScrollYPix / deviceDIPScale);
setMaxScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix);
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698