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

Commit f9eac0b5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove failing AvatarPhotoController test." into tm-dev am: 04720f26

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17120843

Change-Id: Ic92c7a47d239a4421863f5d97401524ecd8fc0a7
parents 4d870444 04720f26
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();