mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Enabling some tests in landscape mode
Bug: 121280703 Change-Id: I285638d832594d5fed26ee812737a4356b110899
This commit is contained in:
@@ -41,7 +41,6 @@ import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -69,34 +68,22 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testWidgetConfig() throws Throwable {
|
||||
runTest(false, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // b/121280703
|
||||
public void testWidgetConfig_rotate() throws Throwable {
|
||||
runTest(true, true);
|
||||
runTest(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testConfigCancelled() throws Throwable {
|
||||
runTest(false, false);
|
||||
runTest(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // b/121280703
|
||||
public void testConfigCancelled_rotate() throws Throwable {
|
||||
runTest(true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rotateConfig should the config screen be rotated
|
||||
* @param acceptConfig accept the config activity
|
||||
*/
|
||||
private void runTest(boolean rotateConfig, boolean acceptConfig) throws Throwable {
|
||||
lockRotation(true);
|
||||
|
||||
private void runTest(boolean acceptConfig) throws Throwable {
|
||||
clearHomescreen();
|
||||
mDevice.pressHome();
|
||||
|
||||
@@ -110,13 +97,6 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
|
||||
// Widget id for which the config activity was opened
|
||||
mWidgetId = monitor.getWidgetId();
|
||||
|
||||
if (rotateConfig) {
|
||||
// Rotate the screen and verify that the config activity is recreated
|
||||
monitor = new WidgetConfigStartupMonitor();
|
||||
lockRotation(false);
|
||||
assertEquals(mWidgetId, monitor.getWidgetId());
|
||||
}
|
||||
|
||||
// Verify that the widget id is valid and bound
|
||||
assertNotNull(mAppWidgetManager.getAppWidgetInfo(mWidgetId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user