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

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

Issue 2027013002: aw: Fix testForceDrawWhenInvisible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | 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/AwContentsRenderTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java
index 28e00307ae1652581468e22a8ff3f6db8f2b1245..df4815fd5bdfec0be519a48031a28f5cb3249ce9 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java
@@ -14,8 +14,8 @@ import org.chromium.android_webview.AwContents.VisualStateCallback;
import org.chromium.android_webview.test.util.GraphicsTestUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.Feature;
-import org.chromium.base.test.util.parameter.ParameterizedTest;
+import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -94,7 +94,6 @@ public class AwContentsRenderTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
- @ParameterizedTest.Set
public void testForceDrawWhenInvisible() throws Throwable {
loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
"data:text/html,<html><head><style>body {background-color:#227788}</style></head>"
@@ -118,8 +117,18 @@ public class AwContentsRenderTest extends AwTestBase {
});
assertTrue(latch.await(AwTestBase.WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS));
- final int width = mAwContents.getContentWidthCss();
- final int height = mAwContents.getContentHeightCss();
+ final int width = ThreadUtils.runOnUiThreadBlockingNoException(new Callable<Integer>() {
+ @Override
+ public Integer call() {
+ return mContainerView.getWidth();
+ }
+ });
+ final int height = ThreadUtils.runOnUiThreadBlockingNoException(new Callable<Integer>() {
+ @Override
+ public Integer call() {
+ return mContainerView.getHeight();
+ }
+ });
visibleBitmap = GraphicsTestUtils.drawAwContentsOnUiThread(mAwContents, width, height);
// Things that affect DOM page visibility:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698