diff options
author | Jeff Sharkey <jsharkey@android.com> | 2011-10-13 16:05:50 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2011-10-13 16:05:50 -0700 |
commit | 255582a7542bc16622369986e1ba0484270b2e8d (patch) | |
tree | 01367df08650028d06a9e7afbc5107b1e1833968 | |
parent | 35b3fef25fc2509bb59371f0a1d2d2332db62487 (diff) | |
download | android_packages_providers_DownloadProvider-255582a7542bc16622369986e1ba0484270b2e8d.tar.gz android_packages_providers_DownloadProvider-255582a7542bc16622369986e1ba0484270b2e8d.tar.bz2 android_packages_providers_DownloadProvider-255582a7542bc16622369986e1ba0484270b2e8d.zip |
Fix test to match behavior after 5196436.
Change-Id: Idfd4da891a6709504ea4f0cc72701400f63e0c2d
-rw-r--r-- | tests/src/com/android/providers/downloads/HelpersTest.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/src/com/android/providers/downloads/HelpersTest.java b/tests/src/com/android/providers/downloads/HelpersTest.java index fdd0334c..50f4c44c 100644 --- a/tests/src/com/android/providers/downloads/HelpersTest.java +++ b/tests/src/com/android/providers/downloads/HelpersTest.java @@ -32,22 +32,13 @@ public class HelpersTest extends AndroidTestCase { public void testGetFullPath() throws Exception { String hint = "file:///com.android.providers.downloads/test"; - // Test that an extension derived from the specified mime type is appended to a filename that - // does not itself have an extension. + // Test that we never change requested filename. String fileName = Helpers.getFullPath( hint, "video/mp4", // MIME type corresponding to file extension .mp4 Downloads.Impl.DESTINATION_FILE_URI, null); - assertEquals(hint + ".mp4", fileName); - - // Test that the filename extension is replaced by one derived from the specified mime type. - fileName = Helpers.getFullPath( - hint + ".shouldbereplaced", - "video/mp4", // MIME type corresponding to file extension .mp4 - Downloads.Impl.DESTINATION_FILE_URI, - null); - assertEquals(hint + ".mp4", fileName); + assertEquals(hint, fileName); } } |