From 255582a7542bc16622369986e1ba0484270b2e8d Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 13 Oct 2011 16:05:50 -0700 Subject: Fix test to match behavior after 5196436. Change-Id: Idfd4da891a6709504ea4f0cc72701400f63e0c2d --- tests/src/com/android/providers/downloads/HelpersTest.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'tests') 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); } } -- cgit v1.2.3