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

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

Issue 2825203002: Fix flaky testAddVisualStateCallbackAfterRendererGone (Closed)
Patch Set: address comments Created 3 years, 8 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 | « android_webview/javatests/src/org/chromium/android_webview/test/RenderProcessGoneHelper.java ('k') | 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/crash/VisualStateCallbackTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/crash/VisualStateCallbackTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/crash/VisualStateCallbackTest.java
index 447dd49c303e84b90f7bec0e382fd365bc7b576e..884f4c0c81305c0d8786a3fce892f975984824a5 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/crash/VisualStateCallbackTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/crash/VisualStateCallbackTest.java
@@ -153,13 +153,16 @@ public class VisualStateCallbackTest extends AwTestBase {
@SmallTest
@CommandLineFlags
.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
- @ParameterizedTest.Set
- public void testAddVisualStateCallbackAfterRendererGone() throws Throwable {
+ @ParameterizedTest.Set
+ public void testAddVisualStateCallbackAfterRendererGone() throws Throwable {
+ final VisualStateCallbackImpl vsImpl = new VisualStateCallbackImpl();
+ mHelper.setOnRenderProcessGoneTask(new Runnable() {
+ @Override
+ public void run() {
+ mAwContents.insertVisualStateCallback(vsImpl.requestId(), vsImpl);
+ }
+ });
loadUrlAsync(mAwContents, "chrome://kill");
- mHelper.waitForRenderProcessGone();
-
- VisualStateCallbackImpl vsImpl = new VisualStateCallbackImpl();
- insertVisualStateCallbackOnUIThread(mAwContents, vsImpl.requestId(), vsImpl);
mHelper.waitForRenderProcessGoneNotifiedToAwContentsClient();
@@ -174,8 +177,8 @@ public class VisualStateCallbackTest extends AwTestBase {
@SmallTest
@CommandLineFlags
.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
- @ParameterizedTest.Set
- public void testVisualStateCallbackNotCalledAfterRendererGone() throws Throwable {
+ @ParameterizedTest.Set
+ public void testVisualStateCallbackNotCalledAfterRendererGone() throws Throwable {
VisualStateCallbackImpl vsImpl = new VisualStateCallbackImpl();
insertVisualStateCallbackOnUIThread(mAwContents, vsImpl.requestId(), vsImpl);
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/RenderProcessGoneHelper.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698