Commit f94e194d authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Increase timeout time for Bookmark to load in BookmarkTestUtil

Bookmark is not loaded in default maxout time which is 3 seconds.
Increasing it to 4 seconds in order to check if the  crash persists.

Bug: 1133426
Change-Id: If4fcc9230803c781adff4ba88db36038bfcc11e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2456111Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815146}
parent 20165593
...@@ -23,7 +23,6 @@ import org.chromium.base.test.params.ParameterAnnotations; ...@@ -23,7 +23,6 @@ import org.chromium.base.test.params.ParameterAnnotations;
import org.chromium.base.test.params.ParameterizedRunner; import org.chromium.base.test.params.ParameterizedRunner;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisableIf; import org.chromium.base.test.util.DisableIf;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Feature;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.flags.ChromeSwitches;
...@@ -118,7 +117,6 @@ public class BookmarkPersonalizedPromoRenderTest { ...@@ -118,7 +117,6 @@ public class BookmarkPersonalizedPromoRenderTest {
@MediumTest @MediumTest
@Feature("RenderTest") @Feature("RenderTest")
@ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class) @ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class)
@DisabledTest(message = "crbug.com/1133426")
public void testPersonalizedSyncPromoInBookmarkPage(boolean nightModeEnabled) throws Exception { public void testPersonalizedSyncPromoInBookmarkPage(boolean nightModeEnabled) throws Exception {
BookmarkPromoHeader.forcePromoStateForTests( BookmarkPromoHeader.forcePromoStateForTests(
BookmarkPromoHeader.PromoState.PROMO_SYNC_PERSONALIZED); BookmarkPromoHeader.PromoState.PROMO_SYNC_PERSONALIZED);
......
...@@ -12,6 +12,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; ...@@ -12,6 +12,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils;
* Utility functions for dealing with bookmarks in tests. * Utility functions for dealing with bookmarks in tests.
*/ */
public class BookmarkTestUtil { public class BookmarkTestUtil {
private static final long MAX_TIMEOUT_MS = 4000L;
/** /**
* Waits until the bookmark model is loaded, i.e. until * Waits until the bookmark model is loaded, i.e. until
...@@ -21,7 +22,8 @@ public class BookmarkTestUtil { ...@@ -21,7 +22,8 @@ public class BookmarkTestUtil {
final BookmarkModel bookmarkModel = final BookmarkModel bookmarkModel =
TestThreadUtils.runOnUiThreadBlockingNoException(BookmarkModel::new); TestThreadUtils.runOnUiThreadBlockingNoException(BookmarkModel::new);
CriteriaHelper.pollUiThread(bookmarkModel::isBookmarkModelLoaded); CriteriaHelper.pollUiThread(bookmarkModel::isBookmarkModelLoaded, MAX_TIMEOUT_MS,
CriteriaHelper.DEFAULT_POLLING_INTERVAL);
TestThreadUtils.runOnUiThreadBlocking(bookmarkModel::destroy); TestThreadUtils.runOnUiThreadBlocking(bookmarkModel::destroy);
} }
......
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