History log of /libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
Revision Date Author Comments
9d83fcf221b1b13f6fe0f0e977ace87fe14a00a3 09-Dec-2015 Narayan Kamath <narayan@google.com> Fix URLConnection test cases.

- Have Support_TestWebServer send down an explicit timezone so
there's no ambiguity in the parse. HttpURLConnection coerces all
timezones into GMT.
- getFileNameMap always constructs a new FileNameMap if the default
is null. This implies that setFileNameMap(null) now sets things back
to the default.
- getRequestProperty / setRequestProperty on URLConnection subclasses
that don't override those methods behave as if they were backed by
a map.

bug: 26023804
Change-Id: I75abd114f0dcbd8afbfa1786b7d5142e0b071bed
d8ce757d85ba665fa61d35e25e03c4de16c0f4c6 22-Nov-2014 Aaron Whyte <awhyte@google.com> Fix URLConnectionTest for devices without full internet access.

This removes two bad tests that are covered elsewhere, using
mocks.

test_getContentEncoding() was hitting http://www.amazon.com, to see
if a URLConnection getter was working. That getter is now tested in
libcore/luni/src/test/java/libcore/java/net/URLConnectionTest.java,
in testClientConfiguredGzipContentEncoding().

test_getLastModified() was hitting
http://www.php.net/manual/en/function.explode.php, to see if
getHeaderFieldDate was working for Last-Modified. That getter is
better tested in test_getHeaderFieldDateLjava_lang_StringJ(), in the
same file.

Bug:18480776

(cherry picked from commit 939e6a1aceff448445928ad5d815479e84e84383)

Change-Id: Ia01fd59809683317271017364179e1843c149e65
939e6a1aceff448445928ad5d815479e84e84383 22-Nov-2014 Aaron Whyte <awhyte@google.com> Fix URLConnectionTest for devices without full internet access.

This removes two bad tests that are covered elsewhere, using
mocks.

test_getContentEncoding() was hitting http://www.amazon.com, to see
if a URLConnection getter was working. That getter is now tested in
libcore/luni/src/test/java/libcore/java/net/URLConnectionTest.java,
in testClientConfiguredGzipContentEncoding().

test_getLastModified() was hitting
http://www.php.net/manual/en/function.explode.php, to see if
getHeaderFieldDate was working for Last-Modified. That getter is
better tested in test_getHeaderFieldDateLjava_lang_StringJ(), in the
same file.

Bug:18480776
Change-Id: I21ffc5c9c72eb4379478c11687d197dab176a851
d45744281bc05a21aec647fbd2cccdaedf9e1ff1 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

(cherry-pick of f39b5ca3c6378c3c36c63889577004b9693ea9c6.)

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
f39b5ca3c6378c3c36c63889577004b9693ea9c6 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
6cc167354969859a27919a8d7f546cb4bd74d51e 27-Feb-2014 Brett Chabot <brettchabot@google.com> Deprecate use of BrokenTest and SideEffect

Use expectations files instead.

(cherry picked from commit 6a6b612286976cc185c898803fe51e4e062bd9eb)

Bug: 12924356
Change-Id: I9b7e71805a80176c873cffe46bed65f81de1903d
6a6b612286976cc185c898803fe51e4e062bd9eb 27-Feb-2014 Brett Chabot <brettchabot@google.com> Deprecate use of BrokenTest and SideEffect

Use expectations files instead.

Bug: 12924356

Change-Id: I0ea7917384adf7849404b6da5b7704e6f0c0c1c7
2587ef91ba693d73e97704e8163c050b286e7330 14-Feb-2014 Neil Fuller <nfuller@google.com> Addition of 1.7 methods to URLConnection.

URLConnection.getHeaderLong() and
URLConnection.getContentLengthLong().
These methods are required by okhttp.

Changed JarURLConnectionImpl.getContentLength() to return -1
when the size of an entry cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Changed FileURLConnection.getContentLength() to return -1
when the size of the file cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Change-Id: Ib43e68a2536c2602b4c7ee0cda68fa1f90045f57
8ebfe8fb75f796ae77162787e8a44f5e03b847e2 04-Feb-2014 Narayan Kamath <narayan@google.com> Delete test that depends on an external server.

This is correctly tested in libcore.java.net.URLConnectionTest
so there's no need for a badly written duplicate test.

bug: 12864018

(cherry picked from commit 4dd526880a8bf351508fe0d4b2b5cabc3d107527)

Change-Id: I0016298b8970bb937900a8e39aca2f4f252a7a1c
4dd526880a8bf351508fe0d4b2b5cabc3d107527 04-Feb-2014 Narayan Kamath <narayan@google.com> Delete test that depends on an external server.

This is correctly tested in libcore.java.net.URLConnectionTest
so there's no need for a badly written duplicate test.

bug: 12864018
Change-Id: I66079e04980b1fd33b0121de88d75f9843fb1f04
d3298cd1b4bc69183e96e3cf8fd247e1596b7e07 24-Jul-2012 Elliott Hughes <enh@google.com> Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

Bug: http://code.google.com/p/android/issues/detail?id=35400

(cherry-picked from 3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3.)

Conflicts:

luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java

Change-Id: I4959fefa130290236533be72cce7c57b9ea1e296
3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3 24-Jul-2012 Elliott Hughes <enh@google.com> Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

Bug: http://code.google.com/p/android/issues/detail?id=35400
Change-Id: I28e78b7375ee554b3afe98e5249676e8bbbbec0e
903b3f5b6a6e524cb4d88b83ea32e7c355392271 19-Jul-2012 Elliott Hughes <enh@google.com> Start removing Support_PortManager.

A bad idea, badly implemented.

Bug: 2441548
Change-Id: I34c990f6fd9d746771846f186a7ab3ab59e78a9f
686dd6f676dc348ac260f54e544cf8d813df64a9 07-Jun-2011 Elliott Hughes <enh@google.com> Remove dead tests.

Change-Id: Ife89885ea95de3bb2617172b95cdfd46d586a644
19c77c6a6da8cea7327ccbb741963ac76d3fae53 05-May-2011 Jesse Wilson <jessewilson@google.com> Address some test failures in the HTTP client.

Change-Id: I44783aa7cadd51ed6b9e7aabc94144c60252c095
http://b/3180373
229e34b182b98e1dba15d3dc6341954986ae2b7a 03-Mar-2011 Brian Carlstrom <bdc@google.com> Removing use of @tests and @Test.* annotations

Change-Id: I89243efdeebe22543c45a2166b634f40c3e78cf8
aec2ed4b266b75aaab59c23ca71e355a9336b074 21-Oct-2010 Jesse Wilson <jessewilson@google.com> Remove tests for SecurityManager.

Many of the changes are to org.apache.harmony.* tests that we've copied
from upstream. We'll remove these duplicated tests completely once we
have the upstream Harmony tests properly integrated into CTS.

Change-Id: Idd6cfbeba5345156b207b9433928ee37b662c395
http://b/3102252
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
398cf32a303a3b2a878a48cbae54be5ac23f7ecd 07-Jan-2010 Jesse Wilson <jessewilson@google.com> Fixing our default HTTP Accept header to be spec-compliant.

See bug http://code.google.com/p/android/issues/detail?id=5843

Also fixing a bug in the test webserver, where we weren't formatting
the headers properly. I'm dumbfounded how the tests passed previously;
although I fear that omitting the @TestTargetNew annotation might mean
that they weren't being run. I'll investigate that in a follow up.
4fefecee9d4a5d2a4510f516b4015607b19e8d09 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
70d6a4304144a0d40966eb93b28ce6430e24af79 05-Nov-2009 Brett Chabot <brettchabot@android.com> DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.
adad03692b86958bbc1da598c260b5e322f4d8ce 12-Sep-2009 Jesse Wilson <jessewilson@google.com> Fixing the delimiter for the HTTP "Accept" header to be well-formed.

See bug 2107897.
f5597e626ecf7949d249dea08c1a2964d890ec11 25-Jul-2009 Jesse Wilson <jessewilson@google.com> Integrate luni module (but not tests) to Harmony r772995.

Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
5f5efac11611ee8d68d774ca94b49e540de44d21 11-May-2009 Jorg Pleumann <nobody@android.com> AI 148670: More tests that need to be marked broken, since
they behave differently in CTS and plain VM.
Hopefully the last ones...
BUG=1285921

Automated import of CL 148670
5b4db481fd2dd84cf1f54136b0c6cbb0fbc72b03 21-Apr-2009 Urs Grob <> AI 147126: am: CL 147121 Fixes for tests in the luni module.
There are still some tests that are failing in the cts host. This CL will fix most of them in the luni module.
Original author: ursg
Merged from: //branches/cupcake/...

Automated import of CL 147126
b90da8218274400c8710211d467ed28f23bc28ba 21-Apr-2009 Urs Grob <> AI 147127: am: CL 147126 am: CL 147121 Fixes for tests in the luni module.
There are still some tests that are failing in the cts host. This CL will fix most of them in the luni module.
Original author: ursg
Merged from: //branches/cupcake/...
Original author: android-build

Automated import of CL 147127
214a4e01cfb8ac07474c128b9431b19b7ed1b99b 21-Apr-2009 Urs Grob <> AI 147121: Fixes for tests in the luni module.
There are still some tests that are failing in the cts host. This CL will fix most of them in the luni module.
BUG=1285921

Automated import of CL 147121
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
b7926325a1c1a370c84c81db80372f59af240a53 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
a0881d052ee72e3f7e773374e9b1aa75fbd6be4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution