diff options
author | Roshan Pius <rpius@google.com> | 2017-03-25 16:55:05 +0000 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-03-25 16:55:12 +0000 |
commit | 2a4eccdb8aab8e028e8bc8e88e13ab73d8627d87 (patch) | |
tree | cb16b8911b9c145c4737a1fb6acf1a18b6d043d1 /tests | |
parent | e31ef130820979e9a5487299ad4486291d840272 (diff) |
Revert "WifiConfigManager: Add quotes back for psk"
This reverts commit a63ab49c1d20d7a698537b5253d172a8dffc235f.
Change-Id: Ic1516df6078001260c721cf8400855297d6cf67a
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 6b5c79a17..615f61190 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -2483,47 +2483,6 @@ public class WifiConfigManagerTest { } /** - * Verifies the loading of networks using {@link WifiConfigManager#loadFromStore()}: - * - Adds quotes around unquoted ascii PSKs when loading form store. - * - Loads asciis quoted PSKs as they are. - * - Loads base64 encoded as they are. - */ - @Test - public void testUnquotedAsciiPassphraseLoadFromStore() throws Exception { - WifiConfiguration pskNetworkWithNoQuotes = WifiConfigurationTestUtil.createPskNetwork(); - pskNetworkWithNoQuotes.preSharedKey = "pskWithNoQuotes"; - WifiConfiguration pskNetworkWithQuotes = WifiConfigurationTestUtil.createPskNetwork(); - pskNetworkWithQuotes.preSharedKey = "\"pskWithQuotes\""; - WifiConfiguration pskNetworkWithHexString = WifiConfigurationTestUtil.createPskNetwork(); - pskNetworkWithHexString.preSharedKey = - "945ef00c463c2a7c2496376b13263d1531366b46377179a4b17b393687450779"; - - List<WifiConfiguration> sharedNetworks = new ArrayList<WifiConfiguration>() {{ - add(new WifiConfiguration(pskNetworkWithQuotes)); - add(new WifiConfiguration(pskNetworkWithNoQuotes)); - add(new WifiConfiguration(pskNetworkWithHexString)); - }}; - setupStoreDataForRead(sharedNetworks, new ArrayList<>(), new HashSet<String>()); - assertTrue(mWifiConfigManager.loadFromStore()); - - verify(mWifiConfigStore).read(); - verify(mWifiConfigStoreLegacy, never()).read(); - - List<WifiConfiguration> retrievedNetworks = - mWifiConfigManager.getConfiguredNetworksWithPasswords(); - - // The network with no quotes should now have quotes, the others should remain the same. - pskNetworkWithNoQuotes.preSharedKey = "\"pskWithNoQuotes\""; - List<WifiConfiguration> expectedNetworks = new ArrayList<WifiConfiguration>() {{ - add(pskNetworkWithQuotes); - add(pskNetworkWithNoQuotes); - add(pskNetworkWithHexString); - }}; - WifiConfigurationTestUtil.assertConfigurationsEqualForConfigStore( - expectedNetworks, retrievedNetworks); - } - - /** * Verifies that the last user selected network parameter is set when * {@link WifiConfigManager#enableNetwork(int, boolean, int)} with disableOthers flag is set * to true and cleared when either {@link WifiConfigManager#disableNetwork(int, int)} or |