Commit e81fab49 authored by Dominick Ng's avatar Dominick Ng Committed by Commit Bot

Enable ExperimentalAppBanners by default on Android.

BUG=782120,811578

Change-Id: I240ed465ddab68c363fdbbac99c86ccd3ffd0194
Reviewed-on: https://chromium-review.googlesource.com/996833Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548369}
parent 0a654e96
......@@ -515,7 +515,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledEventModalWebAppBannerBrowserTab() throws Exception {
triggerModalWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(
......@@ -531,7 +530,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledEventModalWebAppBannerCustomTab() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -551,7 +549,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledModalNativeAppBannerBrowserTab() throws Exception {
triggerModalNativeAppBanner(mTabbedActivityTestRule,
WebappTestPage.getNonServiceWorkerUrlWithManifestAndAction(mTestServer,
......@@ -568,7 +565,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledModalNativeAppBannerCustomTab() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -590,7 +586,6 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedModalWebAppBannerResolvesUserChoice() throws Exception {
triggerModalWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(
......@@ -608,7 +603,6 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedModalNativeAppBannerResolveUserChoice() throws Exception {
triggerModalNativeAppBanner(mTabbedActivityTestRule,
WebappTestPage.getNonServiceWorkerUrlWithManifestAndAction(
......@@ -626,7 +620,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testModalNativeAppBannerCanBeTriggeredMultipleTimesBrowserTab() throws Exception {
triggerModalBannerMultipleTimes(mTabbedActivityTestRule,
WebappTestPage.getNonServiceWorkerUrlWithManifestAndAction(
......@@ -637,7 +630,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testModalNativeAppBannerCanBeTriggeredMultipleTimesCustomTab() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -653,7 +645,6 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testModalWebAppBannerCanBeTriggeredMultipleTimesBrowserTab() throws Exception {
triggerModalBannerMultipleTimes(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(
......@@ -664,7 +655,6 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("enable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testModalWebAppBannerCanBeTriggeredMultipleTimesCustomTab() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -680,6 +670,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testFullNativeInstallPathwayFromId() throws Exception {
// Set the prompt handler so that the userChoice promise resolves and updates the title.
runFullNativeInstallPathway(
......@@ -691,6 +682,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testFullNativeInstallPathwayFromUrl() throws Exception {
runFullNativeInstallPathway(
WebappTestPage.getNonServiceWorkerUrlWithManifestAndAction(
......@@ -701,6 +693,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerAppearsThenDoesNotAppearAgainForWeeks() throws Exception {
// Visit a site that requests a banner.
Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab();
......@@ -743,6 +736,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerAppearsThenDoesNotAppearAgainForCustomTime() throws Exception {
AppBannerManager.setDaysAfterDismissAndIgnoreForTesting(7, 7);
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
......@@ -763,6 +757,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedBannerDoesNotAppearAgainForMonths() throws Exception {
// Visit a site that requests a banner.
String nativeBannerUrl = WebappTestPage.getNonServiceWorkerUrlWithManifest(
......@@ -815,6 +810,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedBannerDoesNotAppearAgainForCustomTime() throws Exception {
AppBannerManager.setDaysAfterDismissAndIgnoreForTesting(7, 7);
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
......@@ -849,6 +845,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedWebAppBannerBrowserTabResolvesUserChoice() throws Exception {
blockInfoBarBannerAndResolveUserChoice(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(mTestServer, "call_prompt_delayed"),
......@@ -858,6 +855,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedNativeAppBannerBrowserTabResolvesUserChoice() throws Exception {
blockInfoBarBannerAndResolveUserChoice(mTabbedActivityTestRule,
WebappTestPage.getNonServiceWorkerUrlWithManifestAndAction(
......@@ -868,6 +866,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedWebAppBannerCustomTabResolvesUserChoice() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -881,6 +880,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBlockedNativeAppBannerResolvesUserChoice() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -895,6 +895,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBitmapFetchersCanOverlapWithoutCrashing() throws Exception {
// Visit a site that requests a banner rapidly and repeatedly.
String nativeBannerUrl = WebappTestPage.getNonServiceWorkerUrlWithManifest(
......@@ -917,6 +918,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testWebAppBannerAppears() throws Exception {
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
triggerWebAppBanner(mTabbedActivityTestRule, webBannerUrl, WEB_APP_TITLE, false);
......@@ -940,6 +942,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testWebAppBannerDoesNotAppearAfterInstall() throws Exception {
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
triggerWebAppBanner(mTabbedActivityTestRule, webBannerUrl, WEB_APP_TITLE, true);
......@@ -954,6 +957,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerFallsBackToShortNameWhenNameNotPresent() throws Exception {
triggerWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithManifest(
......@@ -964,6 +968,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerFallsBackToShortNameWhenNameIsEmpty() throws Exception {
triggerWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithManifest(
......@@ -974,6 +979,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledEventAutomaticPrompt() throws Exception {
triggerWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(mTestServer, "verify_appinstalled"),
......@@ -988,6 +994,7 @@ public class AppBannerManagerTest {
@Test
@MediumTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testAppInstalledEventApi() throws Exception {
triggerWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(
......@@ -1003,6 +1010,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testPostInstallationAutomaticPromptBrowserTab() throws Exception {
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
triggerWebAppBanner(mTabbedActivityTestRule, webBannerUrl, WEB_APP_TITLE, true);
......@@ -1017,6 +1025,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testPostInstallationAutomaticPromptCustomTab() throws Exception {
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
......@@ -1035,6 +1044,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testPostInstallationApiBrowserTab() throws Exception {
triggerWebAppBanner(mTabbedActivityTestRule,
WebappTestPage.getServiceWorkerUrlWithAction(mTestServer, "call_prompt_delayed"),
......@@ -1054,6 +1064,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testPostInstallationApiCustomTab() throws Exception {
mCustomTabActivityTestRule.startCustomTabActivityWithIntent(
CustomTabsTestUtils.createMinimalCustomTabIntent(
......@@ -1077,6 +1088,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerAppearsImmediatelyWithSufficientEngagement() throws Exception {
// Visit the site in a new tab with sufficient engagement and verify it appears.
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
......@@ -1090,6 +1102,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testBannerDoesNotAppearInIncognito() throws Exception {
// Visit the site in an incognito tab and verify it doesn't appear.
String webBannerUrl = WebappTestPage.getServiceWorkerUrl(mTestServer);
......@@ -1103,6 +1116,7 @@ public class AppBannerManagerTest {
@Test
@SmallTest
@Feature({"AppBanners"})
@CommandLineFlags.Add("disable-features=" + ChromeFeatureList.EXPERIMENTAL_APP_BANNERS)
public void testWebAppSplashscreenIsDownloaded() throws Exception {
// Sets the overriden factory to observer splash screen update.
final TestDataStorageFactory dataStorageFactory = new TestDataStorageFactory();
......
......@@ -234,7 +234,7 @@ const base::Feature kExpectCTReporting{"ExpectCTReporting",
// developers more control over when to show them.
const base::Feature kExperimentalAppBanners {
"ExperimentalAppBanners",
#if defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
......
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