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

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

Issue 2573263002: Catch InterruptedException in CriteriaHelper (Closed)
Patch Set: Change OverviewModeBehaviorWatcher back to try/finally 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
index ff918e9fc14a6f84a71893d44429124895a819e3..e07f3cf46a5c359adda1ce1374b5579335da8ee0 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
@@ -100,17 +100,13 @@ public class DownloadManagerServiceTest extends NativeLibraryTestBase {
}
public void waitTillExpectedCallsComplete() {
- try {
- CriteriaHelper.pollInstrumentationThread(
- new Criteria("Failed while waiting for all calls to complete.") {
- @Override
- public boolean isSatisfied() {
- return mExpectedCalls.isEmpty();
- }
- });
- } catch (InterruptedException e) {
- fail("Failed while waiting for all calls to complete." + e);
- }
+ CriteriaHelper.pollInstrumentationThread(
+ new Criteria("Failed while waiting for all calls to complete.") {
+ @Override
+ public boolean isSatisfied() {
+ return mExpectedCalls.isEmpty();
+ }
+ });
}
public MockDownloadNotifier andThen(MethodID method, Object param) {
@@ -187,17 +183,13 @@ public class DownloadManagerServiceTest extends NativeLibraryTestBase {
}
public void waitForSnackbarControllerToFinish(final boolean success) {
- try {
- CriteriaHelper.pollInstrumentationThread(
- new Criteria("Failed while waiting for all calls to complete.") {
- @Override
- public boolean isSatisfied() {
- return success ? mSucceeded : mFailed;
- }
- });
- } catch (InterruptedException e) {
- fail("Failed while waiting for all calls to complete." + e);
- }
+ CriteriaHelper.pollInstrumentationThread(
+ new Criteria("Failed while waiting for all calls to complete.") {
+ @Override
+ public boolean isSatisfied() {
+ return success ? mSucceeded : mFailed;
+ }
+ });
}
@Override
@@ -540,7 +532,7 @@ public class DownloadManagerServiceTest extends NativeLibraryTestBase {
*/
@MediumTest
@Feature({"Download"})
- public void testClearPendingOMADownloads() throws InterruptedException {
+ public void testClearPendingOMADownloads() {
DownloadManager manager =
(DownloadManager) getTestContext().getSystemService(Context.DOWNLOAD_SERVICE);
long downloadId = manager.addCompletedDownload(

Powered by Google App Engine
This is Rietveld 408576698