[CTS] Add tests for WPA3/OWE device capability APIs in WifiManager

Add CTS coverage for WPA3/OWE device capability APIs in WifiManager:
mWifiManager.isEnhancedOpenSupported()
mWifiManager.isWpa3SuiteBSupported()
mWifiManager.isWpa3SaeSupported()

Bug: 151439303
Test: atest WifiManagerTest
Change-Id: I5a1510dce1e6d240891ecc18d2aa92509223ac66
This commit is contained in:
Hai Shalom
2020-03-13 09:44:46 -07:00
parent 76de1b95df
commit aae250f249

View File

@@ -1759,4 +1759,37 @@ public class WifiManagerTest extends AndroidTestCase {
assertNull(ShellIdentityUtils.invokeWithShellPermissions(mWifiManager::getCurrentNetwork));
}
/**
* Tests {@link WifiManager#isWpa3SaeSupported()} does not crash.
*/
public void testIsWpa3SaeSupported() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
mWifiManager.isWpa3SaeSupported();
}
/**
* Tests {@link WifiManager#isWpa3SuiteBSupported()} does not crash.
*/
public void testIsWpa3SuiteBSupported() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
mWifiManager.isWpa3SuiteBSupported();
}
/**
* Tests {@link WifiManager#isEnhancedOpenSupported()} does not crash.
*/
public void testIsEnhancedOpenSupported() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
mWifiManager.isEnhancedOpenSupported();
}
}