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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.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/BindingManagerIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
index 2a752805c4e47a63eb3ef106850dc722ef651fa2..c5537cb2f72ddf8887e13568ff0331547c478d7b 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
@@ -53,55 +53,39 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
private boolean mIsReleaseAllModerateBindingsCalled;
void assertIsInForeground(final int pid) {
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria() {
- @Override
- public boolean isSatisfied() {
- return mProcessInForegroundMap.get(pid);
- }
- });
- } catch (InterruptedException ie) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return mProcessInForegroundMap.get(pid);
+ }
+ });
}
void assertIsInBackground(final int pid) {
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria() {
- @Override
- public boolean isSatisfied() {
- return !mProcessInForegroundMap.get(pid);
- }
- });
- } catch (InterruptedException ie) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return !mProcessInForegroundMap.get(pid);
+ }
+ });
}
void assertSetInForegroundWasCalled(String message, final int pid) {
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria(message) {
- @Override
- public boolean isSatisfied() {
- return mProcessInForegroundMap.indexOfKey(pid) >= 0;
- }
- });
- } catch (InterruptedException ie) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria(message) {
+ @Override
+ public boolean isSatisfied() {
+ return mProcessInForegroundMap.indexOfKey(pid) >= 0;
+ }
+ });
}
void assertIsReleaseAllModerateBindingsCalled() {
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria() {
- @Override
- public boolean isSatisfied() {
- return mIsReleaseAllModerateBindingsCalled;
- }
- });
- } catch (InterruptedException ie) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return mIsReleaseAllModerateBindingsCalled;
+ }
+ });
}
String getVisibilityCalls(int pid) {

Powered by Google App Engine
This is Rietveld 408576698