summaryrefslogtreecommitdiffstats
path: root/tests/CoreTests
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2010-09-14 11:17:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-14 11:17:22 -0700
commit0535d8577fb2a3687428f462c591ae3220e1f773 (patch)
tree5509b68682e87d964d3f3d611af96f3be599eeb4 /tests/CoreTests
parente92fdd261eed516a8821675ceca971d1c90d772b (diff)
parent94126238427f04ecb86fe6832113afb2f04e89b5 (diff)
downloadframeworks_base-0535d8577fb2a3687428f462c591ae3220e1f773.zip
frameworks_base-0535d8577fb2a3687428f462c591ae3220e1f773.tar.gz
frameworks_base-0535d8577fb2a3687428f462c591ae3220e1f773.tar.bz2
am 94126238: Merge "Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments" into gingerbread
Merge commit '94126238427f04ecb86fe6832113afb2f04e89b5' into gingerbread-plus-aosp * commit '94126238427f04ecb86fe6832113afb2f04e89b5': Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments
Diffstat (limited to 'tests/CoreTests')
-rw-r--r--tests/CoreTests/android/core/SSLPerformanceTest.java12
-rw-r--r--tests/CoreTests/android/core/SSLSocketTest.java15
2 files changed, 16 insertions, 11 deletions
diff --git a/tests/CoreTests/android/core/SSLPerformanceTest.java b/tests/CoreTests/android/core/SSLPerformanceTest.java
index fd87e89..5b5be0a 100644
--- a/tests/CoreTests/android/core/SSLPerformanceTest.java
+++ b/tests/CoreTests/android/core/SSLPerformanceTest.java
@@ -211,17 +211,17 @@ public class SSLPerformanceTest extends AndroidTestCase {
deleteDirectory();
OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
- sslContext.engineInit(null, null, null,
- FileClientSessionCache.usingDirectory(getCacheDirectory()),
- null);
+ sslContext.engineInit(null, null, null);
+ sslContext.engineGetClientSessionContext().setPersistentCache(
+ FileClientSessionCache.usingDirectory(getCacheDirectory()));
// Make sure www.google.com is in the cache.
getVerisignDotCom(sslContext);
// Re-initialize so we hit the file cache.
- sslContext.engineInit(null, null, null,
- FileClientSessionCache.usingDirectory(getCacheDirectory()),
- null);
+ sslContext.engineInit(null, null, null);
+ sslContext.engineGetClientSessionContext().setPersistentCache(
+ FileClientSessionCache.usingDirectory(getCacheDirectory()));
Stopwatch stopwatch = new Stopwatch();
diff --git a/tests/CoreTests/android/core/SSLSocketTest.java b/tests/CoreTests/android/core/SSLSocketTest.java
index 021df80..03905e1 100644
--- a/tests/CoreTests/android/core/SSLSocketTest.java
+++ b/tests/CoreTests/android/core/SSLSocketTest.java
@@ -911,7 +911,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 2.
FakeClientSessionCache fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
SSLSocketFactory socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(2);
makeRequests(socketFactory);
@@ -933,7 +934,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 3.
fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(3);
makeRequests(socketFactory);
@@ -952,7 +954,8 @@ public class SSLSocketTest extends TestCase {
// Cache size = 4.
fakeCache = new FakeClientSessionCache();
- context.engineInit(null, null, null, fakeCache, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(fakeCache);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(4);
makeRequests(socketFactory);
@@ -1010,7 +1013,8 @@ public class SSLSocketTest extends TestCase {
try {
ClientSessionCacheProxy cacheProxy
= new ClientSessionCacheProxy(fileCache);
- context.engineInit(null, null, null, cacheProxy, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(cacheProxy);
SSLSocketFactory socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(1);
makeRequests(socketFactory);
@@ -1033,7 +1037,8 @@ public class SSLSocketTest extends TestCase {
// Try again now that file-based cache is populated.
fileCache = FileClientSessionCache.usingDirectory(cacheDir);
cacheProxy = new ClientSessionCacheProxy(fileCache);
- context.engineInit(null, null, null, cacheProxy, null);
+ context.engineInit(null, null, null);
+ context.engineGetClientSessionContext().setPersistentCache(cacheProxy);
socketFactory = context.engineGetSocketFactory();
context.engineGetClientSessionContext().setSessionCacheSize(1);
makeRequests(socketFactory);