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

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

Issue 1026723002: [Android WebView] Deflake new OnReceived*Error tests that simulate tap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java
index d9bdc8e62669be84d72fb4f0762573f33e28bd54..971938d20ff9ad39133297be62ad93d6f52b1faf 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java
@@ -120,7 +120,8 @@ public class ClientOnReceivedError2Test extends AwTestBase {
useDefaultTestAwContentsClient();
final String pageHtml = CommonResources.makeHtmlPageWithSimpleLinkTo(BAD_HTML_URL);
loadDataAsync(mAwContents, pageHtml, "text/html", false);
- waitForVisualStateCallback(mAwContents);
+ waitForPixelColorAtCenterOfView(mAwContents,
+ mTestContainerView, CommonResources.LINK_COLOR);
TestAwContentsClient.OnReceivedError2Helper onReceivedError2Helper =
mContentsClient.getOnReceivedError2Helper();
@@ -182,7 +183,8 @@ public class ClientOnReceivedError2Test extends AwTestBase {
final String pageHtml = CommonResources.makeHtmlPageFrom(
"", "<iframe style='width:100%;height:100%;' src='" + iframeUrl + "' />");
loadDataAsync(mAwContents, pageHtml, "text/html", false);
- waitForVisualStateCallback(mAwContents);
+ waitForPixelColorAtCenterOfView(mAwContents,
+ mTestContainerView, CommonResources.LINK_COLOR);
TestAwContentsClient.OnReceivedError2Helper onReceivedError2Helper =
mContentsClient.getOnReceivedError2Helper();

Powered by Google App Engine
This is Rietveld 408576698