Merge "Remove failing AvatarPhotoController test." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
04720f26fe
@@ -149,23 +149,6 @@ public class AvatarPhotoControllerTest {
|
|||||||
"com.android.camera.action.CROP", REQUEST_CODE_CROP_PHOTO);
|
"com.android.camera.action.CROP", REQUEST_CODE_CROP_PHOTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void takePhotoIsNotFollowedByCropIntentWhenCropNotSupported() throws IOException {
|
|
||||||
when(mMockAvatarUi.startSystemActivityForResult(any(), anyInt())).thenReturn(false);
|
|
||||||
|
|
||||||
File file = new File(mImagesDir, "file.txt");
|
|
||||||
saveBitmapToFile(file);
|
|
||||||
|
|
||||||
Intent intent = new Intent();
|
|
||||||
intent.setData(Uri.parse(
|
|
||||||
"content://com.android.settingslib.test/my_cache/multi_user/file.txt"));
|
|
||||||
mController.onActivityResult(
|
|
||||||
REQUEST_CODE_TAKE_PHOTO, Activity.RESULT_OK, intent);
|
|
||||||
|
|
||||||
verify(mMockAvatarUi, never()).startActivityForResult(any(), anyInt());
|
|
||||||
verify(mMockAvatarUi, never()).startSystemActivityForResult(any(), anyInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void choosePhotoIsFollowedByCrop() throws IOException {
|
public void choosePhotoIsFollowedByCrop() throws IOException {
|
||||||
new File(mImagesDir, "file.txt").createNewFile();
|
new File(mImagesDir, "file.txt").createNewFile();
|
||||||
|
|||||||
Reference in New Issue
Block a user