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

Commit 5b3a91db authored by Diksha Gohlyan's avatar Diksha Gohlyan
Browse files

Use same formula to check height and input text size

Test: atest DocumentsUIGoogleTests:com.android.documentsui.DialogUiTest
Bug: 156766528
Change-Id: I97a5b97246ceb0801a9e102bb71b496c97ff128b
parent 617523dc
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -201,10 +201,11 @@ public class DialogUiTest {

        final TextInputEditText inputView =
                mCreateDirectoryFragment.getDialog().getWindow().findViewById(android.R.id.text1);
        Paint paint = inputView.getPaint();
        final float textSize = paint.getTextSize();

        assertTrue(inputView.getHeight() > Math.round(textSize));
        assertTrue(
                "Failed with inputView height " + inputView.getHeight() + " and input text height "
                        + getInputTextHeight(inputView),
                inputView.getHeight() > getInputTextHeight(inputView));

        switchOrientation(mActivityTestRule.getActivity());
    }