diff options
author | Oscar Shu <xshu@google.com> | 2020-04-24 01:22:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-04-24 01:22:12 +0000 |
commit | 964bd5d117391df9428d806f182c542cc75c1ca4 (patch) | |
tree | 8d46730770339bab422c6fa27e0d336a5248a7cb /tests | |
parent | 19df2d0dfa75acecef66737dee97e605bd2b00a3 (diff) | |
parent | 00355555f01550d6564908b503bc45daab3b47cb (diff) |
Merge "Settings toggle value metrics" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java | 8 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java index 191f81cee..0b9885c93 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java @@ -317,6 +317,8 @@ public class WifiMetricsTest extends WifiBaseTest { - NUM_NETWORKS_ADDED_BY_USER; private static final boolean TEST_VAL_IS_LOCATION_ENABLED = true; private static final boolean IS_SCANNING_ALWAYS_ENABLED = true; + private static final boolean IS_VERBOSE_LOGGING_ENABLED = true; + private static final boolean IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED = true; private static final int NUM_EMPTY_SCAN_RESULTS = 19; private static final int NUM_NON_EMPTY_SCAN_RESULTS = 23; private static final int NUM_SCAN_UNKNOWN = 1; @@ -681,6 +683,9 @@ public class WifiMetricsTest extends WifiBaseTest { mWifiMetrics.setIsLocationEnabled(TEST_VAL_IS_LOCATION_ENABLED); mWifiMetrics.setIsScanningAlwaysEnabled(IS_SCANNING_ALWAYS_ENABLED); + mWifiMetrics.setVerboseLoggingEnabled(IS_VERBOSE_LOGGING_ENABLED); + mWifiMetrics.setEnhancedMacRandomizationForceEnabled( + IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED); for (int i = 0; i < NUM_EMPTY_SCAN_RESULTS; i++) { mWifiMetrics.incrementEmptyScanResultCount(); @@ -1153,6 +1158,9 @@ public class WifiMetricsTest extends WifiBaseTest { TEST_VAL_IS_LOCATION_ENABLED, mDecodedProto.isLocationEnabled); assertEquals("mDecodedProto.isScanningAlwaysEnabled == IS_SCANNING_ALWAYS_ENABLED", IS_SCANNING_ALWAYS_ENABLED, mDecodedProto.isScanningAlwaysEnabled); + assertEquals(IS_VERBOSE_LOGGING_ENABLED, mDecodedProto.isVerboseLoggingEnabled); + assertEquals(IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED, + mDecodedProto.isEnhancedMacRandomizationForceEnabled); assertEquals("mDecodedProto.numEmptyScanResults == NUM_EMPTY_SCAN_RESULTS", NUM_EMPTY_SCAN_RESULTS, mDecodedProto.numEmptyScanResults); assertEquals("mDecodedProto.numNonEmptyScanResults == NUM_NON_EMPTY_SCAN_RESULTS", diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index 619bf0975..ebd128666 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -510,6 +510,9 @@ public class WifiServiceImplTest extends WifiBaseTest { public void testWifiMetricsDump() { mWifiServiceImpl.dump(new FileDescriptor(), new PrintWriter(new StringWriter()), new String[]{mWifiMetrics.PROTO_DUMP_ARG}); + verify(mWifiMetrics).setEnhancedMacRandomizationForceEnabled(anyBoolean()); + verify(mWifiMetrics).setIsScanningAlwaysEnabled(anyBoolean()); + verify(mWifiMetrics).setVerboseLoggingEnabled(anyBoolean()); verify(mWifiMetrics) .dump(any(FileDescriptor.class), any(PrintWriter.class), any(String[].class)); verify(mClientModeImpl, never()) |