summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2012-05-17 13:46:17 -0400
committerJesse Wilson <jessewilson@google.com>2012-05-17 13:46:17 -0400
commit2108ead7f125536874d6de6ca1c0c4cffbf61b44 (patch)
treed14c0de142808245338f49f99db49b38dad2347d /core/tests
parent855f5407c74694ebd924b36738ecc79241c4becf (diff)
downloadframeworks_base-2108ead7f125536874d6de6ca1c0c4cffbf61b44.zip
frameworks_base-2108ead7f125536874d6de6ca1c0c4cffbf61b44.tar.gz
frameworks_base-2108ead7f125536874d6de6ca1c0c4cffbf61b44.tar.bz2
Change NPN to forbid empty lists of protocols.
Bug: http://b/6438423 Change-Id: Ie89220e5bc219396c15dbe1feaa2f74fa1b243eb
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/coretests/src/android/net/SSLTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/tests/coretests/src/android/net/SSLTest.java b/core/tests/coretests/src/android/net/SSLTest.java
index c573498..27b699d 100644
--- a/core/tests/coretests/src/android/net/SSLTest.java
+++ b/core/tests/coretests/src/android/net/SSLTest.java
@@ -59,17 +59,20 @@ public class SSLTest extends TestCase {
new byte[] { 'h', 't', 't', 'p', '/', '1', '.', '1' })));
}
- public void testStringsToNpnBytesEmptyByteArray() {
+ public void testStringsToNpnBytesEmptyArray() {
try {
- SSLCertificateSocketFactory.toNpnProtocolsList(new byte[0]);
+ SSLCertificateSocketFactory.toNpnProtocolsList();
fail();
} catch (IllegalArgumentException expected) {
}
}
- public void testStringsToNpnBytesEmptyArray() {
- byte[] expected = {};
- assertTrue(Arrays.equals(expected, SSLCertificateSocketFactory.toNpnProtocolsList()));
+ public void testStringsToNpnBytesEmptyByteArray() {
+ try {
+ SSLCertificateSocketFactory.toNpnProtocolsList(new byte[0]);
+ fail();
+ } catch (IllegalArgumentException expected) {
+ }
}
public void testStringsToNpnBytesOversizedInput() {