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

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

Issue 831903004: [WebView] Add a new flushVisualState API to AwContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: int -> uint62 everywhere for real. Created 5 years, 10 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/AwContentsClientShouldInterceptRequestTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
index 131eb1a9e8944a38dddbaa4495f9f5aeea91f913..8d21a2fd6339889a30239dd23fa275b83e77644f 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
@@ -5,17 +5,16 @@
package org.chromium.android_webview.test;
import android.graphics.Bitmap;
-import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Build;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Pair;
import org.chromium.android_webview.AwContents;
-import org.chromium.android_webview.AwContentsClient.ShouldInterceptRequestParams;
import org.chromium.android_webview.AwWebResourceResponse;
import org.chromium.android_webview.test.util.AwTestTouchUtils;
import org.chromium.android_webview.test.util.CommonResources;
+import org.chromium.android_webview.test.util.GraphicsTestUtils;
import org.chromium.android_webview.test.util.JSUtils;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.MinAndroidSdkLevel;
@@ -252,11 +251,9 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase {
pollOnUiThread(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
- Bitmap bitmap = Bitmap.createBitmap(2, 2, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(bitmap);
- canvas.translate(-(float) mTestContainerView.getWidth() / 2,
+ Bitmap bitmap = GraphicsTestUtils.drawAwContents(mAwContents, 2, 2,
+ -(float) mTestContainerView.getWidth() / 2,
-(float) mTestContainerView.getHeight() / 2);
- mAwContents.onDraw(canvas);
return bitmap.getPixel(0, 0) == Color.BLUE;
}
});

Powered by Google App Engine
This is Rietveld 408576698