diff options
author | Steve Howard <showard@google.com> | 2010-09-20 15:40:55 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-20 15:40:55 -0700 |
commit | dc738781156d0f5ac1db62838d42c876d740810d (patch) | |
tree | 0609a0b59994c8b38782abfdc3ab397a67dbb470 /tests/src/com/android | |
parent | 2d0ed12eb053170dac2a93f725e86103e74d0da2 (diff) | |
parent | b9a0ad7182209d4aca708e13e876e9b1b43ffafc (diff) | |
download | android_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.tar.gz android_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.tar.bz2 android_packages_providers_DownloadProvider-dc738781156d0f5ac1db62838d42c876d740810d.zip |
Merge "Improve file error reporting + new detailed error messages in UI" into gingerbread
Diffstat (limited to 'tests/src/com/android')
-rw-r--r-- | tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java | 6 |
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 d577e2c8..554cc1ea 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)); } |