summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-09-14 19:58:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-09-14 19:58:48 +0000
commit21130f070cd84f847b2efd59c099b86068733347 (patch)
tree9e2be2b758ac3b2598f6aae4509b9ae468ef4883 /tests
parent90b8c690138228ae755a68dd11b6c6d102eeb824 (diff)
parentbac7430bc9de3779b078da596a2ef1badfc7fd54 (diff)
Merge "SupplicantStaIfaceCallback: Refactor FILS connection event handling" into rvc-qpr-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java11
3 files changed, 11 insertions, 10 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index fd1ef1718..d4af7ecac 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -4986,7 +4986,7 @@ public class ClientModeImplTest extends WifiBaseTest {
verify(mWifiMetrics, times(1)).incrementConnectRequestWithFilsAkmCount();
- mCmi.sendMessage(WifiMonitor.FILS_NETWORK_CONNECTION_EVENT, 0, 0, sBSSID);
+ mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT, 0, 1, sBSSID);
mLooper.dispatchAll();
verify(mWifiMetrics, times(1)).incrementL2ConnectionThroughFilsAuthCount();
diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
index 762691184..7e0c20faf 100644
--- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
@@ -1010,7 +1010,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest {
NativeUtil.decodeSsid(SUPPLICANT_SSID));
wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
- eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(BSSID));
+ eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(BSSID));
wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
@@ -2824,7 +2824,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest {
NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
- eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(BSSID));
+ eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(BSSID));
wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
@@ -2904,8 +2904,8 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest {
NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
NativeUtil.decodeSsid(SUPPLICANT_SSID), true);
- wifiMonitorInOrder.verify(mWifiMonitor).broadcastFilsNetworkConnectionEvent(
- eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(BSSID));
+ wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
+ eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(true), eq(BSSID));
wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
index 24bb968a5..c4acd73c2 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
@@ -423,13 +423,14 @@ public class WifiMonitorTest extends WifiBaseTest {
WLAN_IFACE_NAME, WifiMonitor.NETWORK_CONNECTION_EVENT, mHandlerSpy);
int networkId = NETWORK_ID;
String bssid = BSSID;
- mWifiMonitor.broadcastNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, bssid);
+ mWifiMonitor.broadcastNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, false, bssid);
mLooper.dispatchAll();
ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
verify(mHandlerSpy).handleMessage(messageCaptor.capture());
assertEquals(WifiMonitor.NETWORK_CONNECTION_EVENT, messageCaptor.getValue().what);
assertEquals(networkId, messageCaptor.getValue().arg1);
+ assertEquals(0, messageCaptor.getValue().arg2);
assertEquals(bssid, (String) messageCaptor.getValue().obj);
}
@@ -607,17 +608,17 @@ public class WifiMonitorTest extends WifiBaseTest {
@Test
public void testBroadcastFilsNetworkConnectionEvent() {
mWifiMonitor.registerHandler(
- WLAN_IFACE_NAME, WifiMonitor.FILS_NETWORK_CONNECTION_EVENT, mHandlerSpy);
+ WLAN_IFACE_NAME, WifiMonitor.NETWORK_CONNECTION_EVENT, mHandlerSpy);
int networkId = NETWORK_ID;
String bssid = BSSID;
- mWifiMonitor.broadcastFilsNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, bssid);
+ mWifiMonitor.broadcastNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, true, bssid);
mLooper.dispatchAll();
ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
verify(mHandlerSpy).handleMessage(messageCaptor.capture());
- assertEquals(WifiMonitor.FILS_NETWORK_CONNECTION_EVENT, messageCaptor.getValue().what);
+ assertEquals(WifiMonitor.NETWORK_CONNECTION_EVENT, messageCaptor.getValue().what);
assertEquals(networkId, messageCaptor.getValue().arg1);
+ assertEquals(1, messageCaptor.getValue().arg2);
assertEquals(bssid, (String) messageCaptor.getValue().obj);
}
-
}