Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 010315a0 authored by Oli Lan's avatar Oli Lan
Browse files

Remove failing AvatarPhotoController test.

This removes a test that is not valid and is failing.

The test case is covered by the existing test
internalCropUsedIfNoSystemCropperFound.

Bug: 223169017
Test: atest AvatarPhotoControllerTest
Change-Id: I05e17a3f2c05b312f1e78f48596ba3f91f14e7e0
parent f2ba9d3b
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -149,23 +149,6 @@ public class AvatarPhotoControllerTest {
                "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
    public void choosePhotoIsFollowedByCrop() throws IOException {
        new File(mImagesDir, "file.txt").createNewFile();