diff options
author | Mingguang Xu <mingguangxu@google.com> | 2020-08-04 20:50:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-08-04 20:50:49 +0000 |
commit | ece9f2221fcb68c1f18ab78966e7eb8f5049dfdd (patch) | |
tree | 1280fb5b9d90b9e6dacee5e8f9cd63692be8d4a1 /tests | |
parent | bf837e17c1a831c5ad5dde452b5ab3f5d136b614 (diff) | |
parent | 3e0366caf14aa4754d756a03a6d4c6f4e8f7831d (diff) |
Merge "Extension API: Set initial score value to the max when starting connected network scorer" into rvc-qpr-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java index 674ff8c9d..3c752f97a 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java @@ -833,4 +833,15 @@ public class WifiScoreReportTest extends WifiBaseTest { mLooper.dispatchAll(); verify(mBssidBlocklistMonitor, never()).blockBssidForDurationMs(any(), any(), anyLong()); } + + /** + * Verify that the initial score value in WifiInfo is the max when onStart is called. + */ + @Test + public void testOnStartInitialScoreInWifiInfoIsMaxScore() throws Exception { + when(mNetwork.getNetId()).thenReturn(TEST_NETWORK_ID); + mWifiScoreReport.startConnectedNetworkScorer(TEST_NETWORK_ID); + mWifiScoreReport.setWifiConnectedNetworkScorer(mAppBinder, mWifiConnectedNetworkScorer); + assertEquals(ConnectedScore.WIFI_MAX_SCORE, mWifiInfo.getScore()); + } } |