Run UiThreadTest in LauncherMultivalentJUnit

Additionally migrating DisplayControllerTest to multivalent

Flag: TEST_ONLY
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Change-Id: I9ff89218947b32f79b39bb0e6dd4beabec3b7369
This commit is contained in:
Sihua Ma
2024-05-29 18:10:27 +00:00
parent bb2436ce0b
commit 3b2a136272
2 changed files with 3 additions and 4 deletions

View File

@@ -27,7 +27,6 @@ import android.view.Display
import android.view.Surface
import androidx.test.annotation.UiThreadTest
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.launcher3.LauncherPrefs
import com.android.launcher3.LauncherPrefs.Companion.TASKBAR_PINNING
@@ -55,7 +54,7 @@ import org.mockito.stubbing.Answer
/** Unit tests for {@link DisplayController} */
@SmallTest
@RunWith(AndroidJUnit4::class)
@RunWith(LauncherMultivalentJUnit::class)
class DisplayControllerTest {
private val appContext: Context = ApplicationProvider.getApplicationContext()

View File

@@ -49,7 +49,6 @@ import android.platform.test.flag.junit.SetFlagsRule;
import android.view.View;
import androidx.test.annotation.UiThreadTest;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import com.android.launcher3.allapps.PrivateProfileManager;
@@ -60,6 +59,7 @@ import com.android.launcher3.pm.UserCache;
import com.android.launcher3.util.ApiWrapper;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.LauncherModelHelper.SandboxModelContext;
import com.android.launcher3.util.LauncherMultivalentJUnit;
import com.android.launcher3.util.TestSandboxModelContextWrapper;
import com.android.launcher3.util.UserIconInfo;
import com.android.launcher3.views.BaseDragLayer;
@@ -76,7 +76,7 @@ import org.mockito.MockitoAnnotations;
import java.util.ArrayList;
@SmallTest
@RunWith(AndroidJUnit4.class)
@RunWith(LauncherMultivalentJUnit.class)
public class SystemShortcutTest {
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(DEVICE_DEFAULT);
private static final UserHandle PRIVATE_HANDLE = new UserHandle(11);