summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Johnston <acjohnston@google.com> 2021-03-31 17:28:35 +0100
committer Alex Johnston <acjohnston@google.com> 2021-04-01 14:31:30 +0100
commit953d04dfa2aab4b7ed5b3af25850f4cf2813d869 (patch)
tree0c3b566a008faf02df4b14fe22b24fd032b0f425
parent352fa3bd455081cbd64d1b21114e0d264ee26744 (diff)
QS work profile network logging test
Bug: 183606908 Test: atest com.android.systemui.qs.QSSecurityFooterTest Change-Id: I1f6ffb72285fb7cf9542f2331897c61aec60ef8a
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java
index 5422ae831de3..e4b95af1af04 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSSecurityFooterTest.java
@@ -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();
@@ -222,6 +222,18 @@ public class QSSecurityFooterTest extends SysuiTestCase {
}
@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);
when(mSecurityController.hasCACertInCurrentUser()).thenReturn(true);