diff options
author | Jesse Wilson <jessewilson@google.com> | 2011-09-27 16:31:10 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-27 16:31:10 -0700 |
commit | 70980383decd0d7c2928d1950482c388467785e5 (patch) | |
tree | 9e75054012ac2288b80c4a525c72e8dc4fe11ecb | |
parent | 05aa1fef932c2f2cb22ac8d75fee4ac507a32a69 (diff) | |
parent | de5d7d250848b0db4119f362e2e700cb19e02293 (diff) | |
download | frameworks_base-70980383decd0d7c2928d1950482c388467785e5.zip frameworks_base-70980383decd0d7c2928d1950482c388467785e5.tar.gz frameworks_base-70980383decd0d7c2928d1950482c388467785e5.tar.bz2 |
Merge "Test to demonstrate NPE in DefaultRequestDirector"
-rw-r--r-- | core/tests/coretests/src/android/net/http/AbstractProxyTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/tests/coretests/src/android/net/http/AbstractProxyTest.java b/core/tests/coretests/src/android/net/http/AbstractProxyTest.java index ee4ce95..4891232 100644 --- a/core/tests/coretests/src/android/net/http/AbstractProxyTest.java +++ b/core/tests/coretests/src/android/net/http/AbstractProxyTest.java @@ -219,6 +219,23 @@ public abstract class AbstractProxyTest extends TestCase { assertEquals("GET /bar HTTP/1.1", recordedRequest.getRequestLine()); } + // http://b/5372438 + public void testRetryWithProxy() throws Exception { + server.enqueue(new MockResponse() + .setSocketPolicy(SocketPolicy.DISCONNECT_AT_START)); + server.play(); + + HttpClient httpProxyClient = newHttpClient(); + HttpGet request = new HttpGet("http://android.com/foo"); + ProxyConfig.REQUEST_PARAMETER.configure(server, httpProxyClient, request); + + try { + httpProxyClient.execute(request); + fail(); + } catch (IOException expected) { + } + } + enum ProxyConfig { PROXY_SYSTEM_PROPERTY() { @Override void configure(MockWebServer server, HttpClient client, HttpRequest request) { |