commit | e8894cf307ca3ecafb38293b10598c4d562a81ea | [log] [tgz] |
---|---|---|
author | Marco Nelissen <marcone@google.com> | Mon Feb 06 13:03:09 2012 -0800 |
committer | Marco Nelissen <marcone@google.com> | Mon Feb 06 13:03:09 2012 -0800 |
tree | c28ac88d6f706ae5158ffae2c743b56bf76a9d2f | |
parent | 3b3280568e1fc28548d76e26d019dc5afc548104 [diff] |
Test video file is deleted when db entry is deleted Change-Id: Ie6e301f078d31982a759e0949b7b536e4a41a51c
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java b/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java index 2a4b46c..16a4778 100644 --- a/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java +++ b/tests/tests/provider/src/android/provider/cts/MediaStore_Video_ThumbnailsTest.java
@@ -99,6 +99,12 @@ assertFalse("thumbnail file should no longer exist", new File(path).exists()); } c.close(); + + // not technically a thumbnail test, but needs testing anyway: check that the video file + // is removed when deleting the database entry + assertTrue(new File(Environment.getExternalStorageDirectory(), "testVideo.3gp").exists()); + mResolver.delete(videoUri, null, null); + assertFalse(new File(Environment.getExternalStorageDirectory(), "testVideo.3gp").exists()); } private Uri insertVideo() throws IOException {