Merge "Add logs to determine if grid positions incorrect" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f382308ca8
@@ -156,6 +156,7 @@ public final class TestProtocol {
|
||||
public static final String WORK_TAB_MISSING = "b/243688989";
|
||||
public static final String TWO_TASKBAR_LONG_CLICKS = "b/262282528";
|
||||
public static final String FLAKY_ACTIVITY_COUNT = "b/260260325";
|
||||
public static final String ICON_MISSING = "b/282963545";
|
||||
|
||||
public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
|
||||
public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.android.launcher3.ui;
|
||||
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING;
|
||||
import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
|
||||
@@ -603,6 +604,8 @@ public abstract class AbstractLauncherUiTest {
|
||||
|
||||
protected HomeAppIcon createShortcutIfNotExist(String name, int cellX, int cellY) {
|
||||
HomeAppIcon homeAppIcon = mLauncher.getWorkspace().tryGetWorkspaceAppIcon(name);
|
||||
Log.d(ICON_MISSING, "homeAppIcon: " + homeAppIcon + " name: " + name +
|
||||
" cell: " + cellX + ", " + cellY);
|
||||
if (homeAppIcon == null) {
|
||||
HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
|
||||
@@ -18,6 +18,8 @@ package com.android.launcher3.ui;
|
||||
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -579,6 +581,11 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
|
||||
@PlatinumTest(focusArea = "launcher")
|
||||
public void getIconsPosition_afterIconRemoved_notContained() throws IOException {
|
||||
Point[] gridPositions = getCornersAndCenterPositions();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Point p : gridPositions) {
|
||||
sb.append(p).append(", ");
|
||||
}
|
||||
Log.d(ICON_MISSING, "allGridPositions: " + sb);
|
||||
createShortcutIfNotExist(STORE_APP_NAME, gridPositions[0]);
|
||||
createShortcutIfNotExist(MAPS_APP_NAME, gridPositions[1]);
|
||||
installDummyAppAndWaitForUIUpdate();
|
||||
|
||||
Reference in New Issue
Block a user