Commit 3279b116 authored by Michael Thiessen's avatar Michael Thiessen Committed by Chromium LUCI CQ

More deflaking of TabsOpenedFromExternalAppTest

On L, before this change (using startActivity()), instead of launching
the Activity, Android launches the Android Settings page for Chrome...
I couldn't figure out why.
Also, with or without these added flags, startActivitySync errors out,
even though it does actually work. I also have no explanation for this.
However, after 50 runs each of the 4 flaky tests I've had zero failures
now on my L device with these changes.

Bug: 1153712
Change-Id: I95b9f8d3e4f2013b25429c6fd6ee3afbb43c5618
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2583084
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835731}
parent bcc96ac8
......@@ -58,6 +58,8 @@ public class ChromeTabbedActivityTestRule extends ChromeActivityTestRule<ChromeT
Intent launchIntent = getActivity().getPackageManager().getLaunchIntentForPackage(
getActivity().getPackageName());
launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getActivity().startActivity(launchIntent, noAnimationLaunchOptions());
ApplicationTestUtils.waitForActivityState(getActivity(), Stage.RESUMED);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment