diff options
author | Neil Fuller <nfuller@google.com> | 2014-03-06 13:11:50 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-03-10 09:36:53 +0000 |
commit | ac03ce489cbe22905ee525e005d67df0a74ff8de (patch) | |
tree | add990d8b3c8d10aeb6ad012c15ac97211883350 /luni | |
parent | 883084f7eac26f1fdd79858c8bd2e68600011b0b (diff) | |
download | libcore-ac03ce489cbe22905ee525e005d67df0a74ff8de.zip libcore-ac03ce489cbe22905ee525e005d67df0a74ff8de.tar.gz libcore-ac03ce489cbe22905ee525e005d67df0a74ff8de.tar.bz2 |
Relax testUrlWithSpaceInHostViaHttpProxy test
This is for the new OkHttp version. The older
version detected the URL is invalid on Android. The newer
version does not. The correct behavior is undefined and
this test was added to prove that NullPointerException is
not thrown, which it will still test for.
Change-Id: Ibbaaf006982eba9de2d3751c6ee302dd28f7786f
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/libcore/java/net/URLConnectionTest.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java index 906dbe0..b40976e 100644 --- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java +++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java @@ -2198,16 +2198,15 @@ public final class URLConnectionTest extends TestCase { } } + // http://code.google.com/p/android/issues/detail?id=16895 public void testUrlWithSpaceInHostViaHttpProxy() throws Exception { server.enqueue(new MockResponse()); server.play(); URLConnection urlConnection = new URL("http://and roid.com/") .openConnection(server.toProxyAddress()); - try { - urlConnection.getInputStream(); - fail(); // the RI makes a bogus proxy request for "GET http://and roid.com/ HTTP/1.1" - } catch (UnknownHostException expected) { - } + + // This test is to check that a NullPointerException is not thrown. + urlConnection.getInputStream(); } public void testSslFallback() throws Exception { |