summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-06-26 21:03:30 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-26 21:03:30 +0000
commit761476c97800f4bdac6f92ae6cfc6a0c492703c7 (patch)
treeaa61d76e3ece7f1b0a96531004fa3fcbaaeab775 /tests
parent2f68c7d3adcba308ee2741c3e35a0acb8d0fac75 (diff)
parent90723104f67badbfd95ca374fea2b514d3a314f3 (diff)
Merge "[Passpoint] Add metrics to indicate OSU provisioned profile" into rvc-dev am: 90723104f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12000992 Change-Id: I488064ca181f8b8bf0bc8913570443c8f023af16
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);
+ }
}