summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSteve Howard <showard@google.com>2010-09-20 15:40:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-20 15:40:55 -0700
commitdc738781156d0f5ac1db62838d42c876d740810d (patch)
tree0609a0b59994c8b38782abfdc3ab397a67dbb470 /tests
parent2d0ed12eb053170dac2a93f725e86103e74d0da2 (diff)
parentb9a0ad7182209d4aca708e13e876e9b1b43ffafc (diff)
downloadandroid_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.zip
android_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.tar.gz
android_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.tar.bz2
Merge "Improve file error reporting + new detailed error messages in UI" into gingerbread
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index d577e2c..554cc1e 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -292,7 +292,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
Uri localUri = Uri.parse(download.getStringField(DownloadManager.COLUMN_LOCAL_URI));
assertEquals(destination, localUri);
- InputStream stream = new FileInputStream(destination.getSchemeSpecificPart());
+ InputStream stream = new FileInputStream(destination.getPath());
try {
assertEquals(FILE_CONTENT, readStream(stream));
} finally {
@@ -525,12 +525,12 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
public void testExistingFile() throws Exception {
Uri destination = getExternalUri();
- new File(destination.getSchemeSpecificPart()).createNewFile();
+ new File(destination.getPath()).createNewFile();
enqueueEmptyResponse(HTTP_OK);
Download download = enqueueRequest(getRequest().setDestinationUri(destination));
download.runUntilStatus(DownloadManager.STATUS_FAILED);
- assertEquals(DownloadManager.ERROR_FILE_ERROR,
+ assertEquals(DownloadManager.ERROR_FILE_ALREADY_EXISTS,
download.getLongField(DownloadManager.COLUMN_ERROR_CODE));
}