summaryrefslogtreecommitdiffstats
path: root/security/src
diff options
context:
space:
mode:
Diffstat (limited to 'security/src')
-rw-r--r--security/src/test/java/tests/api/javax/security/cert/X509CertificateTest.java13
-rw-r--r--security/src/test/java/tests/security/permissions/JavaLangClassLoaderTest.java10
2 files changed, 7 insertions, 16 deletions
diff --git a/security/src/test/java/tests/api/javax/security/cert/X509CertificateTest.java b/security/src/test/java/tests/api/javax/security/cert/X509CertificateTest.java
index e12842a..4af8dc8 100644
--- a/security/src/test/java/tests/api/javax/security/cert/X509CertificateTest.java
+++ b/security/src/test/java/tests/api/javax/security/cert/X509CertificateTest.java
@@ -177,18 +177,6 @@ public class X509CertificateTest extends TestCase {
}
}
- @Override
- protected void tearDown() throws Exception {
- if (myProvider != null) {
-// Security.removeProvider(myProvider.getName());
- }
- if (mySSProvider != null) {
-// Security.removeProvider(mySSProvider.getName());
- }
-
- super.tearDown();
- }
-
/**
* X509Certificate() constructor testing.
* @tests {@link X509Certificate#X509Certificate() }
@@ -875,6 +863,7 @@ public class X509CertificateTest extends TestCase {
method = "verify",
args = {java.security.PublicKey.class, java.lang.String.class}
)
+ @SideEffect("Destroys MD5 provider, hurts succeeding tests")
public void testVerifyPublicKeyString() throws InvalidKeyException,
java.security.cert.CertificateException, NoSuchAlgorithmException,
NoSuchProviderException, SignatureException, IOException,
diff --git a/security/src/test/java/tests/security/permissions/JavaLangClassLoaderTest.java b/security/src/test/java/tests/security/permissions/JavaLangClassLoaderTest.java
index b21bece..66302ed 100644
--- a/security/src/test/java/tests/security/permissions/JavaLangClassLoaderTest.java
+++ b/security/src/test/java/tests/security/permissions/JavaLangClassLoaderTest.java
@@ -23,15 +23,16 @@ import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
import dalvik.annotation.TestTargetClass;
import dalvik.system.DexFile;
-import dalvik.system.PathClassLoader;
import junit.framework.TestCase;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.net.URL;
import java.security.Permission;
+import tests.support.Support_ClassLoader;
import tests.support.resource.Support_Resources;
/*
@@ -118,7 +119,7 @@ public class JavaLangClassLoaderTest extends TestCase {
args = {}
)
})
- @AndroidOnly("uses PathClassLoader and DexFile")
+ @AndroidOnly("uses DexFile")
@BrokenTest("Endless loop in ClassLoader. Actually a known failure.")
public void test_getSystemClassLoader () throws IOException,
IllegalAccessException, InstantiationException {
@@ -129,7 +130,8 @@ public class JavaLangClassLoaderTest extends TestCase {
}
@Override
public void checkPermission(Permission permission){
- if(permission instanceof RuntimePermission && "getClassLoader".equals(permission.getName())){
+ if(permission instanceof RuntimePermission &&
+ "getClassLoader".equals(permission.getName())){
called = true;
}
}
@@ -166,7 +168,7 @@ public class JavaLangClassLoaderTest extends TestCase {
InputStream is = Support_Resources.getResourceStream("testdex.jar");
Support_Resources.copyLocalFileto(tempFile, is);
DexFile dexfile = new DexFile(tempFile);
- PathClassLoader pcl = new PathClassLoader("",
+ ClassLoader pcl = Support_ClassLoader.getInstance(new URL(""),
ClassLoader.getSystemClassLoader());
Class<?> testClass = dexfile.loadClass(