summaryrefslogtreecommitdiffstats
path: root/support/src/test/java/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add more debugging to the DigestTestKenny Root2015-10-271-0/+82
| | | | | | | | | | | | This test sometimes fails, but we don't know what the coefficient of variation is on the test results. Add this to the debug output so we can see if there is just some wild swing during testing. Also add a few rounds of warm-up as well. Bug: 24011092 Change-Id: Ic58f106f68eb93976e3f030e2f23e0156fe84be8 (cherry picked from commit 5fe1cd001f38fba460ac0ce5c15b85250e400f25)
* StrictJarFile: unittest for missing filesNick Kralevich2015-04-141-0/+0
| | | | | | | | Add a test to verify that we error out when the manifest declares a file which isn't present in the jar. Bug: 1162500 Change-Id: I3c6814c500d218036a5c0515e9f4f93e3f7a63d5
* am f0841451: Merge "Add SSLSocket tests which inspect emitted ClientHello ↵Alex Klyubin2015-01-233-0/+262
|\ | | | | | | | | | | | | fields." * commit 'f0841451c86cc9fa932dbc08271c8dc96da6ca38': Add SSLSocket tests which inspect emitted ClientHello fields.
| * Add SSLSocket tests which inspect emitted ClientHello fields.Alex Klyubin2015-01-223-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | This CL adds basic tests which capture the ClientHello emitted by SSLSocket and assert that the various fields are as expected. In particular, this CL adds tests for: * client protocol version, * cipher suite list, * compression methods, * server_name extension (SNI). Change-Id: I387c44363ad26f064885f9bfa28572da37871078
* | am cb43b294: Merge "Get rid of Support_Configuration.SpecialInetTestAddress ..."Narayan Kamath2014-12-051-359/+14
|\ \ | |/ | | | | | | * commit 'cb43b294c4fc686c38f7bdd7c81c07f66f8eb9ce': Get rid of Support_Configuration.SpecialInetTestAddress ...
| * Get rid of Support_Configuration.SpecialInetTestAddress ...Narayan Kamath2014-12-041-359/+14
| | | | | | | | | | | | | | ... aka. "www.google.com" and lots of other unused support configuration values. Change-Id: I07f07d656e77317a50ac54dda07f493437c15e58
| * Fix URLConnectionTest for devices without full internet access.Aaron Whyte2014-11-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am aa0045f5: am 939e6a1a: Fix URLConnectionTest for devices without full ↵Aaron Whyte2014-11-251-2/+0
|\ \ | | | | | | | | | | | | | | | | | | internet access. * commit 'aa0045f52b0c780794dcf85acffc66e188b3681c': Fix URLConnectionTest for devices without full internet access.
| * \ am 939e6a1a: Fix URLConnectionTest for devices without full internet access.Aaron Whyte2014-11-251-2/+0
| |\ \ | | | | | | | | | | | | | | | | * commit '939e6a1aceff448445928ad5d815479e84e84383': Fix URLConnectionTest for devices without full internet access.
| | * | Fix URLConnectionTest for devices without full internet access.Aaron Whyte2014-11-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 657afa6c: Merge "JarUtils: stop trying to build chain past candidates ↵Kenny Root2014-11-141-0/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | length" into lmp-mr1-dev * commit '657afa6cd8da378f30afe7b491e6d9de6c7c23fd': JarUtils: stop trying to build chain past candidates length
| * | JarUtils: stop trying to build chain past candidates lengthKenny Root2014-11-131-0/+0
| |/ | | | | | | | | | | | | | | | | If the certs in the PKCS#7 bag are in a loop, it will go on forever trying to build a chain. Instead just stop trying to build the chain when our chain exceeds the length of the candidates. Bug: 17972577 Change-Id: If4f92e3eeabe893612a618bab0068a0f8cf75ea9
* | Fix OldSocketTest#test_connectLjava_net_SocketAddressI.Elliott Hughes2014-11-112-16/+15
|/ | | | | | | Use the same address as StuckServer. Bug: 18143878 Change-Id: I3759776ed3a9d46175c4b987fa0c47b27033441d
* am 9a497b6d: Merge "Fix UnmodifiableEntrySet.toArray() ordering"Neil Fuller2014-07-172-161/+191
|\ | | | | | | | | * commit '9a497b6d3b95d774f28f0203409ce6ebf6cb1241': Fix UnmodifiableEntrySet.toArray() ordering
| * Fix UnmodifiableEntrySet.toArray() orderingNeil Fuller2014-06-232-161/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toArray() was returning entries in reverse order. toArray(T[]) was correct. Thanks to Chris Povirk for discovering. The fix is simple. Change includes additional tests to avoid regressions. Test & support code has been cleaned up a little to improve coverage and make it (slightly) less horrible. Bug: https://code.google.com/p/android/issues/detail?id=72073 Change-Id: I42ff90e0f592482289cd0cd9fdbdaabf0c17ad93
* | resolved conflicts for merge of 9687e46b to masterKenny Root2014-04-302-0/+0
|\ \ | | | | | | | | | Change-Id: Iaeaea9b44423257e8ccbcf631f40720d3035cecd
| * \ am 42db8377: am 15e6f173: am d353b8e2: am ddc91700: am 0a0379d4: am ↵Kenny Root2014-04-302-0/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 297a7de2: am 183efbb4: am 4629f94a: am e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-dev * commit '42db8377fdd20cdff6cac1994b25382551270a26': JarFile: make test chain 3 long
| | * \ am 15e6f173: am d353b8e2: am ddc91700: am 0a0379d4: am 297a7de2: am ↵Kenny Root2014-04-302-0/+0
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 183efbb4: am 4629f94a: am e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-dev * commit '15e6f173de11133e1a61090635e350303ac0481a': JarFile: make test chain 3 long
| | | * \ am ddc91700: am 0a0379d4: am 297a7de2: am 183efbb4: am 4629f94a: am ↵Kenny Root2014-04-302-0/+0
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-dev * commit 'ddc91700a5bed8e2b7214d6ca1e317929e378bc7': JarFile: make test chain 3 long
| | | | * \ am 297a7de2: am 183efbb4: am 4629f94a: am e0350a80: am afd7d947: Merge ↵Kenny Root2014-04-302-0/+0
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "JarFile: make test chain 3 long" into jb-dev * commit '297a7de2a15cae179d6713182641bddfdf89f397': JarFile: make test chain 3 long
| | | | | * \ am e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-devKenny Root2014-04-302-0/+0
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0350a80cbcce86445c29c043ab5be3b46e28181': JarFile: make test chain 3 long
| | | | | | * \ am afd7d947: Merge "JarFile: make test chain 3 long" into jb-devKenny Root2014-04-302-0/+0
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'afd7d9472e5d850a8e1a6d02abaaa9f94579a77f': JarFile: make test chain 3 long
| | | | | | | * | JarFile: make test chain 3 longKenny Root2014-04-292-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I761f0a652a8502e28a4f9bb15ac9782d3ad42355
* | | | | | | | | am 3eb545e3: am 85fa4285: Merge "Groundwork towards making the Libcore.os ↵Elliott Hughes2014-04-251-2/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality public." * commit '3eb545e382a12565ed8779632015d736d6f5c32c': Groundwork towards making the Libcore.os functionality public.
| * | | | | | | | am 85fa4285: Merge "Groundwork towards making the Libcore.os functionality ↵Elliott Hughes2014-04-241-2/+2
| |\ \ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | public." * commit '85fa4285b3679120ee2d3dc5750a1e620de0449d': Groundwork towards making the Libcore.os functionality public.
| | * | | | | | | Groundwork towards making the Libcore.os functionality public.Elliott Hughes2014-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
* | | | | | | | | JarFile: Add tests for ambiguous chainsKenny Root2014-04-221-0/+0
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some chains using the old code will have incorrect splits between CodeSigner paths. Bug: 13678484 Change-Id: Ia77b7cbcde9394e0d48a6f082bbd1cdfd880d74b
* | | | | | | | am 0779dcac: am 008fbfd0: am a317f758: am ced71a50: am 99a25a47: am ↵Kenny Root2014-04-222-0/+0
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | 5321ebb7: am 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures * commit '0779dcac1bdc0d6d02ef6e4843a312aa03081f03': Tests for API to check certificate chain signatures
| * | | | | | am 008fbfd0: am a317f758: am ced71a50: am 99a25a47: am 5321ebb7: am ↵Kenny Root2014-04-222-0/+0
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures * commit '008fbfd0ff37cb88047825d56d2116d0f62b69a5': Tests for API to check certificate chain signatures
| | * | | | | am ced71a50: am 99a25a47: am 5321ebb7: am 6d949cbf: am 951aa4f4: am ↵Kenny Root2014-04-222-0/+0
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures * commit 'ced71a503c6cf79b0cee407123d9df94bf988e0b': Tests for API to check certificate chain signatures
| | | * | | | am 5321ebb7: am 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for ↵Kenny Root2014-04-222-0/+0
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API to check certificate chain signatures * commit '5321ebb789eb77b5fc4c6e2e5d2fcaba242d275d': Tests for API to check certificate chain signatures
| | | | * | | am 531968cf: am cb11b9ff: Tests for API to check certificate chain signaturesKenny Root2014-04-222-0/+0
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | * commit '531968cf367586f38167ced0415f89fe330ee75f': Tests for API to check certificate chain signatures
| | | | | * | am cb11b9ff: Tests for API to check certificate chain signaturesKenny Root2014-04-222-0/+0
| | | | | |\ \ | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | * commit 'cb11b9fff2a1af8bb4fcad18986003a7f59189c6': Tests for API to check certificate chain signatures
| | | | | | * Tests for API to check certificate chain signaturesKenny Root2014-04-182-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 13678484 Change-Id: Ibc14b3e9b1159c7b0b130d01fac933f71a99ad96
| | | | | | * Fix URLConnectionTest#test_getAllowUserInteraction.Elliott Hughes2012-07-242-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | * | | Fix ConcurrentCloseTest flakiness.Elliott Hughes2012-10-161-25/+35
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't rely on consuming all the listen(2) backlog. For the tests we've seen fail because they sometimes connect rather than time out, switch to an unroutable address. (cherry-pick of babccbf9e429c4c78aca24c205825ceaaf7d3f37.) Bug: 6971145 Change-Id: Ibfa412ff1ad7da7e63842d0162cc67a706e2b27e
| * | | | | DO NOT MERGE Fix another set of file related tests.Narayan Kamath2014-04-071-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of Support_PlatformFile, use File.createTempFile instead. - Replace numerous uses of "user.dir" / "user.home" etc. with File.createTempFile - Replace calls to Process / chmod with Libcore.os.chmod. The calls wouldn't have worked anyway, since chmod on android doesn't understand the incremental (+w, -x) syntax. (cherry picked from commit 2b7c83942a5e28c53698232182193d5118028e6c) Bug: 13763685 Bug: 13763900 Change-Id: Ic6944568bbee6a548da6dcb4364b882636f2959f
* | | | | | Addition of 1.7 methods to URLConnection.Neil Fuller2014-02-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Fix another set of file related tests.Narayan Kamath2014-02-191-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of Support_PlatformFile, use File.createTempFile instead. - Replace numerous uses of "user.dir" / "user.home" etc. with File.createTempFile - Replace calls to Process / chmod with Libcore.os.chmod. The calls wouldn't have worked anyway, since chmod on android doesn't understand the incremental (+w, -x) syntax. Change-Id: Ic6944568bbee6a548da6dcb4364b882636f2959f
* | | | | | Delete unused test resources.Narayan Kamath2014-02-122-0/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | These resources were used only by DalvikExecTest. Change-Id: Icb063fcf96593eeb3c6d9392214b3bc67305af53
* | | | | X509CertificateTest: add test for negative serialKenny Root2014-01-2842-83/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update cert tests to save the private keys and also change the main certificate to a negative serial to exercise more corner cases. Change-Id: Ia59eece8ced0988b140ebf2e932b54298047f32d
* | | | | Delete Support_PortManager & OldDatagramSocketTestNarayan Kamath2014-01-061-105/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support_PortManager didn't really work, so rewrite all tests that use it. Also, dedup OldDatagramSocketTest with the harmony DatagramSocketTest. Fix various broken test cases and terribly written tests. bug: 11689863 Change-Id: I4efb9e02eb88517273fff50a0dec1d0262feafb2
* | | | | Merge "Import resources, fix JarURLConnectionTest."Narayan Kamath2013-11-151-0/+0
|\ \ \ \ \
| * | | | | Import resources, fix JarURLConnectionTest.Narayan Kamath2013-11-141-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case with the escaped URL still fails. Change-Id: Iae3a58fea800d8b981cb09474d1fa77b7c361e4e
* | | | | | Add serialization golden files, fix tests.Narayan Kamath2013-11-131-40/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moves a few golden files from luni/ to harmony-tests/ - Delete dead code in SerializationTester - Fix a bug in SerializationTest (not sure how this ever worked for resources with "." in their name) Change-Id: Ia5b1376f4ada9b9c706a266ae077debeea5b1f29
* | | | | Add untracked harmony tests.Narayan Kamath2013-11-1318-0/+737
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been deduped against : libcore/luni/src/test/java/org/apache/harmony/luni/tests libcore/luni/src/test/java/tests/api/ libcore/harmony-tests/src/test/java/tests/api This is a minimal change that builds the entire test suite. Many tests don't pass yet, they will be fixed in follow ups. Notable tests that haven't been moved: - ExcludedProxyTest: Might make requests to (now defunct) external servers. All of this code is tested in okhttp. - URLClassLoaderTest: Has a dependency on jetty, tested in okhttp. Notable test cases that haven't been moved: - URLTest: overlap with okhttp, might make requests to external servers. - ServerSocketTest#test_init: Uses Support_execJava, which we don't support yet. Isn't testing anything useful. - FileTest#testDeleteOnExist: Uses Support_execJava which we don't support yet. This is a useful test and we must ressurect it if at all possible. bug: 11650799 Change-Id: Ib277eb0bad465ea72b090168490a1a633611b3f3
* | | | | JarUtils: try using the DigestEncryptionAlgorithmKenny Root2013-10-091-0/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code tried getting an instance of the DigestAlgorithm by itself as a Signature type. This appears meant to be the DigestEncryptionAlgorithm by itself. Algorithms such as SHA256withECDSA have their own OID. Change-Id: I9384127bb026c8a5d3956095a9880427ead366b4
* | | | If libcore wants ASCII casing, it needs to ask for it like everyone else.Elliott Hughes2013-08-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: I597b2ac940f17b5b2bc176e390dc4b63fe0a4e72
* | | | Remove the isLocaleAvailable hacks.Elliott Hughes2013-07-232-66/+18
| | | | | | | | | | | | | | | | Change-Id: I17596301630f6c8d98c4415fe358f4fffb47b2d4
* | | | JarFile: finish support for authenticated attributesKenny Root2013-07-011-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an unfinished code path to use Authenticated Attributes to verify JAR files. This finishes it up and allows PKCS#7 signatures with that field instead of a direct digest on the encapsulated data. The description of Authenticated Attributes can be found in RFC 3852 section 9 referred to as "authAttrs." Bug: 9625223 Change-Id: Ia2c8fc09d39fbb67c1bdcdfe087f185471dcedd4