Commit 6c271d28 authored by boliu@chromium.org's avatar boliu@chromium.org

Defalke testOnPageFinishedCalledAfterError

by making timeout from 5 (default) to 15 seconds.

BUG=152033
Android java test change. Ran through android trybot
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11316304

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170848 0039d316-1c4b-4281-b951-d872f2087c98
parent ab6e1a1b
......@@ -12,6 +12,8 @@ import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
import org.chromium.net.test.util.TestWebServer;
import java.util.concurrent.TimeUnit;
/**
* Tests for the ContentViewClient.onPageFinished() method.
*/
......@@ -53,13 +55,19 @@ public class ClientOnPageFinishedTest extends AndroidWebViewTestBase {
assertEquals(0, onReceivedErrorHelper.getCallCount());
String url = "http://man.id.be.really.surprised.if.this.address.existed.blah/";
String url = "http://localhost:7/non_existent";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
int onPageFinishedCallCount = onPageFinishedHelper.getCallCount();
loadUrlAsync(mAwContents, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
onPageFinishedHelper.waitForCallback(onPageFinishedCallCount);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount,
1 /* numberOfCallsToWaitFor */,
WAIT_TIMEOUT_SECONDS,
TimeUnit.SECONDS);
onPageFinishedHelper.waitForCallback(onPageFinishedCallCount,
1 /* numberOfCallsToWaitFor */,
WAIT_TIMEOUT_SECONDS,
TimeUnit.SECONDS);
assertEquals(1, onReceivedErrorHelper.getCallCount());
}
......
......@@ -42,12 +42,9 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
loadUrlAsync(mAwContents, url);
// TODO(boliu): This is spuriously timing out on build bots but cannot
// be reproduced locally. Trying a longer timeout value to see if it is
// due to value too slow or some other issue. See crbug.com/152033.
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount,
1 /* numberOfCallsToWaitFor */,
30 /* timeout */,
WAIT_TIMEOUT_SECONDS,
TimeUnit.SECONDS);
assertEquals(ErrorCodeConversionHelper.ERROR_HOST_LOOKUP,
onReceivedErrorHelper.getErrorCode());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment