summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2018-05-03 00:35:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-03 00:35:40 +0000
commitd2be5893c64fce7119a87b9f52067b24d07d6fd3 (patch)
treede6106c98521a319f800e3b0ed31dad131d1374f /tests
parent6b9f7ba3c20a01689c1027043b6e6eb5b253348e (diff)
parentff16c9e2d8bf417d72d3d5d82d6e3719858ce36c (diff)
Merge "WifiStateMachine: Shutdown IpClient when exiting client mode" into pi-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
index 1907c56b7..6fa9a2ff6 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
@@ -2451,4 +2451,16 @@ public class WifiStateMachineTest {
mWsm.setWifiStateForApiCalls(invalidStatePositive);
assertEquals(WifiManager.WIFI_STATE_DISABLED, mWsm.syncGetWifiState());
}
+
+ /**
+ * Verify that IPClient instance is shutdown when wifi is disabled.
+ */
+ @Test
+ public void verifyIpClientShutdownWhenDisabled() throws Exception {
+ loadComponentsInStaMode();
+
+ mWsm.setOperationalMode(WifiStateMachine.DISABLED_MODE, null);
+ mLooper.dispatchAll();
+ verify(mIpClient).shutdown();
+ }
}