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

Commit a6198c25 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adjust lock screen tests"

parents bfbb0181 b5c17fb3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -123,13 +123,13 @@ public class LockscreenDashboardFragmentTest {
    }

    @Test
    public void isPageSearchable_notLocked_shouldNotBeSearchable() {
    public void isPageSearchable_notLocked_shouldBeSearchable() {
        when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false);
        when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true);

        assertThat(LockscreenDashboardFragment.SEARCH_INDEX_DATA_PROVIDER
                .getNonIndexableKeys(mContext))
                .contains("security_lockscreen_settings_screen");
                .doesNotContain("security_lockscreen_settings_screen");
    }

    public static class TestFragment extends LockscreenDashboardFragment {
+2 −2
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ public class LockScreenPreferenceControllerTest {
    }

    @Test
    public void onResume_unavailable_shouldHide() {
    public void onResume_unavailable_shouldShow() {
        when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true);
        when(mLockPatternUtils.getKeyguardStoredPasswordQuality(anyInt()))
                .thenReturn(PASSWORD_QUALITY_UNSPECIFIED);
@@ -140,6 +140,6 @@ public class LockScreenPreferenceControllerTest {
        mController.displayPreference(mScreen);
        mLifecycle.handleLifecycleEvent(ON_RESUME);

        assertThat(mPreference.isVisible()).isFalse();
        assertThat(mPreference.isVisible()).isTrue();
    }
}