summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-01-17 13:05:22 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-17 13:05:22 -0800
commita33dd09b5cc62b50afc3a15cd8b67b5344756f1e (patch)
treeb168e2f3523ada0241de8c17888954e5bfc5d714 /core/tests
parentd9bc2b5e9ef462c9fa4ac821e9d8d27ecff1dfaf (diff)
parentd6c54d97867edd566700c535f3edf57dd4396350 (diff)
downloadframeworks_base-a33dd09b5cc62b50afc3a15cd8b67b5344756f1e.zip
frameworks_base-a33dd09b5cc62b50afc3a15cd8b67b5344756f1e.tar.gz
frameworks_base-a33dd09b5cc62b50afc3a15cd8b67b5344756f1e.tar.bz2
am d6c54d97: Merge "Revert "Add the {get,set}PackageObbPaths calls to API"" into honeycomb
* commit 'd6c54d97867edd566700c535f3edf57dd4396350': Revert "Add the {get,set}PackageObbPaths calls to API"
Diffstat (limited to 'core/tests')
-rwxr-xr-xcore/tests/coretests/src/android/content/pm/PackageManagerTests.java159
1 files changed, 0 insertions, 159 deletions
diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
index 2126529..0e65df5 100755
--- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
@@ -48,7 +48,6 @@ import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Arrays;
public class PackageManagerTests extends AndroidTestCase {
private static final boolean localLOGV = true;
@@ -3106,164 +3105,6 @@ public class PackageManagerTests extends AndroidTestCase {
PackageInfo.INSTALL_LOCATION_UNSPECIFIED);
}
- @LargeTest
- public void testPackageObbPaths_Nonexistent() {
- try {
- final PackageManager pm = getPm();
-
- // Invalid Java package name.
- pm.getPackageObbPaths("=non-existent");
-
- fail("Should not be able to get package OBB paths for non-existent package");
- } catch (IllegalArgumentException e) {
- // pass
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Initial() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- assertEquals("Initial obb paths should be null",
- null, pm.getPackageObbPaths(ip.pkg.packageName));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Null() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- pm.setPackageObbPaths(ip.pkg.packageName, null);
-
- assertEquals("Returned paths should be null",
- null, pm.getPackageObbPaths(ip.pkg.packageName));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Empty() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- final String[] paths = new String[0];
-
- pm.setPackageObbPaths(ip.pkg.packageName, paths);
-
- assertEquals("Empty list should be interpreted as null",
- null, pm.getPackageObbPaths(ip.pkg.packageName));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Single() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- final String[] paths = new String[] {
- "/example/test",
- };
-
- pm.setPackageObbPaths(ip.pkg.packageName, paths.clone());
-
- assertTrue("Previously set paths should be the same as the returned paths.",
- Arrays.equals(paths, pm.getPackageObbPaths(ip.pkg.packageName)));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Multiple() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- final String[] paths = new String[] {
- "/example/test1",
- "/example/test2",
- };
-
- pm.setPackageObbPaths(ip.pkg.packageName, paths.clone());
-
- assertTrue("Previously set paths should be the same as the returned paths.",
- Arrays.equals(paths, pm.getPackageObbPaths(ip.pkg.packageName)));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_Twice() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- final String[] paths = new String[] {
- "/example/test1",
- "/example/test2",
- };
-
- pm.setPackageObbPaths(ip.pkg.packageName, paths.clone());
-
- assertTrue("Previously set paths should be the same as the returned paths.",
- Arrays.equals(paths, pm.getPackageObbPaths(ip.pkg.packageName)));
-
- paths[0] = "/example/test3";
- pm.setPackageObbPaths(ip.pkg.packageName, paths.clone());
-
- assertTrue("Previously set paths should be the same as the returned paths.",
- Arrays.equals(paths, pm.getPackageObbPaths(ip.pkg.packageName)));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
- @LargeTest
- public void testPackageObbPaths_ReplacePackage() {
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_INTERNAL, false);
-
- try {
- final PackageManager pm = getPm();
-
- final String[] paths = new String[] {
- "/example/test1",
- "/example/test2",
- };
-
- pm.setPackageObbPaths(ip.pkg.packageName, paths.clone());
-
- Log.i(TAG, "Creating replaceReceiver");
- final GenericReceiver receiver = new ReplaceReceiver(ip.pkg.packageName);
-
- final int flags = PackageManager.INSTALL_REPLACE_EXISTING;
- invokeInstallPackage(ip.packageURI, flags, receiver);
- assertInstall(ip.pkg, flags, ip.pkg.installLocation);
-
- assertTrue("Previously set paths should be the same as the returned paths.",
- Arrays.equals(paths, pm.getPackageObbPaths(ip.pkg.packageName)));
- } finally {
- cleanUpInstall(ip);
- }
- }
-
/*---------- Recommended install location tests ----*/
/*
* TODO's