diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-08-03 04:21:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-08-03 04:21:36 +0000 |
commit | 24454215adb6d9bc4dab4c259977c6fa8b4483be (patch) | |
tree | e55c4807994149323f2167afda466fb49b84bb2d /tests | |
parent | 6ff9b60d474d928e6258a8c54b92c56321e6b74e (diff) | |
parent | 8e08c5d97b1608e1b173867998dd82e6f44d1d13 (diff) |
Merge "Re-add network to supplicant when EAP identities changes" into oc-mr1-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java index 376d686a4..2925273de 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java @@ -495,6 +495,31 @@ public class WifiConfigurationUtilTest { assertFalse(WifiConfigurationUtil.isSameNetwork(network, network1)); } + /** + * Verify that WifiConfigurationUtil.isSameNetwork returns false when two WifiConfiguration + * objects have the different EAP identity. + */ + @Test + public void testIsSameNetworkReturnsFalseOnDifferentEapIdentity() { + WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID); + WifiConfiguration network2 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID); + network1.enterpriseConfig.setIdentity("Identity1"); + network2.enterpriseConfig.setIdentity("Identity2"); + assertFalse(WifiConfigurationUtil.isSameNetwork(network1, network2)); + } + + /** + * Verify that WifiConfigurationUtil.isSameNetwork returns false when two WifiConfiguration + * objects have the different EAP anonymous identity. + */ + @Test + public void testIsSameNetworkReturnsFalseOnDifferentEapAnonymousIdentity() { + WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID); + WifiConfiguration network2 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID); + network1.enterpriseConfig.setAnonymousIdentity("Identity1"); + network2.enterpriseConfig.setAnonymousIdentity("Identity2"); + assertFalse(WifiConfigurationUtil.isSameNetwork(network1, network2)); + } /** * Verify the instance of {@link android.net.wifi.WifiScanner.PnoSettings.PnoNetwork} created |