Remove the initialize method from setUp since is now on being called on the super method.
Bug: 324261526 Test: most Tapl test Flag: NA Change-Id: Icbf9883613069101a3c8428e8e3b02b1eb01dcd0
This commit is contained in:
@@ -29,7 +29,6 @@ import com.android.launcher3.tapl.OverviewTaskMenu;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -41,12 +40,6 @@ public class TaplOverviewIconTest extends AbstractLauncherUiTest {
|
||||
private static final String CALCULATOR_APP_PACKAGE =
|
||||
resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR);
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
@PlatinumTest(focusArea = "launcher")
|
||||
@Test
|
||||
public void testOverviewActionsMenu() {
|
||||
|
||||
@@ -22,7 +22,6 @@ import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUB
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule.Stability;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
|
||||
@@ -40,7 +39,6 @@ public class TaplStartLauncherViaGestureTests extends AbstractQuickStepTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
// b/143488140
|
||||
mLauncher.goHome();
|
||||
// Start an activity where the gestures start.
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.android.launcher3.tapl.KeyboardQuickSwitch;
|
||||
import com.android.launcher3.tapl.LaunchedAppState;
|
||||
import com.android.launcher3.tapl.Taskbar;
|
||||
import com.android.launcher3.taskbar.KeyboardQuickSwitchController;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.Test;
|
||||
@@ -69,7 +68,6 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
|
||||
public void setUp() throws Exception {
|
||||
Assume.assumeTrue(mLauncher.isTablet());
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
startAppFast(CALCULATOR_APP_PACKAGE);
|
||||
startTestActivity(2);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.android.launcher3.tapl.Overview;
|
||||
import com.android.launcher3.tapl.OverviewActions;
|
||||
import com.android.launcher3.tapl.OverviewTask;
|
||||
import com.android.launcher3.tapl.SelectModeButtons;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
@@ -70,7 +69,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
executeOnLauncher(launcher -> {
|
||||
RecentsView recentsView = launcher.getOverviewPanel();
|
||||
recentsView.getPagedViewOrientedState().forceAllowRotationForTesting(true);
|
||||
|
||||
@@ -33,7 +33,6 @@ import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import com.android.launcher3.tapl.Overview;
|
||||
import com.android.launcher3.tapl.Taskbar;
|
||||
import com.android.launcher3.tapl.TaskbarAppIcon;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch;
|
||||
@@ -41,7 +40,6 @@ import com.android.wm.shell.Flags;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -59,7 +57,6 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
|
||||
if (mLauncher.isTablet()) {
|
||||
mLauncher.enableBlockTimeout(true);
|
||||
|
||||
@@ -31,12 +31,10 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation.TrackpadGestureType;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -47,12 +45,6 @@ public class TaplTestsTrackpad extends AbstractQuickStepTest {
|
||||
private static final String READ_DEVICE_CONFIG_PERMISSION =
|
||||
"android.permission.READ_DEVICE_CONFIG";
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
mLauncher.setTrackpadGestureType(TrackpadGestureType.NONE);
|
||||
|
||||
@@ -56,7 +56,6 @@ import com.android.launcher3.tapl.LaunchedAppState;
|
||||
import com.android.launcher3.testcomponent.ListViewService;
|
||||
import com.android.launcher3.testcomponent.ListViewService.SimpleViewsFactory;
|
||||
import com.android.launcher3.testcomponent.TestCommandReceiver;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.TestViewHelpers;
|
||||
import com.android.launcher3.util.Executors;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
@@ -93,8 +92,6 @@ public class TaplViewInflationDuringSwipeUp extends AbstractQuickStepTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
// Workaround for b/142351228, when there are no activities, the system may not destroy the
|
||||
// activity correctly for activities under instrumentation, which can leave two concurrent
|
||||
// activities, which changes the order in which the activities are cleaned up (overlapping
|
||||
@@ -102,7 +99,7 @@ public class TaplViewInflationDuringSwipeUp extends AbstractQuickStepTest {
|
||||
// is started only after starting another app.
|
||||
startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR));
|
||||
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
super.setUp();
|
||||
|
||||
mModel = LauncherAppState.getInstance(mTargetContext).getModel();
|
||||
Executors.MODEL_EXECUTOR.submit(mModel.getModelDbController()::createEmptyDB).get();
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -33,12 +32,6 @@ import org.junit.Test;
|
||||
*/
|
||||
public class TaplAllAppsIconsWorkingTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes sure we can launch an icon from All apps
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,6 @@ import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -40,12 +39,6 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class TaplKeyboardFocusTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllAppsFocusApp() {
|
||||
final HomeAllApps allApps = mLauncher.goHome().switchToAllApps();
|
||||
|
||||
@@ -35,7 +35,6 @@ import com.android.launcher3.tapl.AllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -47,15 +46,6 @@ public class TaplOpenCloseAllAppsTest extends AbstractLauncherUiTest {
|
||||
public static final String READ_DEVICE_CONFIG_PERMISSION =
|
||||
"android.permission.READ_DEVICE_CONFIG";
|
||||
|
||||
/**
|
||||
* Calls static method initialize
|
||||
*/
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure we can go home after pressing the context menu on an Icon on the AllApps.
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.ui.AbstractLauncherUiTest;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -41,12 +40,6 @@ import org.junit.Test;
|
||||
*/
|
||||
public class TaplAppIconMenuTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
private boolean isOptionsPopupVisible(Launcher launcher) {
|
||||
final ArrowPopup<?> popup = launcher.getOptionsPopup();
|
||||
return popup != null && popup.isShown();
|
||||
|
||||
@@ -72,7 +72,7 @@ public class TaplReorderWidgetsTest extends AbstractLauncherUiTest {
|
||||
@Before
|
||||
public void setup() throws Throwable {
|
||||
mWorkspaceBuilder = new TestWorkspaceBuilder(mTargetContext);
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
package com.android.launcher3.dragging;
|
||||
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.GMAIL_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.PHOTOS_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.MAPS_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.PHOTOS_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.STORE_APP_NAME;
|
||||
import static com.android.launcher3.util.TestConstants.AppNames.TEST_APP_NAME;
|
||||
import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL;
|
||||
@@ -44,7 +44,6 @@ import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -59,12 +58,6 @@ import org.junit.Test;
|
||||
*/
|
||||
public class TaplDragTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds two icons to the Workspace and combines them into a folder, then makes sure the icons
|
||||
* are no longer in the Workspace then adds a third one to test adding an icon to an existing
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.android.launcher3.util.TestUtil;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -52,12 +51,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class TaplUninstallRemoveTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes app both built-in and user-installed from the Workspace and makes sure it's no longer
|
||||
* in the Workspace.
|
||||
|
||||
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertNotNull;
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -29,12 +28,6 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class TaplTestsLauncher3Test extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDevicePressMenu() throws Exception {
|
||||
mDevice.pressMenu();
|
||||
|
||||
@@ -37,7 +37,6 @@ import com.android.launcher3.util.rule.TestStabilityRule.Stability;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -52,13 +51,6 @@ public class TaplAddWidgetTest extends AbstractLauncherUiTest {
|
||||
@Rule
|
||||
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();
|
||||
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
@ScreenRecord // b/316910614
|
||||
|
||||
@@ -74,7 +74,6 @@ public class TaplRequestPinItemTest extends AbstractLauncherUiTest {
|
||||
super.setUp();
|
||||
mCallbackAction = UUID.randomUUID().toString();
|
||||
mShortcutId = UUID.randomUUID().toString();
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
import com.android.launcher3.widget.picker.WidgetsFullSheet;
|
||||
import com.android.launcher3.widget.picker.WidgetsRecyclerView;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -42,12 +41,6 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class TaplWidgetPickerTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initialize(this);
|
||||
}
|
||||
|
||||
private WidgetsRecyclerView getWidgetsView(Launcher launcher) {
|
||||
return WidgetsFullSheet.getWidgetsView(launcher);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class TaplThemeIconsTest extends AbstractLauncherUiTest {
|
||||
@Test
|
||||
public void testIconWithoutTheme() throws Exception {
|
||||
setThemeEnabled(false);
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
initialize(this);
|
||||
|
||||
HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
@@ -75,7 +75,7 @@ public class TaplThemeIconsTest extends AbstractLauncherUiTest {
|
||||
@Test
|
||||
public void testShortcutIconWithoutTheme() throws Exception {
|
||||
setThemeEnabled(false);
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
initialize(this);
|
||||
|
||||
HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
@@ -94,7 +94,7 @@ public class TaplThemeIconsTest extends AbstractLauncherUiTest {
|
||||
@Test
|
||||
public void testIconWithTheme() throws Exception {
|
||||
setThemeEnabled(true);
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
initialize(this);
|
||||
|
||||
HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
@@ -112,7 +112,7 @@ public class TaplThemeIconsTest extends AbstractLauncherUiTest {
|
||||
@Test
|
||||
public void testShortcutIconWithTheme() throws Exception {
|
||||
setThemeEnabled(true);
|
||||
AbstractLauncherUiTest.initialize(this);
|
||||
initialize(this);
|
||||
|
||||
HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
|
||||
Reference in New Issue
Block a user