QS work profile network logging test

Bug: 183606908
Test: atest com.android.systemui.qs.QSSecurityFooterTest
Change-Id: I1f6ffb72285fb7cf9542f2331897c61aec60ef8a
This commit is contained in:
Alex Johnston
2021-03-31 17:28:35 +01:00
parent 352fa3bd45
commit 953d04dfa2

View File

@@ -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);