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

Unified Diff: chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java

Issue 1786243003: Rename pollForCriteria to pollForTestThreadCriteria. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and update MediaRouterIntegrationTest.java Created 4 years, 9 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/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java
diff --git a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java
index c7476ea11012e96893b3d3fe6a5402fc27671b0b..df49fa26f9f55c5de751c932421a401acf717f58 100644
--- a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java
+++ b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/BookmarksTest.java
@@ -120,7 +120,7 @@ public class BookmarksTest extends SyncTestBase {
Bookmark bookmark = getClientBookmarks().get(0);
modifyServerBookmark(bookmark.id, MODIFIED_TITLE, URL);
SyncTestUtil.triggerSync();
- pollForCriteria(new ClientBookmarksCriteria() {
+ pollInstrumentationThread(new ClientBookmarksCriteria() {
@Override
public boolean isSatisfied(List<Bookmark> bookmarks) {
Bookmark modifiedBookmark = bookmarks.get(0);
@@ -168,7 +168,7 @@ public class BookmarksTest extends SyncTestBase {
// Move on server, sync, and verify the move locally.
mFakeServerHelper.modifyBookmarkEntity(bookmark.id, TITLE, URL, folder.id);
SyncTestUtil.triggerSync();
- pollForCriteria(new ClientBookmarksCriteria() {
+ pollInstrumentationThread(new ClientBookmarksCriteria() {
@Override
public boolean isSatisfied(List<Bookmark> bookmarks) {
// The "s" is prepended because the server adds one to the parentId.
@@ -208,7 +208,7 @@ public class BookmarksTest extends SyncTestBase {
modifyServerBookmarkFolder(folder.id, MODIFIED_TITLE);
SyncTestUtil.triggerSync();
- pollForCriteria(new ClientBookmarksCriteria() {
+ pollInstrumentationThread(new ClientBookmarksCriteria() {
@Override
public boolean isSatisfied(List<Bookmark> bookmarks) {
Bookmark modifiedFolder = bookmarks.get(0);
@@ -296,7 +296,7 @@ public class BookmarksTest extends SyncTestBase {
// Move on client, sync, and verify the move on the server.
moveClientBookmark(bookmarkId, folderId);
SyncTestUtil.triggerSync();
- pollForCriteria(new ServerBookmarksCriteria() {
+ pollInstrumentationThread(new ServerBookmarksCriteria() {
@Override
public boolean isSatisfied(List<Bookmark> bookmarks) {
Bookmark modifiedBookmark = bookmarks.get(bookmarks.get(0).isFolder() ? 1 : 0);
@@ -471,7 +471,7 @@ public class BookmarksTest extends SyncTestBase {
}
private void waitForClientBookmarkCount(int n) throws InterruptedException {
- pollForCriteria(Criteria.equals(n, new Callable<Integer>() {
+ pollInstrumentationThread(Criteria.equals(n, new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return SyncTestUtil.getLocalData(mContext, BOOKMARKS_TYPE_STRING).size();
@@ -481,7 +481,7 @@ public class BookmarksTest extends SyncTestBase {
private void waitForServerBookmarkCountWithName(final int count, final String name)
throws InterruptedException {
- pollForCriteria(new Criteria(
+ pollInstrumentationThread(new Criteria(
"Expected " + count + " remote bookmarks with name " + name + ".") {
@Override
public boolean isSatisfied() {

Powered by Google App Engine
This is Rietveld 408576698