From aae250f24998f724389f929f2c4d0d37204cf1e8 Mon Sep 17 00:00:00 2001 From: Hai Shalom Date: Fri, 13 Mar 2020 09:44:46 -0700 Subject: [PATCH] [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 --- .../android/net/wifi/cts/WifiManagerTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java index f4c20e3072..b92d7259fe 100644 --- a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java +++ b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java @@ -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(); + } }