diff options
author | Michael Plass <mplass@google.com> | 2019-04-08 16:53:37 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-08 16:53:37 +0000 |
commit | d0619384cd9771be99bdcb6262ff1379c1cc55fd (patch) | |
tree | c7b6edd850722b80785f74a34d61a92566bb2c83 /tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java | |
parent | 6bd5f0a9b91a2042f0f818abb97832a2b2102947 (diff) | |
parent | fccc779342f194fc287aa0acc33a3ea04a13ec9c (diff) | |
download | android_frameworks_opt_net_wifi-d0619384cd9771be99bdcb6262ff1379c1cc55fd.tar.gz android_frameworks_opt_net_wifi-d0619384cd9771be99bdcb6262ff1379c1cc55fd.tar.bz2 android_frameworks_opt_net_wifi-d0619384cd9771be99bdcb6262ff1379c1cc55fd.zip |
Merge changes I7e82ca01,I3ca0f05c into qt-dev
* changes:
Improve SupplicantStaIfaceHal coverage
Improve ClientModeImpl unit test coverage
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 2da2f691b..718c82fdd 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -618,6 +618,7 @@ public class ClientModeImplTest { assertEquals("DisconnectedState", getCurrentState().getName()); assertEquals(ClientModeImpl.CONNECT_MODE, mCmi.getOperationalModeForTest()); assertEquals(WifiManager.WIFI_STATE_ENABLED, mCmi.syncGetWifiState()); + assertEquals("enabled", mCmi.syncGetWifiStateByName()); // reset the expectations on mContext since we did get an expected broadcast, but we should // not on the next transition @@ -630,6 +631,7 @@ public class ClientModeImplTest { assertEquals(ClientModeImpl.DISABLED_MODE, mCmi.getOperationalModeForTest()); assertEquals("DefaultState", getCurrentState().getName()); assertEquals(WifiManager.WIFI_STATE_DISABLED, mCmi.syncGetWifiState()); + assertEquals("disabled", mCmi.syncGetWifiStateByName()); verify(mContext, never()).sendStickyBroadcastAsUser( (Intent) argThat(new WifiEnablingStateIntentMatcher()), any()); } @@ -2102,7 +2104,7 @@ public class ClientModeImplTest { /** * Test that connected SSID and BSSID are exposed to system server. - * Also tests that {@link ClientModeImpl#syncRequestConnectionInfo(String)} always + * Also tests that {@link ClientModeImpl#syncRequestConnectionInfo()} always * returns a copy of WifiInfo. */ @Test @@ -2317,7 +2319,7 @@ public class ClientModeImplTest { any(NetworkInfo.class), any(LinkProperties.class), any(NetworkCapabilities.class), anyInt(), any(NetworkMisc.class), anyInt()); - ArrayList<Integer> thresholdsArray = new ArrayList(); + ArrayList<Integer> thresholdsArray = new ArrayList<>(); thresholdsArray.add(RSSI_THRESHOLD_MAX); thresholdsArray.add(RSSI_THRESHOLD_MIN); Bundle thresholds = new Bundle(); @@ -2379,6 +2381,15 @@ public class ClientModeImplTest { } /** + * Verify RSSI polling with verbose logging + */ + @Test + public void verifyConnectedModeRssiPollingWithVerboseLogging() throws Exception { + mCmi.enableVerboseLogging(1); + verifyConnectedModeRssiPolling(); + } + + /** * Verify that calls to start and stop filtering multicast packets are passed on to the IpClient * instance. */ |