summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRandy Pan <zpan@google.com>2017-05-24 18:45:33 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-24 18:45:33 +0000
commit9ba0cdce88bd776e4fa3f0d799be996f72d0fe1f (patch)
tree42af1962699872086927c522eaf47420a735452d /tests
parentb4a6453d37b24671a586508a66d1f3cd456d5f30 (diff)
parent42e4920fdc3ad70f437f7a5967169b06116f1c62 (diff)
Merge "WifiConfigManager: convert BSSID to lower case" into oc-dev
am: 42e4920fdc Change-Id: I06c8477d69f81332e8513852efd373bf1193a438
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
index 987c50937..f61013841 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
@@ -3170,6 +3170,24 @@ public class WifiConfigManagerTest {
result.getNetworkId()); // Update networkID
}
+ /**
+ * Verifies that the app specified BSSID is converted and saved in lower case.
+ */
+ @Test
+ public void testAppSpecifiedBssidIsSavedInLowerCase() {
+ final String bssid = "0A:08:5C:BB:89:6D"; // upper case
+ WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
+ openNetwork.BSSID = bssid;
+
+ NetworkUpdateResult result = verifyAddNetworkToWifiConfigManager(openNetwork);
+
+ WifiConfiguration retrievedNetwork = mWifiConfigManager.getConfiguredNetwork(
+ result.getNetworkId());
+
+ assertNotEquals(retrievedNetwork.BSSID, bssid);
+ assertEquals(retrievedNetwork.BSSID, bssid.toLowerCase());
+ }
+
private NetworkUpdateResult verifyAddOrUpdateNetworkWithProxySettingsAndPermissions(
boolean withConfOverride,
boolean withProfileOwnerPolicy,