summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-06-26 20:50:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-26 20:50:15 +0000
commit90723104f67badbfd95ca374fea2b514d3a314f3 (patch)
treec8833b533738ef8eb94f212a039f2e61bfc423c9 /tests
parent66dd60a462f7f8e230d84ce1cca456ec4b0ed1ac (diff)
parentf42caa9a7b9c6961af5b6bc75ab88c074ee6e4cc (diff)
Merge "[Passpoint] Add metrics to indicate OSU provisioned profile" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
index 198eb079f..4e895e488 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
@@ -1762,10 +1762,11 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(1, mDecodedProto.connectionEvent.length);
assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_OPEN,
mDecodedProto.connectionEvent[0].networkType);
+ assertFalse(mDecodedProto.connectionEvent[0].isOsuProvisioned);
}
/**
- * Verify the ConnectionEvent is labeled with networkType passpoint correctly.
+ * Verify the ConnectionEvent is labeled with networkType Passpoint correctly.
*/
@Test
public void testConnectionNetworkTypePasspoint() throws Exception {
@@ -1781,6 +1782,7 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(1, mDecodedProto.connectionEvent.length);
assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_PASSPOINT,
mDecodedProto.connectionEvent[0].networkType);
+ assertFalse(mDecodedProto.connectionEvent[0].isOsuProvisioned);
}
/**
@@ -4995,4 +4997,26 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(2, mDecodedProto.carrierWifiMetrics.numConnectionAuthFailure);
assertEquals(3, mDecodedProto.carrierWifiMetrics.numConnectionNonAuthFailure);
}
+
+ /**
+ * Verify the ConnectionEvent is labeled with networkType Passpoint correctly and that the OSU
+ * provisioned flag is set to true.
+ */
+ @Test
+ public void testConnectionNetworkTypePasspointFromOsu() throws Exception {
+ WifiConfiguration config = WifiConfigurationTestUtil.createPasspointNetwork();
+ config.updateIdentifier = "7";
+ mWifiMetrics.startConnectionEvent(config, "RED",
+ WifiMetricsProto.ConnectionEvent.ROAM_NONE);
+ mWifiMetrics.endConnectionEvent(
+ WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_TIMED_OUT,
+ WifiMetricsProto.ConnectionEvent.HLF_NONE,
+ WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
+ dumpProtoAndDeserialize();
+
+ assertEquals(1, mDecodedProto.connectionEvent.length);
+ assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_PASSPOINT,
+ mDecodedProto.connectionEvent[0].networkType);
+ assertTrue(mDecodedProto.connectionEvent[0].isOsuProvisioned);
+ }
}