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

Unified Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.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/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java
index 5be3a00f980648969ddd4c1ae3f7688d358d4389..2214f0ef955218d70c79233caf98eca56a5e4de5 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java
@@ -31,10 +31,9 @@ public class FullscreenTestUtils {
* @param tab The {@link Tab} to toggle fullscreen on.
* @param state Whether the tab should be set to fullscreen.
* @param activity The {@link Activity} owning the tab.
- * @throws InterruptedException
*/
public static void togglePersistentFullscreenAndAssert(final Tab tab, final boolean state,
- Activity activity) throws InterruptedException {
+ Activity activity) {
final TabWebContentsDelegateAndroid delegate = tab.getTabWebContentsDelegateAndroid();
FullscreenTestUtils.togglePersistentFullscreen(delegate, state);
FullscreenTestUtils.waitForFullscreenFlag(tab, state, activity);
@@ -63,10 +62,9 @@ public class FullscreenTestUtils {
* @param tab The {@link Tab} that is expected to have the flag set.
* @param state Whether the tab should be to fullscreen.
* @param activity The {@link Activity} owning the tab.
- * @throws InterruptedException
*/
public static void waitForFullscreenFlag(final Tab tab, final boolean state,
- final Activity activity) throws InterruptedException {
+ final Activity activity) {
CriteriaHelper.pollUiThread(new Criteria() {
@Override
public boolean isSatisfied() {
@@ -80,10 +78,9 @@ public class FullscreenTestUtils {
*
* @param delegate The {@link TabWebContentsDelegateAndroid} for the tab.
* @param state Whether the tab should be set to fullscreen.
- * @throws InterruptedException
*/
public static void waitForPersistentFullscreen(final TabWebContentsDelegateAndroid delegate,
- boolean state) throws InterruptedException {
+ boolean state) {
CriteriaHelper.pollUiThread(Criteria.equals(state, new Callable<Boolean>() {
@Override
public Boolean call() {

Powered by Google App Engine
This is Rietveld 408576698