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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/UrlOverridingTest.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.externalnav; 5 package org.chromium.chrome.browser.externalnav;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.app.Instrumentation; 8 import android.app.Instrumentation;
9 import android.app.Instrumentation.ActivityMonitor; 9 import android.app.Instrumentation.ActivityMonitor;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 @SmallTest 319 @SmallTest
320 @Restriction(ChromeRestriction.RESTRICTION_TYPE_TABLET) 320 @Restriction(ChromeRestriction.RESTRICTION_TYPE_TABLET)
321 public void testOpenWindowFromUserGesture() throws InterruptedException { 321 public void testOpenWindowFromUserGesture() throws InterruptedException {
322 loadUrlAndWaitForIntentUrl(mTestServer.getURL(OPEN_WINDOW_FROM_USER_GEST URE_PAGE), 322 loadUrlAndWaitForIntentUrl(mTestServer.getURL(OPEN_WINDOW_FROM_USER_GEST URE_PAGE),
323 true, 1, true, null, true); 323 true, 1, true, null, true);
324 } 324 }
325 325
326 @SmallTest 326 @SmallTest
327 @RetryOnFailure 327 @RetryOnFailure
328 public void testRedirectionFromIntent() throws InterruptedException { 328 public void testRedirectionFromIntent() {
329 Intent intent = new Intent(Intent.ACTION_VIEW, 329 Intent intent = new Intent(Intent.ACTION_VIEW,
330 Uri.parse(mTestServer.getURL(NAVIGATION_FROM_JAVA_REDIRECTION_PA GE))); 330 Uri.parse(mTestServer.getURL(NAVIGATION_FROM_JAVA_REDIRECTION_PA GE)));
331 Context targetContext = getInstrumentation().getTargetContext(); 331 Context targetContext = getInstrumentation().getTargetContext();
332 intent.setClassName(targetContext, ChromeLauncherActivity.class.getName( )); 332 intent.setClassName(targetContext, ChromeLauncherActivity.class.getName( ));
333 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 333 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
334 targetContext.startActivity(intent); 334 targetContext.startActivity(intent);
335 335
336 CriteriaHelper.pollUiThread(Criteria.equals(1, new Callable<Integer>() { 336 CriteriaHelper.pollUiThread(Criteria.equals(1, new Callable<Integer>() {
337 @Override 337 @Override
338 public Integer call() { 338 public Integer call() {
339 return mActivityMonitor.getHits(); 339 return mActivityMonitor.getHits();
340 } 340 }
341 })); 341 }));
342 } 342 }
343 343
344 @Override 344 @Override
345 public void startMainActivity() throws InterruptedException { 345 public void startMainActivity() throws InterruptedException {
346 startMainActivityOnBlankPage(); 346 startMainActivityOnBlankPage();
347 } 347 }
348 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698