Merge "Disable broken tests in slice framework" into tm-qpr-dev

This commit is contained in:
Pinyao Ting
2022-10-27 22:34:58 +00:00
committed by Android (Google) Code Review

View File

@@ -51,6 +51,7 @@ import com.android.server.UiServiceTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -87,6 +88,7 @@ public class SliceManagerServiceTest extends UiServiceTestCase {
LocalServices.removeServiceForTest(UsageStatsManagerInternal.class);
}
@Ignore("b/253871109")
@Test
public void testAddPinCreatesPinned() throws RemoteException {
grantSlicePermission();
@@ -97,6 +99,7 @@ public class SliceManagerServiceTest extends UiServiceTestCase {
verify(mService, times(1)).createPinnedSlice(eq(maybeAddUserId(TEST_URI, 0)), anyString());
}
@Ignore("b/253871109")
@Test
public void testRemovePinDestroysPinned() throws RemoteException {
grantSlicePermission();
@@ -109,6 +112,7 @@ public class SliceManagerServiceTest extends UiServiceTestCase {
verify(mCreatedSliceState, never()).destroy();
}
@Ignore("b/253871109")
@Test
public void testCheckAutoGrantPermissions() throws RemoteException {
String[] testPerms = new String[] {
@@ -129,12 +133,14 @@ public class SliceManagerServiceTest extends UiServiceTestCase {
verify(mContextSpy).checkPermission(eq("perm2"), eq(Process.myPid()), eq(Process.myUid()));
}
@Ignore("b/253871109")
@Test(expected = IllegalStateException.class)
public void testNoPinThrow() throws Exception {
grantSlicePermission();
mService.getPinnedSpecs(TEST_URI, "pkg");
}
@Ignore("b/253871109")
@Test
public void testGetPinnedSpecs() throws Exception {
grantSlicePermission();