Loading tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,8 @@ public final class TestProtocol { public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434"; public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466"; public static final String TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE = "b/326073471"; public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890"; public static final String ACTIVITY_NOT_RESUMED_AFTER_BACK = "b/322823209"; public static final String REQUEST_EMULATE_DISPLAY = "emulate-display"; public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display"; Loading tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.WIDGET_CONFIG_NULL_EXTRA_INTENT; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static org.junit.Assert.assertEquals; Loading Loading @@ -529,13 +530,23 @@ public abstract class AbstractLauncherUiTest { @Override public void onReceive(Context context, Intent intent) { Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, intent == null ? "AbstractLauncherUiTest.onReceive(): inputted intent NULL" : "AbstractLauncherUiTest.onReceive(): inputted intent NOT NULL"); mIntent = intent; latch.countDown(); Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, "AbstractLauncherUiTest.onReceive() Countdown Latch started"); } public Intent blockingGetIntent() throws InterruptedException { Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, "AbstractLauncherUiTest.blockingGetIntent()"); latch.await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS); mTargetContext.unregisterReceiver(this); Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, mIntent == null ? "AbstractLauncherUiTest.onReceive(): mIntent NULL" : "AbstractLauncherUiTest.onReceive(): mIntent NOT NULL"); return mIntent; } Loading Loading
tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,8 @@ public final class TestProtocol { public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434"; public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466"; public static final String TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE = "b/326073471"; public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890"; public static final String ACTIVITY_NOT_RESUMED_AFTER_BACK = "b/322823209"; public static final String REQUEST_EMULATE_DISPLAY = "emulate-display"; public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display"; Loading
tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.WIDGET_CONFIG_NULL_EXTRA_INTENT; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static org.junit.Assert.assertEquals; Loading Loading @@ -529,13 +530,23 @@ public abstract class AbstractLauncherUiTest { @Override public void onReceive(Context context, Intent intent) { Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, intent == null ? "AbstractLauncherUiTest.onReceive(): inputted intent NULL" : "AbstractLauncherUiTest.onReceive(): inputted intent NOT NULL"); mIntent = intent; latch.countDown(); Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, "AbstractLauncherUiTest.onReceive() Countdown Latch started"); } public Intent blockingGetIntent() throws InterruptedException { Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, "AbstractLauncherUiTest.blockingGetIntent()"); latch.await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS); mTargetContext.unregisterReceiver(this); Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, mIntent == null ? "AbstractLauncherUiTest.onReceive(): mIntent NULL" : "AbstractLauncherUiTest.onReceive(): mIntent NOT NULL"); return mIntent; } Loading