Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java

Issue 2969143002: Fixes redirects to external apps when navigating from PWA. (Closed)
Patch Set: Removed TopActivityListener Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
index 99595a36db593a80a501b25b066dd1c6f9f698da..9c23152d2da281f4519eeec348447351e356f3f6 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
@@ -15,6 +15,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.chromium.base.ApplicationStatus;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;
@@ -45,9 +46,6 @@ public class WebApkIntegrationTest {
@Rule
public final NativeLibraryTestRule mNativeLibraryTestRule = new NativeLibraryTestRule();
- @Rule
- public final TopActivityListener activityListener = new TopActivityListener();
-
private static final long STARTUP_TIMEOUT = ScalableTimeout.scaleTimeout(10000);
private EmbeddedTestServer mTestServer;
@@ -126,7 +124,8 @@ public class WebApkIntegrationTest {
CriteriaHelper.pollUiThread(new Criteria() {
@Override
public boolean isSatisfied() {
- ChromeActivity activity = (ChromeActivity) activityListener.getMostRecentActivity();
+ ChromeActivity activity =
+ (ChromeActivity) ApplicationStatus.getLastTrackedFocusedActivity();
return activity instanceof CustomTabActivity
&& activity.getActivityTab() != null
// Dropping the TLD as Google can redirect to a local site.

Powered by Google App Engine
This is Rietveld 408576698