Saving artifacts for failing initialization of PortraitLandscapeRunner
Test: presubmit Flag: N/A Bug: 321772674 Change-Id: Ifa865224ebdae160b4fbc75b587d893ac6bfd847
This commit is contained in:
1 parent
f114ec5b26
commit
ee39f393e7
1 file changed
+16
-9
@@ -4,6 +4,7 @@ import android.util.Log;
|
||||
import android.view.Surface;
|
||||
|
||||
import com.android.launcher3.tapl.TestHelpers;
|
||||
import com.android.launcher3.util.rule.FailureWatcher;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
|
||||
import org.junit.rules.TestRule;
|
||||
@@ -45,17 +46,23 @@ public class PortraitLandscapeRunner implements TestRule {
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
try {
|
||||
// we expect to begin unlocked...
|
||||
AbstractLauncherUiTest.verifyKeyguardInvisible();
|
||||
try {
|
||||
// we expect to begin unlocked...
|
||||
AbstractLauncherUiTest.verifyKeyguardInvisible();
|
||||
|
||||
mTest.mDevice.pressHome();
|
||||
mTest.waitForLauncherCondition("Launcher activity wasn't created",
|
||||
launcher -> launcher != null,
|
||||
TimeUnit.SECONDS.toMillis(20));
|
||||
mTest.mDevice.pressHome();
|
||||
mTest.waitForLauncherCondition("Launcher activity wasn't created",
|
||||
launcher -> launcher != null,
|
||||
TimeUnit.SECONDS.toMillis(20));
|
||||
|
||||
mTest.executeOnLauncher(launcher ->
|
||||
launcher.getRotationHelper().forceAllowRotationForTesting(
|
||||
true));
|
||||
mTest.executeOnLauncher(launcher ->
|
||||
launcher.getRotationHelper().forceAllowRotationForTesting(
|
||||
true));
|
||||
|
||||
} catch (Throwable e) {
|
||||
FailureWatcher.onError(mTest.mLauncher, description, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
evaluateInPortrait();
|
||||
evaluateInLandscape();
|
||||
|
||||
Reference in new issue
Block a user