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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.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/webapps/WebappActivityTestBase.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
index c5e0386547957727003fcde1684195a69cc25a55..8faf1380370334e42dd1e11780fe4714de8db743 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java
@@ -132,17 +132,13 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
*/
protected void waitUntilIdle() {
getInstrumentation().waitForIdleSync();
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria() {
- @Override
- public boolean isSatisfied() {
- return getActivity().getActivityTab() != null
- && !getActivity().getActivityTab().isLoading();
- }
- }, STARTUP_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
- } catch (InterruptedException exception) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return getActivity().getActivityTab() != null
+ && !getActivity().getActivityTab().isLoading();
+ }
+ }, STARTUP_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
getInstrumentation().waitForIdleSync();
}
@@ -191,7 +187,7 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
/**
* Waits for the splash screen to be hidden.
*/
- protected void waitUntilSplashscreenHides() throws InterruptedException {
+ protected void waitUntilSplashscreenHides() {
CriteriaHelper.pollInstrumentationThread(new Criteria() {
@Override
public boolean isSatisfied() {
@@ -201,16 +197,12 @@ public abstract class WebappActivityTestBase extends ChromeActivityTestCaseBase<
}
protected ViewGroup waitUntilSplashScreenAppears() {
- try {
- CriteriaHelper.pollInstrumentationThread(new Criteria() {
- @Override
- public boolean isSatisfied() {
- return getActivity().getSplashScreenForTests() != null;
- }
- });
- } catch (InterruptedException e) {
- fail();
- }
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return getActivity().getSplashScreenForTests() != null;
+ }
+ });
ViewGroup splashScreen = getActivity().getSplashScreenForTests();
if (splashScreen == null) {

Powered by Google App Engine
This is Rietveld 408576698