summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Jiang <qiangjiang@google.com>2019-08-10 01:07:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-08-10 01:07:53 +0000
commitf0e73b430bcc486f16cde16b273d5fd7133865f3 (patch)
treea58ce471667dfecc399a5a7d0dba0cf3d0bc7f2b
parent3308f18be6623e7071a433a78be9e43edc4f4be9 (diff)
parent20af5e81ca6087ee11898d1061fc34f9b579958b (diff)
downloadconnectivity-f0e73b430bcc486f16cde16b273d5fd7133865f3.tar.gz
Merge "[ACTS][NetworkSuggestion] add test for hidden network" into qt-qpr1-devandroid-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android10-qpr1-mainline-release
-rwxr-xr-xacts/tests/google/wifi/WifiNetworkSuggestionTest.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/acts/tests/google/wifi/WifiNetworkSuggestionTest.py b/acts/tests/google/wifi/WifiNetworkSuggestionTest.py
index 27f859ce1..275dee5b3 100755
--- a/acts/tests/google/wifi/WifiNetworkSuggestionTest.py
+++ b/acts/tests/google/wifi/WifiNetworkSuggestionTest.py
@@ -60,7 +60,7 @@ class WifiNetworkSuggestionTest(WifiBaseTest):
req_params = []
opt_param = [
"open_network", "reference_networks", "radius_conf_2g", "radius_conf_5g", "ca_cert",
- "eap_identity", "eap_password"
+ "eap_identity", "eap_password", "hidden_networks"
]
self.unpack_userparams(
req_param_names=req_params, opt_param_names=opt_param)
@@ -95,6 +95,8 @@ class WifiNetworkSuggestionTest(WifiBaseTest):
Ent.PHASE2: int(EapPhase2.MSCHAPV2),
WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
}
+ if hasattr(self, "hidden_networks"):
+ self.hidden_network = self.hidden_networks[0]
self.dut.droid.wifiRemoveNetworkSuggestions([])
def setup_test(self):
@@ -434,3 +436,24 @@ class WifiNetworkSuggestionTest(WifiBaseTest):
self.wpa_psk_2g[WifiEnums.SSID_KEY],
assert_on_fail=False),
"Device should not connect back")
+
+ @test_tracker_info(uuid="93c86b05-fa56-4d79-ad27-009a16f691b1")
+ def test_connect_to_hidden_network(self):
+ """
+ Adds a network suggestion with hidden SSID config, ensure device can scan
+ and connect to this network.
+
+ Steps:
+ 1. Send a hidden network suggestion to the device.
+ 2. Wait for the device to connect to it.
+ 3. Ensure that we did not receive the post connection broadcast
+ (isAppInteractionRequired = False).
+ 4. Remove the suggestions and ensure the device does not connect back.
+ """
+ asserts.skip_if(not hasattr(self, "hidden_networks"), "No hidden networks, skip this test")
+
+ network_suggestion = self.hidden_network
+ self.add_suggestions_and_ensure_connection(
+ [network_suggestion], network_suggestion[WifiEnums.SSID_KEY], False)
+ self.remove_suggestions_disconnect_and_ensure_no_connection_back(
+ [network_suggestion], network_suggestion[WifiEnums.SSID_KEY])