Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTestCase.java +15 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ import static org.junit.Assume.assumeTrue; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.display.DisplayManager; import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.TestableContext; import androidx.test.platform.app.InstrumentationRegistry; Loading @@ -31,6 +34,8 @@ import com.android.internal.protolog.ProtoLog; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.mockito.MockitoAnnotations; /** Loading @@ -38,6 +43,16 @@ import org.mockito.MockitoAnnotations; */ public abstract class ShellTestCase { @ClassRule public static final SetFlagsRule.ClassRule mClassRule = new SetFlagsRule.ClassRule(); @Rule public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule public final SetFlagsRule mSetFlagsRule = mClassRule.createSetFlagsRule(); protected TestableContext mContext; private PackageManager mPm; Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java +0 −5 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import android.graphics.Point; import android.graphics.Rect; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.window.TransitionInfo; Loading @@ -55,7 +54,6 @@ import com.google.testing.junit.testparameterinjector.TestParameter; import com.google.testing.junit.testparameterinjector.TestParameterInjector; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading @@ -73,9 +71,6 @@ import java.util.Arrays; @RunWith(TestParameterInjector.class) public class ActivityEmbeddingAnimationRunnerTests extends ActivityEmbeddingAnimationTestBase { @Rule public SetFlagsRule mRule = new SetFlagsRule(); @Before public void setup() { super.setUp(); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingControllerTests.java +0 −5 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.animation.ValueAnimator; import android.graphics.Rect; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.view.SurfaceControl; import android.window.TransitionInfo; Loading @@ -46,7 +45,6 @@ import com.android.window.flags.Flags; import com.android.wm.shell.transition.TransitionInfoBuilder; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -64,9 +62,6 @@ public class ActivityEmbeddingControllerTests extends ActivityEmbeddingAnimation private static final Rect EMBEDDED_LEFT_BOUNDS = new Rect(0, 0, 500, 500); private static final Rect EMBEDDED_RIGHT_BOUNDS = new Rect(500, 0, 1000, 500); @Rule public SetFlagsRule mRule = new SetFlagsRule(); @Before public void setup() { super.setUp(); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +0 −5 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ import android.os.IBinder; import android.os.RemoteCallback; import android.os.RemoteException; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.view.IRemoteAnimationRunner; Loading Loading @@ -91,7 +90,6 @@ import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading Loading @@ -152,9 +150,6 @@ public class BackAnimationControllerTest extends ShellTestCase { private BackAnimationController.BackTransitionHandler mBackTransitionHandler; @Rule public SetFlagsRule mSetflagsRule = new SetFlagsRule(); @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackProgressAnimatorTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.window.BackProgressAnimator; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; import com.android.wm.shell.ShellTestCase; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -42,7 +44,7 @@ import java.util.concurrent.TimeUnit; @SmallTest @TestableLooper.RunWithLooper @RunWith(AndroidTestingRunner.class) public class BackProgressAnimatorTest { public class BackProgressAnimatorTest extends ShellTestCase { private BackProgressAnimator mProgressAnimator; private BackEvent mReceivedBackEvent; private float mTargetProgress = 0.5f; Loading Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTestCase.java +15 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ import static org.junit.Assume.assumeTrue; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.display.DisplayManager; import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.TestableContext; import androidx.test.platform.app.InstrumentationRegistry; Loading @@ -31,6 +34,8 @@ import com.android.internal.protolog.ProtoLog; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.mockito.MockitoAnnotations; /** Loading @@ -38,6 +43,16 @@ import org.mockito.MockitoAnnotations; */ public abstract class ShellTestCase { @ClassRule public static final SetFlagsRule.ClassRule mClassRule = new SetFlagsRule.ClassRule(); @Rule public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule public final SetFlagsRule mSetFlagsRule = mClassRule.createSetFlagsRule(); protected TestableContext mContext; private PackageManager mPm; Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java +0 −5 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import android.graphics.Point; import android.graphics.Rect; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.window.TransitionInfo; Loading @@ -55,7 +54,6 @@ import com.google.testing.junit.testparameterinjector.TestParameter; import com.google.testing.junit.testparameterinjector.TestParameterInjector; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading @@ -73,9 +71,6 @@ import java.util.Arrays; @RunWith(TestParameterInjector.class) public class ActivityEmbeddingAnimationRunnerTests extends ActivityEmbeddingAnimationTestBase { @Rule public SetFlagsRule mRule = new SetFlagsRule(); @Before public void setup() { super.setUp(); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingControllerTests.java +0 −5 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.animation.ValueAnimator; import android.graphics.Rect; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.view.SurfaceControl; import android.window.TransitionInfo; Loading @@ -46,7 +45,6 @@ import com.android.window.flags.Flags; import com.android.wm.shell.transition.TransitionInfoBuilder; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -64,9 +62,6 @@ public class ActivityEmbeddingControllerTests extends ActivityEmbeddingAnimation private static final Rect EMBEDDED_LEFT_BOUNDS = new Rect(0, 0, 500, 500); private static final Rect EMBEDDED_RIGHT_BOUNDS = new Rect(500, 0, 1000, 500); @Rule public SetFlagsRule mRule = new SetFlagsRule(); @Before public void setup() { super.setUp(); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +0 −5 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ import android.os.IBinder; import android.os.RemoteCallback; import android.os.RemoteException; import android.platform.test.annotations.EnableFlags; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.view.IRemoteAnimationRunner; Loading Loading @@ -91,7 +90,6 @@ import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading Loading @@ -152,9 +150,6 @@ public class BackAnimationControllerTest extends ShellTestCase { private BackAnimationController.BackTransitionHandler mBackTransitionHandler; @Rule public SetFlagsRule mSetflagsRule = new SetFlagsRule(); @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackProgressAnimatorTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.window.BackProgressAnimator; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; import com.android.wm.shell.ShellTestCase; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -42,7 +44,7 @@ import java.util.concurrent.TimeUnit; @SmallTest @TestableLooper.RunWithLooper @RunWith(AndroidTestingRunner.class) public class BackProgressAnimatorTest { public class BackProgressAnimatorTest extends ShellTestCase { private BackProgressAnimator mProgressAnimator; private BackEvent mReceivedBackEvent; private float mTargetProgress = 0.5f; Loading