summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-05-26 12:20:52 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-26 12:20:52 -0700
commit85f48681e87308405665dc8c458d3aa2ad4aa87d (patch)
treebb8a9cff71f9e0b1649e8b3235af4f48a485670e /tests
parent73787b4fcc7612cec9a17759326e32f6248cd42f (diff)
parent7321b5dc86ba9f9de31588bf726008bf8a13138a (diff)
Merge "[HDM] Add API to check for STA+AP concurrency" into pi-dev
am: 7321b5dc86 Change-Id: I34aa415a794eef454f7406c5eaff99a3f7ee613a
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
index f18c52d39..7e74e3070 100644
--- a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
@@ -687,6 +687,22 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
+ * Validate STA+AP concurrency derivation from chip configuration.
+ */
+ @Test
+ public void testIsConcurrentStaPlusApSupportedChipV1() throws Exception {
+ TestChipV1 chipMock = new TestChipV1();
+ chipMock.initialize();
+ mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
+ mManagerStatusListenerMock);
+ executeAndValidateInitializationSequence();
+ executeAndValidateStartupSequence();
+
+ assertFalse("STA+AP concurrency should be FALSE for TestChipV1",
+ mDut.isConcurrentStaPlusApSupported());
+ }
+
+ /**
* Validate creation of AP interface when in STA mode - but with no interface created. Expect
* a change in chip mode.
*/
@@ -1189,6 +1205,22 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
+ * Validate STA+AP concurrency derivation from chip configuration.
+ */
+ @Test
+ public void testIsConcurrentStaPlusApSupportedChipV2() throws Exception {
+ TestChipV2 chipMock = new TestChipV2();
+ chipMock.initialize();
+ mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
+ mManagerStatusListenerMock);
+ executeAndValidateInitializationSequence();
+ executeAndValidateStartupSequence();
+
+ assertTrue("STA+AP concurrency should be TRUE for TestChipV2",
+ mDut.isConcurrentStaPlusApSupported());
+ }
+
+ /**
* Validate a flow sequence for test chip 2:
* - create STA
* - create P2P
@@ -1466,6 +1498,22 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
+ * Validate STA+AP concurrency derivation from chip configuration.
+ */
+ @Test
+ public void testIsConcurrentStaPlusApSupportedChipV3() throws Exception {
+ TestChipV3 chipMock = new TestChipV3();
+ chipMock.initialize();
+ mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
+ mManagerStatusListenerMock);
+ executeAndValidateInitializationSequence();
+ executeAndValidateStartupSequence();
+
+ assertTrue("STA+AP concurrency should be TRUE for TestChipV3",
+ mDut.isConcurrentStaPlusApSupported());
+ }
+
+ /**
* Validate a flow sequence for test chip 3:
* - create STA
* - create P2P
@@ -1731,6 +1779,22 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
+ * Validate STA+AP concurrency derivation from chip configuration.
+ */
+ @Test
+ public void testIsConcurrentStaPlusApSupportedChipV4() throws Exception {
+ TestChipV4 chipMock = new TestChipV4();
+ chipMock.initialize();
+ mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
+ mManagerStatusListenerMock);
+ executeAndValidateInitializationSequence();
+ executeAndValidateStartupSequence();
+
+ assertTrue("STA+AP concurrency should be TRUE for TestChipV4",
+ mDut.isConcurrentStaPlusApSupported());
+ }
+
+ /**
* Validate a flow sequence for test chip 4:
* - create STA
* - create P2P