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

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

Issue 1846653003: android webview: Keep zoom methods synchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ipc comments Created 4 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
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 f22317a79eed6b17051793be9bc1ba4cbe4e03ee..f650288271efe6eac7e1de8a3f7687a64342513d 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
@@ -15,7 +15,6 @@ import org.chromium.android_webview.test.util.CommonResources;
import org.chromium.android_webview.test.util.JavascriptEventObserver;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.SuppressFBWarnings;
-import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.content_public.browser.GestureStateListener;
@@ -771,13 +770,8 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
onScrollUpdateGestureConsumedHelper.waitForCallback(callCount);
}
- /*
@SmallTest
@Feature({"AndroidWebView"})
- Disabled because zoomIn is no longer synchronous. Fix if it's a compatibility problem.
- See crbug.com/545628.
- */
- @DisabledTest
public void testPinchZoomUpdatesScrollRangeSynchronously() throws Throwable {
final TestAwContentsClient contentsClient = new TestAwContentsClient();
final ScrollTestContainerView testContainerView =
@@ -833,7 +827,13 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
"Scroll range should increase after zoom (%d) > (%d)",
atomicNewScrollRange.get(), atomicOldScrollRange.get()),
atomicNewScrollRange.get() > atomicOldScrollRange.get());
- assertEquals(atomicContentHeight.get(), atomicOldContentHeightApproximation.get());
- assertEquals(atomicContentHeight.get(), atomicNewContentHeightApproximation.get());
+ assertTrue(String.format(Locale.ENGLISH, "Old content height should be close (%d) ~= (%d)",
+ atomicContentHeight.get(), atomicOldContentHeightApproximation.get()),
+ Math.abs(atomicContentHeight.get() - atomicOldContentHeightApproximation.get())
+ <= 1);
+ assertTrue(String.format(Locale.ENGLISH, "New content height should be close (%d) ~= (%d)",
+ atomicContentHeight.get(), atomicNewContentHeightApproximation.get()),
+ Math.abs(atomicContentHeight.get() - atomicNewContentHeightApproximation.get())
+ <= 1);
}
}
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698