mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Stress test for starting Launcher via gestures
Ideally, we should have a race condition tests, but with the new single-threaded model, this requires more work. This is a temporary measure. Change-Id: Ie180883f4b186e4c4087dc77fed1e4d946402465
This commit is contained in:
@@ -37,6 +37,9 @@ import org.junit.runner.RunWith;
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
|
||||
|
||||
static final int STRESS_REPEAT_COUNT = 10;
|
||||
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
@@ -79,4 +82,28 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
|
||||
closeLauncherActivity();
|
||||
mLauncher.getBackground().switchToOverview();
|
||||
}
|
||||
|
||||
@Test
|
||||
@QuickstepOnOff
|
||||
public void testStressPressHome() {
|
||||
for (int i = 0; i < STRESS_REPEAT_COUNT; ++i) {
|
||||
// Destroy Launcher activity.
|
||||
closeLauncherActivity();
|
||||
|
||||
// The test action.
|
||||
mLauncher.pressHome();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@QuickstepOnOff
|
||||
public void testStressSwipeToOverview() {
|
||||
for (int i = 0; i < STRESS_REPEAT_COUNT; ++i) {
|
||||
// Destroy Launcher activity.
|
||||
closeLauncherActivity();
|
||||
|
||||
// The test action.
|
||||
mLauncher.getBackground().switchToOverview();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user