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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java

Issue 2379783002: Instant App Banner logic. (Closed)
Patch Set: Fixing tests. Created 4 years, 2 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/banners/AppBannerManagerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java
index 605d76da89765dfd2475f0e34d65169ffa77b188..4e2e9fe048e478ff1a4d4f18b9e2d6c360234fd7 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java
@@ -350,7 +350,7 @@ public class AppBannerManagerTest extends ChromeTabbedActivityTestBase {
@MediumTest
@Feature({"AppBanners"})
@RetryOnFailure
- public void testBannerAppearsThenDoesNotAppearAgainForMonths() throws Exception {
+ public void testBannerAppearsThenDoesNotAppearAgainForWeeks() throws Exception {
// Visit a site that requests a banner.
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(1);
@@ -363,29 +363,29 @@ public class AppBannerManagerTest extends ChromeTabbedActivityTestBase {
waitUntilAppBannerInfoBarAppears(NATIVE_APP_TITLE);
// Revisit the page to make the banner go away, but don't explicitly dismiss it.
- // This hides the banner for a few months.
+ // This hides the banner for two weeks.
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(3);
waitUntilNoInfoBarsExist();
- // Wait a month until revisiting the page.
- AppBannerManager.setTimeDeltaForTesting(31);
+ // Wait a week until revisiting the page.
+ AppBannerManager.setTimeDeltaForTesting(7);
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(4);
waitUntilNoInfoBarsExist();
- AppBannerManager.setTimeDeltaForTesting(32);
+ AppBannerManager.setTimeDeltaForTesting(8);
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(5);
waitUntilNoInfoBarsExist();
- // Wait two months until revisiting the page, which should pop up the banner.
- AppBannerManager.setTimeDeltaForTesting(61);
+ // Wait two weeks until revisiting the page, which should pop up the banner.
+ AppBannerManager.setTimeDeltaForTesting(14);
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(6);
waitUntilNoInfoBarsExist();
- AppBannerManager.setTimeDeltaForTesting(62);
+ AppBannerManager.setTimeDeltaForTesting(15);
new TabLoadObserver(getActivity().getActivityTab()).fullyLoadUrl(mNativeAppUrl);
waitUntilAppDetailsRetrieved(7);
waitUntilAppBannerInfoBarAppears(NATIVE_APP_TITLE);

Powered by Google App Engine
This is Rietveld 408576698