Methods Summary |
---|
private static org.apache.harmony.xnet.provider.jsse.SSLClientSessionCache | getCache(android.content.Context context, java.lang.String type)
setSslSessionCacheValue(context, type);
return SSLClientSessionCacheFactory.getCache(context);
|
private static void | setSslSessionCacheValue(android.content.Context context, java.lang.String value)
ContentResolver resolver = context.getContentResolver();
Settings.Gservices.putString(resolver, Settings.Gservices.SSL_SESSION_CACHE, value);
|
protected void | tearDown()
setSslSessionCacheValue(getContext(), "");
super.tearDown();
|
public void | testGetDbCache()
Context context = getContext();
SSLClientSessionCache cache = getCache(context, "db");
assertNotNull(cache);
assertTrue(cache instanceof DbSSLSessionCache);
|
public void | testGetFileCache()
Context context = getContext();
SSLClientSessionCache cache = getCache(context, "file");
assertNotNull(cache);
// yuck =)
assertEquals("org.apache.harmony.xnet.provider.jsse.FileClientSessionCache$Impl",
cache.getClass().getName());
|
public void | testGetNoCache()
Context context = getContext();
SSLClientSessionCache cache = getCache(context, "none");
assertNull(cache);
|