| Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
|
| index 96f1d9f97bfcfec2ebd2e31d8918fdb7414b7197..9327531fbded268d3ebd472740f37b7f7fda329d 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
|
| @@ -13,7 +13,7 @@ import android.support.customtabs.ICustomTabsCallback;
|
| import android.test.InstrumentationTestCase;
|
| import android.test.suitebuilder.annotation.SmallTest;
|
|
|
| -import org.chromium.base.test.util.DisabledTest;
|
| +import org.chromium.base.ThreadUtils;
|
|
|
| /** Tests for CustomTabsConnection. */
|
| public class CustomTabsConnectionTest extends InstrumentationTestCase {
|
| @@ -33,7 +33,16 @@ public class CustomTabsConnectionTest extends InstrumentationTestCase {
|
| @Override
|
| protected void tearDown() throws Exception {
|
| super.tearDown();
|
| - mCustomTabsConnection.cleanupAll();
|
| + cleanupSessions();
|
| + }
|
| +
|
| + private void cleanupSessions() {
|
| + ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + mCustomTabsConnection.cleanupAll();
|
| + }
|
| + });
|
| }
|
|
|
| /**
|
| @@ -136,7 +145,7 @@ public class CustomTabsConnectionTest extends InstrumentationTestCase {
|
| @SmallTest
|
| public void testForgetsSession() {
|
| ICustomTabsCallback cb = assertWarmupAndMayLaunchUrl(null, URL, true);
|
| - mCustomTabsConnection.cleanupAll();
|
| + cleanupSessions();
|
| assertWarmupAndMayLaunchUrl(cb, URL, false);
|
| }
|
|
|
| @@ -194,10 +203,8 @@ public class CustomTabsConnectionTest extends InstrumentationTestCase {
|
|
|
| /**
|
| * Tests that the mayLaunchUrl() throttling is reset after a long enough wait.
|
| - * @SmallTest
|
| - * crbug.com/523057
|
| */
|
| - @DisabledTest
|
| + @SmallTest
|
| public void testThrottlingIsReset() {
|
| ICustomTabsCallback cb = assertWarmupAndMayLaunchUrl(null, URL, true);
|
| mCustomTabsConnection.mayLaunchUrl(cb, Uri.parse(URL), null, null);
|
|
|