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

Commit 39ac994e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid confusing errors "Launcher pid should be 0" when test setup...

Merge "Avoid confusing errors "Launcher pid should be 0" when test setup fails" into ub-launcher3-master
parents a315ec5f fcaab044
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {

    @Before
    public void setUp() throws Exception {
        mLauncherPid = 0;
        super.setUp();
        TaplTestsLauncher3.initialize(this);
        mLauncherPid = mLauncher.getPid();
@@ -63,8 +64,10 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {

    @After
    public void teardown() {
        if (mLauncherPid != 0) {
            assertEquals("Launcher crashed, pid mismatch:", mLauncherPid, mLauncher.getPid());
        }
    }

    private void startTestApps() throws Exception {
        startAppFast(getAppPackageName());
+5 −2
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {

    @Before
    public void setUp() throws Exception {
        mLauncherPid = 0;
        super.setUp();
        initialize(this);
        mLauncherPid = mLauncher.getPid();
@@ -66,8 +67,10 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {

    @After
    public void teardown() {
        if (mLauncherPid != 0) {
            assertEquals("Launcher crashed, pid mismatch:", mLauncherPid, mLauncher.getPid());
        }
    }

    public static void initialize(AbstractLauncherUiTest test) throws Exception {
        test.clearLauncherData();