diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java | 120 |
1 files changed, 3 insertions, 117 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java index dcef6e9d4..f7a3c4be6 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java @@ -2261,8 +2261,6 @@ public class WifiVendorHalTest { RadioModeInfo radioModeInfo0 = new RadioModeInfo(); radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - RadioModeInfo radioModeInfo1 = new RadioModeInfo(); - radioModeInfo1.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; IfaceInfo ifaceInfo0 = new IfaceInfo(); ifaceInfo0.name = TEST_IFACE_NAME; @@ -2273,12 +2271,9 @@ public class WifiVendorHalTest { radioModeInfo0.ifaceInfos.add(ifaceInfo0); radioModeInfo0.ifaceInfos.add(ifaceInfo1); - radioModeInfo1.ifaceInfos.add(ifaceInfo0); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); ArrayList<RadioModeInfo> radioModeInfos = new ArrayList<>(); radioModeInfos.add(radioModeInfo0); - radioModeInfos.add(radioModeInfo1); mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos); verify(mVendorHalRadioModeChangeHandler).onScc(WifiScanner.WIFI_BAND_5_GHZ); @@ -2294,97 +2289,23 @@ public class WifiVendorHalTest { startHalInStaModeAndRegisterRadioModeChangeCallback(); RadioModeInfo radioModeInfo0 = new RadioModeInfo(); - radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - RadioModeInfo radioModeInfo1 = new RadioModeInfo(); - radioModeInfo1.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; + radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_BOTH; IfaceInfo ifaceInfo0 = new IfaceInfo(); ifaceInfo0.name = TEST_IFACE_NAME; - ifaceInfo0.channel = 34; + ifaceInfo0.channel = 1; IfaceInfo ifaceInfo1 = new IfaceInfo(); ifaceInfo1.name = TEST_IFACE_NAME_1; ifaceInfo1.channel = 36; radioModeInfo0.ifaceInfos.add(ifaceInfo0); radioModeInfo0.ifaceInfos.add(ifaceInfo1); - radioModeInfo1.ifaceInfos.add(ifaceInfo0); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); ArrayList<RadioModeInfo> radioModeInfos = new ArrayList<>(); radioModeInfos.add(radioModeInfo0); - radioModeInfos.add(radioModeInfo1); mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos); - verify(mVendorHalRadioModeChangeHandler).onMcc(WifiScanner.WIFI_BAND_5_GHZ); - - verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler); - } - - /** - * Verifies radio mode change callback error cases. - */ - @Test - public void testRadioModeChangeCallbackErrorTimeSharingWithDifferentIfacesOnBothRadios() - throws Exception { - startHalInStaModeAndRegisterRadioModeChangeCallback(); - - RadioModeInfo radioModeInfo0 = new RadioModeInfo(); - radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - RadioModeInfo radioModeInfo1 = new RadioModeInfo(); - radioModeInfo1.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - - IfaceInfo ifaceInfo0 = new IfaceInfo(); - ifaceInfo0.name = TEST_IFACE_NAME; - ifaceInfo0.channel = 34; - IfaceInfo ifaceInfo1 = new IfaceInfo(); - ifaceInfo1.name = TEST_IFACE_NAME_1; - ifaceInfo1.channel = 34; - - radioModeInfo0.ifaceInfos.add(ifaceInfo0); - radioModeInfo0.ifaceInfos.add(ifaceInfo0); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); - - ArrayList<RadioModeInfo> radioModeInfos = new ArrayList<>(); - radioModeInfos.add(radioModeInfo0); - radioModeInfos.add(radioModeInfo1); - - mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos); - // Ignored.... - - verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler); - } - - /** - * Verifies radio mode change callback error cases. - */ - @Test - public void testRadioModeChangeCallbackErrorTimeSharingWithDifferentNumberOfIfacesOnBothRadios() - throws Exception { - startHalInStaModeAndRegisterRadioModeChangeCallback(); - - RadioModeInfo radioModeInfo0 = new RadioModeInfo(); - radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - RadioModeInfo radioModeInfo1 = new RadioModeInfo(); - radioModeInfo1.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - - IfaceInfo ifaceInfo0 = new IfaceInfo(); - ifaceInfo0.name = TEST_IFACE_NAME; - ifaceInfo0.channel = 34; - IfaceInfo ifaceInfo1 = new IfaceInfo(); - ifaceInfo1.name = TEST_IFACE_NAME_1; - ifaceInfo1.channel = 34; - - radioModeInfo0.ifaceInfos.add(ifaceInfo0); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); - - ArrayList<RadioModeInfo> radioModeInfos = new ArrayList<>(); - radioModeInfos.add(radioModeInfo0); - radioModeInfos.add(radioModeInfo1); - - mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos); - // Ignored.... + verify(mVendorHalRadioModeChangeHandler).onMcc(WifiScanner.WIFI_BAND_BOTH); verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler); } @@ -2419,41 +2340,6 @@ public class WifiVendorHalTest { verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler); } - /** - * Verifies radio mode change callback error cases. - */ - @Test - public void testRadioModeChangeCallbackErrorTimeSharingWithDifferentBandsOnBothRadios() - throws Exception { - startHalInStaModeAndRegisterRadioModeChangeCallback(); - - RadioModeInfo radioModeInfo0 = new RadioModeInfo(); - radioModeInfo0.bandInfo = WifiScanner.WIFI_BAND_24_GHZ; - RadioModeInfo radioModeInfo1 = new RadioModeInfo(); - radioModeInfo1.bandInfo = WifiScanner.WIFI_BAND_5_GHZ; - - IfaceInfo ifaceInfo0 = new IfaceInfo(); - ifaceInfo0.name = TEST_IFACE_NAME; - ifaceInfo0.channel = 34; - IfaceInfo ifaceInfo1 = new IfaceInfo(); - ifaceInfo1.name = TEST_IFACE_NAME_1; - ifaceInfo1.channel = 36; - - radioModeInfo0.ifaceInfos.add(ifaceInfo0); - radioModeInfo0.ifaceInfos.add(ifaceInfo1); - radioModeInfo1.ifaceInfos.add(ifaceInfo0); - radioModeInfo1.ifaceInfos.add(ifaceInfo1); - - ArrayList<RadioModeInfo> radioModeInfos = new ArrayList<>(); - radioModeInfos.add(radioModeInfo0); - radioModeInfos.add(radioModeInfo1); - - mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos); - // Ignored.... - - verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler); - } - private void startHalInStaModeAndRegisterRadioModeChangeCallback() { // Expose the 1.2 IWifiChip. mWifiVendorHal = new WifiVendorHalSpyV1_2(mHalDeviceManager, mLooper.getLooper()); |