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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java

Issue 2540813002: [Download Home] Use fewer AsyncTasks (Closed)
Patch Set: Remove accidental thing Created 4 years 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java
index 3ef355adfd004840ee96b9d40c5c385da3c1dac6..e4b69bd7636bb5d8f98af95ca5d1281245a454a4 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java
@@ -290,9 +290,10 @@ public class DownloadActivityTest extends BaseActivityInstrumentationTestCase<Do
mAdapter.onDownloadItemCreated(item8);
}
});
- mAdapterObserver.onSpaceDisplayUpdatedCallback.waitForCallback(callCount, 2);
- // This first check is a Criteria because initialization of the Adapter is asynchronous.
+ // The criteria is needed because an AsyncTask is fired to update the space display, which
+ // can result in either 1 or 2 updates.
+ mAdapterObserver.onSpaceDisplayUpdatedCallback.waitForCallback(callCount);
CriteriaHelper.pollUiThread(new Criteria() {
@Override
public boolean isSatisfied() {
@@ -367,9 +368,10 @@ public class DownloadActivityTest extends BaseActivityInstrumentationTestCase<Do
mAdapter.onDownloadItemCreated(item8);
}
});
- mAdapterObserver.onSpaceDisplayUpdatedCallback.waitForCallback(callCount, 2);
- // This first check is a Criteria because initialization of the Adapter is asynchronous.
+ // The criteria is needed because an AsyncTask is fired to update the space display, which
+ // can result in either 1 or 2 updates.
+ mAdapterObserver.onSpaceDisplayUpdatedCallback.waitForCallback(callCount);
CriteriaHelper.pollUiThread(new Criteria() {
@Override
public boolean isSatisfied() {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698