diff options
author | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 00:13:48 +0000 |
---|---|---|
committer | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 00:13:48 +0000 |
commit | 6c271d283c01f53c8e8f8ef4125781ee4896a0c2 (patch) | |
tree | 201e66ac577ae679833554437b7aa3d4428be688 /android_webview | |
parent | ab6e1a1b31c9479b535819af675cb3c04bafc46a (diff) | |
download | chromium_src-6c271d283c01f53c8e8f8ef4125781ee4896a0c2.zip chromium_src-6c271d283c01f53c8e8f8ef4125781ee4896a0c2.tar.gz chromium_src-6c271d283c01f53c8e8f8ef4125781ee4896a0c2.tar.bz2 |
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
Diffstat (limited to 'android_webview')
2 files changed, 12 insertions, 7 deletions
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java index 928948d..64a2596 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java @@ -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()); } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java index d8aa682..bb10136 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java @@ -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()); |