summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-12-15 14:19:57 -0800
committerVasu Nori <vnori@google.com>2010-12-15 14:19:57 -0800
commita1cbbb41a7423c6f87b2f461075aad4c665f19dd (patch)
tree7774933fa5e51d44022d4cd67c5f7357df12bd4d /tests/src/com/android
parent9aadb4b3f2b3c914166ebfae8851fbecaf536f4f (diff)
downloadandroid_packages_providers_DownloadProvider-a1cbbb41a7423c6f87b2f461075aad4c665f19dd.tar.gz
android_packages_providers_DownloadProvider-a1cbbb41a7423c6f87b2f461075aad4c665f19dd.tar.bz2
android_packages_providers_DownloadProvider-a1cbbb41a7423c6f87b2f461075aad4c665f19dd.zip
fix downloadmanager tests. again.
Change-Id: I61c6020017a300076ab2a5901ab87eabb1e0d0b7
Diffstat (limited to 'tests/src/com/android')
-rw-r--r--tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java17
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java6
2 files changed, 7 insertions, 16 deletions
diff --git a/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java b/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java
index a5bae8ba..d7f47870 100644
--- a/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java
@@ -65,22 +65,7 @@ public class DownloadManagerFunctionalTest extends AbstractDownloadManagerFuncti
Integer.toString(Downloads.Impl.DESTINATION_CACHE_PARTITION));
runUntilStatus(downloadUri, Downloads.Impl.STATUS_SUCCESS);
assertEquals(FILE_CONTENT, getDownloadContents(downloadUri));
- assertStartsWith(Environment.getDownloadCacheDirectory().getPath(),
- getDownloadFilename(downloadUri));
- }
-
- /**
- * downloading to system cache should succeed because this tests package has
- * the permission android.permission.ACCESS_CACHE_FILESYSTEM
- */
- public void testDownloadToSystemCache() throws Exception {
- enqueueResponse(HTTP_OK, FILE_CONTENT);
- Uri downloadUri = requestDownload("/path");
- updateDownload(downloadUri, Downloads.Impl.COLUMN_DESTINATION,
- Integer.toString(Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION));
- runUntilStatus(downloadUri, Downloads.Impl.STATUS_SUCCESS);
- assertEquals(FILE_CONTENT, getDownloadContents(downloadUri));
- assertStartsWith(Environment.getDownloadCacheDirectory().getPath(),
+ assertStartsWith(Helpers.getDownloadsDataDirectory(getContext()).getAbsolutePath(),
getDownloadFilename(downloadUri));
}
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index 5d149308..96fbaabd 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -25,6 +25,8 @@ import android.net.Uri;
import android.os.Environment;
import android.provider.Downloads;
import android.test.suitebuilder.annotation.LargeTest;
+import android.test.suitebuilder.annotation.Suppress;
+
import tests.http.MockResponse;
import tests.http.RecordedRequest;
@@ -384,6 +386,10 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
runSimpleFailureTest(DownloadManager.ERROR_HTTP_DATA_ERROR);
}
+ /**
+ * un-suppress this test once the bug 3286430 is fixed
+ */
+ @Suppress
public void testInsufficientSpace() throws Exception {
// this would be better done by stubbing the system API to check available space, but in the
// meantime, just use an absurdly large header value