diff options
author | Roshan Pius <rpius@google.com> | 2017-02-23 05:05:42 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-02-23 05:05:42 +0000 |
commit | 608c48674e1e6eca30562329a72dc66921294806 (patch) | |
tree | aec4a03f175cfc4b760cef3a1bcb7bccb291f705 /tests | |
parent | 7cda57b6e1a343846692b228b8565fdafbfce6cf (diff) | |
parent | 135be5a123dd70bb4663396a28dda9d6c26956fc (diff) |
Merge "[WifiVendorHal] Neighbor Discovery Offload"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java index a6146da2d..422de5a7d 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java @@ -851,4 +851,35 @@ public class WifiVendorHalTest { verify(mIWifiStaIface, never()) .getDebugRxPacketFates(any(IWifiStaIface.getDebugRxPacketFatesCallback.class)); } + + /** + * Tests the nd offload enable/disable. + */ + @Test + public void testEnableDisableNdOffload() throws Exception { + when(mIWifiStaIface.enableNdOffload(anyBoolean())).thenReturn(mWifiStatusSuccess); + + assertFalse(mWifiVendorHal.configureNeighborDiscoveryOffload(true)); + verify(mIWifiStaIface, never()).enableNdOffload(anyBoolean()); + + assertTrue(mWifiVendorHal.startVendorHalSta()); + + assertTrue(mWifiVendorHal.configureNeighborDiscoveryOffload(true)); + verify(mIWifiStaIface).enableNdOffload(eq(true)); + assertTrue(mWifiVendorHal.configureNeighborDiscoveryOffload(false)); + verify(mIWifiStaIface).enableNdOffload(eq(false)); + } + + /** + * Tests the nd offload enable failure. + */ + @Test + public void testEnableNdOffloadFailure() throws Exception { + when(mIWifiStaIface.enableNdOffload(eq(true))).thenReturn(mWifiStatusFailure); + + assertTrue(mWifiVendorHal.startVendorHalSta()); + + assertFalse(mWifiVendorHal.configureNeighborDiscoveryOffload(true)); + verify(mIWifiStaIface).enableNdOffload(eq(true)); + } } |