Commit 14f26f85 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Test] Batch tests in BookmarkModelTest and BookmarkBridgeTest

Batch tests in BookmarkModelTest to reduce runtime of
chrome_public_test_apk.

Bug: 1145843
Change-Id: Ide04b1754e0c3c6992d38e23bae40bc5c5cd19e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526445Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827771}
parent e8067149
......@@ -33,7 +33,7 @@ import java.util.List;
* Tests for bookmark bridge
*/
@RunWith(BaseJUnit4ClassRunner.class)
@Batch(Batch.UNIT_TESTS)
@Batch(Batch.PER_CLASS)
public class BookmarkBridgeTest {
@Rule
public final ChromeBrowserTestRule mChromeBrowserTestRule = new ChromeBrowserTestRule();
......
......@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.bookmarks;
import androidx.test.filters.SmallTest;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
......@@ -14,6 +15,7 @@ import org.junit.runner.RunWith;
import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.UiThreadTest;
import org.chromium.base.test.util.Batch;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem;
import org.chromium.chrome.browser.profiles.Profile;
......@@ -33,6 +35,7 @@ import java.util.concurrent.atomic.AtomicReference;
* Tests for {@link BookmarkModel}, the data layer of bookmarks.
*/
@RunWith(BaseJUnit4ClassRunner.class)
@Batch(Batch.PER_CLASS)
public class BookmarkModelTest {
@Rule
public final ChromeBrowserTestRule mChromeBrowserTestRule = new ChromeBrowserTestRule();
......@@ -59,6 +62,11 @@ public class BookmarkModelTest {
});
}
@After
public void tearDown() {
TestThreadUtils.runOnUiThreadBlocking(() -> mBookmarkModel.removeAllUserBookmarks());
}
@Test
@SmallTest
@UiThreadTest
......
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