diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-08-08 22:41:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-08-08 22:41:18 +0000 |
commit | 371e461a05445394c23c7f537aa6ffcb7f2a5708 (patch) | |
tree | ad03764dfe29e11735c664703c4e6158f337eb23 /tests | |
parent | 80ab05f53c0e174a18350fc39d5e28e6cdcd564d (diff) | |
parent | edc5e98a08c6a0001624d149b656e51076bd34c8 (diff) |
Merge "WifiServiceImplTest: Reenable disabled tests"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index f4a97c2b0..4eedf8384 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -104,7 +104,6 @@ import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatcher; @@ -908,7 +907,6 @@ public class WifiServiceImplTest { /** * Ensure we do not allow unpermitted callers to get the wifi ap state. */ - @Ignore @Test public void testGetWifiApEnabledPermissionDenied() { // we should not be able to get the state @@ -1056,7 +1054,6 @@ public class WifiServiceImplTest { /** * Ensure that we handle scan request failure when posting the runnable to handler fails. */ - @Ignore @Test public void testStartScanFailureInRunWithScissors() { setupClientModeImplHandlerForRunWithScissors(); @@ -1162,7 +1159,6 @@ public class WifiServiceImplTest { /** * Ensure that we handle scan results failure when posting the runnable to handler fails. */ - @Ignore @Test public void testGetScanResultsFailureInRunWithScissors() { setupClientModeImplHandlerForRunWithScissors(); @@ -1553,7 +1549,6 @@ public class WifiServiceImplTest { /** * Verify that wifi service registers for callers BinderDeath event */ - @Ignore @Test public void registersForBinderDeathOnRegisterSoftApCallback() throws Exception { final int callbackIdentifier = 1; @@ -2274,7 +2269,6 @@ public class WifiServiceImplTest { * Verify that a call to {@link WifiServiceImpl#restoreSupplicantBackupData(byte[], byte[])} is * only allowed from callers with the signature only NETWORK_SETTINGS permission. */ - @Ignore @Test(expected = SecurityException.class) public void testRestoreSupplicantBackupDataNotApprovedCaller() { doThrow(new SecurityException()).when(mContext) @@ -2302,12 +2296,14 @@ public class WifiServiceImplTest { * Verify that a call to {@link WifiServiceImpl#enableVerboseLogging(int)} is allowed from * callers with the signature only NETWORK_SETTINGS permission. */ - @Ignore("TODO: Investigate failure") @Test public void testEnableVerboseLoggingWithNetworkSettingsPermission() { doNothing().when(mContext) .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), eq("WifiService")); + // Vebose logging is enabled first in the constructor for WifiServiceImpl, so reset + // before invocation. + reset(mClientModeImpl); mWifiServiceImpl.enableVerboseLogging(1); verify(mClientModeImpl).enableVerboseLogging(anyInt()); } @@ -2321,6 +2317,9 @@ public class WifiServiceImplTest { doThrow(new SecurityException()).when(mContext) .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), eq("WifiService")); + // Vebose logging is enabled first in the constructor for WifiServiceImpl, so reset + // before invocation. + reset(mClientModeImpl); mWifiServiceImpl.enableVerboseLogging(1); verify(mClientModeImpl, never()).enableVerboseLogging(anyInt()); } |