summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2017-03-14 11:44:49 -0700
committerPeter Qiu <zqiu@google.com>2017-03-14 15:48:14 -0700
commit67a4541372684c5d0a3f834f8be76bd8d29ca7ac (patch)
treeda7c20764497f18ac4fb95d844b0d5353d9294f0 /tests
parent5a9f890485371054fb52dc7e17478d074ee2e856 (diff)
hotspot2: ignore Passpoint networks in SavedNetworkEvaluator
While there, enable the Passpoint network when it is created by PasspointNetworkEvaluator to be more consistent. Bug: 36218488 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I72fa55a9cb6baf71e8650e10cb54b496a7be1343
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java
index 7312b3334..616e2161a 100644
--- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
@@ -195,6 +196,11 @@ public class PasspointNetworkEvaluatorTest {
verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt());
assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
+ verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt());
+ verify(mWifiConfigManager).setNetworkCandidateScanResult(
+ eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt());
+ verify(mWifiConfigManager).updateScanDetailForNetwork(
+ eq(TEST_NETWORK_ID), any(ScanDetail.class));
}
/**
@@ -233,6 +239,11 @@ public class PasspointNetworkEvaluatorTest {
verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt());
assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
+ verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt());
+ verify(mWifiConfigManager).setNetworkCandidateScanResult(
+ eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt());
+ verify(mWifiConfigManager).updateScanDetailForNetwork(
+ eq(TEST_NETWORK_ID), any(ScanDetail.class));
}
/**
@@ -275,6 +286,11 @@ public class PasspointNetworkEvaluatorTest {
verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt());
assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
+ verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt());
+ verify(mWifiConfigManager).setNetworkCandidateScanResult(
+ eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt());
+ verify(mWifiConfigManager).updateScanDetailForNetwork(
+ eq(TEST_NETWORK_ID), any(ScanDetail.class));
}
/**