diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-12-02 10:49:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-12-02 10:49:43 +0000 |
commit | e19df95315a30bad37d1631d9eb005b9c19a8a7c (patch) | |
tree | 231b1d24a39a610d778b97e06718355029ce5889 /tests | |
parent | 632770873744c3188630876df9266b2462ffe81d (diff) | |
parent | 9b6a502838e612fd4d9c03f61912b6b3543001a5 (diff) |
Merge "wifi: Remove usages of SystemProperites.set"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java | 33 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java | 14 |
2 files changed, 6 insertions, 41 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 7946ecbc0..48d016ae9 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -1915,39 +1915,6 @@ public class ClientModeImplTest extends WifiBaseTest { .count()); } - /** Verifies that enabling verbose logging sets the hal log property in eng builds. */ - @Test - public void enablingVerboseLoggingSetsHalLogPropertyInEngBuilds() { - reset(mPropertyService); // Ignore calls made in setUp() - when(mBuildProperties.isEngBuild()).thenReturn(true); - when(mBuildProperties.isUserdebugBuild()).thenReturn(false); - when(mBuildProperties.isUserBuild()).thenReturn(false); - mCmi.enableVerboseLogging(1); - verify(mPropertyService).set("log.tag.WifiHAL", "V"); - } - - /** Verifies that enabling verbose logging sets the hal log property in userdebug builds. */ - @Test - public void enablingVerboseLoggingSetsHalLogPropertyInUserdebugBuilds() { - reset(mPropertyService); // Ignore calls made in setUp() - when(mBuildProperties.isUserdebugBuild()).thenReturn(true); - when(mBuildProperties.isEngBuild()).thenReturn(false); - when(mBuildProperties.isUserBuild()).thenReturn(false); - mCmi.enableVerboseLogging(1); - verify(mPropertyService).set("log.tag.WifiHAL", "V"); - } - - /** Verifies that enabling verbose logging does NOT set the hal log property in user builds. */ - @Test - public void enablingVerboseLoggingDoeNotSetHalLogPropertyInUserBuilds() { - reset(mPropertyService); // Ignore calls made in setUp() - when(mBuildProperties.isUserBuild()).thenReturn(true); - when(mBuildProperties.isEngBuild()).thenReturn(false); - when(mBuildProperties.isUserdebugBuild()).thenReturn(false); - mCmi.enableVerboseLogging(1); - verify(mPropertyService, never()).set(anyString(), anyString()); - } - private long testGetSupportedFeaturesCaseForRtt(long supportedFeatures, boolean rttDisabled) { AsyncChannel channel = mock(AsyncChannel.class); Message reply = Message.obtain(); diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java index ffc53d99c..5615e4ffa 100644 --- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java @@ -136,7 +136,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { mISupplicantStaIfaceMockV13; private @Mock Context mContext; private @Mock WifiMonitor mWifiMonitor; - private @Mock PropertyService mPropertyService; + private @Mock FrameworkFacade mFrameworkFacade; private @Mock SupplicantStaNetworkHal mSupplicantStaNetworkMock; private @Mock WifiNative.SupplicantDeathEventHandler mSupplicantHalDeathHandler; private @Mock Clock mClock; @@ -170,7 +170,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { private class SupplicantStaIfaceHalSpy extends SupplicantStaIfaceHal { SupplicantStaIfaceHalSpy() { - super(mContext, mWifiMonitor, mPropertyService, + super(mContext, mWifiMonitor, mFrameworkFacade, mHandler, mClock); } @@ -1466,8 +1466,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { public void testStartDaemonV1_0() throws Exception { executeAndValidateInitializationSequence(); assertTrue(mDut.startDaemon()); - verify(mPropertyService).set( - SupplicantStaIfaceHal.INIT_START_PROPERTY, SupplicantStaIfaceHal.INIT_SERVICE_NAME); + verify(mFrameworkFacade).startSupplicant(); } /** @@ -1479,7 +1478,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { executeAndValidateInitializationSequenceV1_1(false, false); assertTrue(mDut.startDaemon()); - verify(mPropertyService, never()).set(any(), any()); + verify(mFrameworkFacade, never()).startSupplicant(); } /** @@ -1489,8 +1488,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { public void testTerminateV1_0() throws Exception { executeAndValidateInitializationSequence(); mDut.terminate(); - verify(mPropertyService).set( - SupplicantStaIfaceHal.INIT_STOP_PROPERTY, SupplicantStaIfaceHal.INIT_SERVICE_NAME); + verify(mFrameworkFacade).stopSupplicant(); } /** @@ -1502,7 +1500,7 @@ public class SupplicantStaIfaceHalTest extends WifiBaseTest { executeAndValidateInitializationSequenceV1_1(false, false); mDut.terminate(); - verify(mPropertyService, never()).set(any(), any()); + verify(mFrameworkFacade, never()).stopSupplicant(); verify(mISupplicantMockV1_1).terminate(); } |