Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72fddba8 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by android-build-merger
Browse files

Merge "Enabling debug tracing for all UI tests" into ub-launcher3-qt-qpr1-dev

am: 846656f1

Change-Id: Ie40cc1d55d40ffefe6c1b2d3588b03ff92d2cb38
parents c6c63706 846656f1
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -118,7 +118,6 @@ public class NavigationModeSwitchRule implements TestRule {
                        assertTrue("Couldn't set overlay",
                        assertTrue("Couldn't set overlay",
                                setActiveOverlay(prevOverlayPkg, originalMode));
                                setActiveOverlay(prevOverlayPkg, originalMode));
                    }
                    }
                    mLauncher.disableDebugTracing();
                }
                }


                private void evaluateWithThreeButtons() throws Throwable {
                private void evaluateWithThreeButtons() throws Throwable {
+0 −2
Original line number Original line Diff line number Diff line
@@ -97,7 +97,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
    @Test
    @Test
    @PortraitLandscape
    @PortraitLandscape
    public void testOverview() throws Exception {
    public void testOverview() throws Exception {
        mLauncher.enableDebugTracing();
        startTestApps();
        startTestApps();
        Overview overview = mLauncher.pressHome().switchToOverview();
        Overview overview = mLauncher.pressHome().switchToOverview();
        assertTrue("Launcher internal state didn't switch to Overview",
        assertTrue("Launcher internal state didn't switch to Overview",
@@ -177,7 +176,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
        executeOnLauncher(
        executeOnLauncher(
                launcher -> assertEquals("Still have tasks after dismissing all",
                launcher -> assertEquals("Still have tasks after dismissing all",
                        0, getTaskCount(launcher)));
                        0, getTaskCount(launcher)));
        mLauncher.disableDebugTracing();
    }
    }


    private int getCurrentOverviewPage(Launcher launcher) {
    private int getCurrentOverviewPage(Launcher launcher) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -112,6 +112,7 @@ public abstract class AbstractLauncherUiTest {
                            launcher ->
                            launcher ->
                                    checkLauncherIntegrity(launcher, containerType)));
                                    checkLauncherIntegrity(launcher, containerType)));
        }
        }
        mLauncher.enableDebugTracing();
    }
    }


    protected final LauncherActivityRule mActivityMonitor = new LauncherActivityRule();
    protected final LauncherActivityRule mActivityMonitor = new LauncherActivityRule();
@@ -202,6 +203,7 @@ public abstract class AbstractLauncherUiTest {
            resetLoaderState();
            resetLoaderState();
        } else {
        } else {
            clearPackageData(mDevice.getLauncherPackageName());
            clearPackageData(mDevice.getLauncherPackageName());
            mLauncher.enableDebugTracing();
        }
        }
    }
    }


+0 −6
Original line number Original line Diff line number Diff line
@@ -173,7 +173,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {


    @Test
    @Test
    public void testWorkspace() throws Exception {
    public void testWorkspace() throws Exception {
        mLauncher.enableDebugTracing();
        final Workspace workspace = mLauncher.getWorkspace();
        final Workspace workspace = mLauncher.getWorkspace();


        // Test that ensureWorkspaceIsScrollable adds a page by dragging an icon there.
        // Test that ensureWorkspaceIsScrollable adds a page by dragging an icon there.
@@ -209,7 +208,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
        // Test starting a workspace app.
        // Test starting a workspace app.
        final AppIcon app = workspace.getWorkspaceAppIcon("Chrome");
        final AppIcon app = workspace.getWorkspaceAppIcon("Chrome");
        assertNotNull("No Chrome app in workspace", app);
        assertNotNull("No Chrome app in workspace", app);
        mLauncher.disableDebugTracing();
    }
    }


    public static void runIconLaunchFromAllAppsTest(AbstractLauncherUiTest test, AllApps allApps) {
    public static void runIconLaunchFromAllAppsTest(AbstractLauncherUiTest test, AllApps allApps) {
@@ -300,7 +298,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
    @Test
    @Test
    @PortraitLandscape
    @PortraitLandscape
    public void testDragAppIcon() throws Throwable {
    public void testDragAppIcon() throws Throwable {
        mLauncher.enableDebugTracing();
        // 1. Open all apps and wait for load complete.
        // 1. Open all apps and wait for load complete.
        // 2. Drag icon to homescreen.
        // 2. Drag icon to homescreen.
        // 3. Verify that the icon works on homescreen.
        // 3. Verify that the icon works on homescreen.
@@ -317,13 +314,11 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
                "Launcher activity is the top activity; expecting another activity to be the top "
                "Launcher activity is the top activity; expecting another activity to be the top "
                        + "one",
                        + "one",
                isInBackground(launcher)));
                isInBackground(launcher)));
        mLauncher.disableDebugTracing();
    }
    }


    @Test
    @Test
    @PortraitLandscape
    @PortraitLandscape
    public void testDragShortcut() throws Throwable {
    public void testDragShortcut() throws Throwable {
        mLauncher.enableDebugTracing();
        // 1. Open all apps and wait for load complete.
        // 1. Open all apps and wait for load complete.
        // 2. Find the app and long press it to show shortcuts.
        // 2. Find the app and long press it to show shortcuts.
        // 3. Press icon center until shortcuts appear
        // 3. Press icon center until shortcuts appear
@@ -343,7 +338,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
        } finally {
        } finally {
            allApps.unfreeze();
            allApps.unfreeze();
        }
        }
        mLauncher.disableDebugTracing();
    }
    }


    public static String getAppPackageName() {
    public static String getAppPackageName() {