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

Commit e34aa1c0 authored by Alex Johnston's avatar Alex Johnston Committed by Automerger Merge Worker
Browse files

Merge "QS work profile network logging test" into sc-dev am: c1b5d9c2

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

Change-Id: I10beef043dcbee7e26653f7ef95879cc966c5510
parents 922264a0 c1b5d9c2
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ public class QSSecurityFooterTest extends SysuiTestCase {
    }

    @Test
    public void testNetworkLoggingEnabled() {
    public void testNetworkLoggingEnabled_deviceOwner() {
        when(mSecurityController.isDeviceManaged()).thenReturn(true);
        when(mSecurityController.isNetworkLoggingEnabled()).thenReturn(true);
        mFooter.refreshState();
@@ -221,6 +221,18 @@ public class QSSecurityFooterTest extends SysuiTestCase {
                     mFooterText.getText());
    }

    @Test
    public void testNetworkLoggingEnabled_managedProfileOwner() {
        when(mSecurityController.hasWorkProfile()).thenReturn(true);
        when(mSecurityController.isNetworkLoggingEnabled()).thenReturn(true);
        mFooter.refreshState();

        TestableLooper.get(this).processAllMessages();
        assertEquals(mContext.getString(
                R.string.quick_settings_disclosure_managed_profile_network_activity),
                mFooterText.getText());
    }

    @Test
    public void testManagedCACertsInstalled() {
        when(mSecurityController.isDeviceManaged()).thenReturn(true);