| Index: chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivityTest.java
|
| diff --git a/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java b/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivityTest.java
|
| similarity index 92%
|
| rename from chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java
|
| rename to chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivityTest.java
|
| index db4601d11e1a0a2352b62cb813819fae8f340260..7695a794d471958af9196b40f5bab9b3c65d83a9 100644
|
| --- a/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java
|
| +++ b/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivityTest.java
|
| @@ -29,7 +29,7 @@ import org.chromium.webapk.test.WebApkTestHelper;
|
| */
|
| @RunWith(LocalRobolectricTestRunner.class)
|
| @Config(manifest = Config.NONE, packageName = WebApkTestHelper.WEBAPK_PACKAGE_NAME)
|
| -public class MainActivityTest {
|
| +public class RecentsPlaceholderActivityTest {
|
| private static final String HOST_BROWSER_PACKAGE_NAME = "truly.random";
|
|
|
| private ShadowApplication mShadowApplication;
|
| @@ -59,12 +59,12 @@ public class MainActivityTest {
|
|
|
| // Make intents to Google Play not throw ActivityNotFoundException.
|
| mPackageManager.addResolveInfoForIntent(
|
| - MainActivity.createInstallIntent(HOST_BROWSER_PACKAGE_NAME),
|
| + LaunchWebApkHelper.createInstallIntent(HOST_BROWSER_PACKAGE_NAME),
|
| newResolveInfo("google.play"));
|
|
|
| - Robolectric.buildActivity(MainActivity.class).create();
|
| -
|
| + Robolectric.buildActivity(RecentsPlaceholderActivity.class).create();
|
| Intent startActivityIntent = mShadowApplication.getNextStartedActivity();
|
| +
|
| Assert.assertNotNull(startActivityIntent);
|
| Assert.assertTrue(startActivityIntent.getDataString().startsWith("market://"));
|
| }
|
| @@ -84,9 +84,9 @@ public class MainActivityTest {
|
| metaData.putString(WebApkMetaDataKeys.START_URL, "http://random.org");
|
| WebApkTestHelper.registerWebApkWithMetaData(metaData);
|
|
|
| - Robolectric.buildActivity(MainActivity.class).create();
|
| -
|
| + Robolectric.buildActivity(RecentsPlaceholderActivity.class).create();
|
| Intent startActivityIntent = mShadowApplication.getNextStartedActivity();
|
| +
|
| Assert.assertNull(startActivityIntent);
|
| }
|
|
|
|
|