| Index: chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
|
| index 2e21eb1a01a6af9951d0624c7b5206dfec70052a..94e66c4c6a848269e4e9313ae61d843db4315d74 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
|
| @@ -6,7 +6,6 @@
|
|
|
| import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
|
|
|
| -import android.content.Context;
|
| import android.os.Environment;
|
| import android.test.UiThreadTest;
|
| import android.test.suitebuilder.annotation.MediumTest;
|
| @@ -15,7 +14,6 @@
|
| import org.chromium.base.CommandLine;
|
| import org.chromium.base.ContextUtils;
|
| import org.chromium.base.ThreadUtils;
|
| -import org.chromium.base.test.util.AdvancedMockContext;
|
| import org.chromium.base.test.util.DisabledTest;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.base.test.util.UrlUtils;
|
| @@ -84,11 +82,6 @@
|
|
|
| mTestServer = EmbeddedTestServer.createAndStartFileServer(
|
| getInstrumentation().getContext(), Environment.getExternalStorageDirectory());
|
| -
|
| - // Using an AdvancedMockContext allows us to use a fresh in-memory SharedPreference.
|
| - Context context = new AdvancedMockContext(
|
| - getInstrumentation().getTargetContext().getApplicationContext());
|
| - ContextUtils.initApplicationContextForTests(context);
|
| }
|
|
|
| @Override
|
| @@ -182,8 +175,9 @@
|
| */
|
| @MediumTest
|
| @Feature({"Browser", "Main"})
|
| + @DisabledTest // crbug.com/625038
|
| public void testDataReductionPromoInfoBar() throws InterruptedException {
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| assertFalse("Data Reduction Proxy enabled",
|
| @@ -209,7 +203,7 @@
|
| assertTrue("InfoBar does not have secondary button",
|
| InfoBarUtil.hasSecondaryButton(infoBars.get(0)));
|
|
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| InfoBarUtil.clickPrimaryButton(infoBars.get(0));
|
| @@ -220,7 +214,7 @@
|
| assertTrue("InfoBar not removed.", mListener.removeInfoBarAnimationFinished());
|
| assertTrue("Wrong infobar count", getInfoBars().isEmpty());
|
|
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| assertTrue("Data Reduction Proxy not enabled",
|
| @@ -243,8 +237,9 @@
|
| */
|
| @MediumTest
|
| @Feature({"Browser", "Main"})
|
| + @DisabledTest // crbug.com/625038
|
| public void testDataReductionPromoInfoBarDismissed() throws InterruptedException {
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| assertFalse("Data Reduction Proxy enabled",
|
| @@ -270,7 +265,7 @@
|
| assertTrue("InfoBar does not have secondary button",
|
| InfoBarUtil.hasSecondaryButton(infoBars.get(0)));
|
|
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| InfoBarUtil.clickSecondaryButton(infoBars.get(0));
|
| @@ -281,7 +276,7 @@
|
| assertTrue("InfoBar not removed.", mListener.removeInfoBarAnimationFinished());
|
| assertTrue("Wrong infobar count", getInfoBars().isEmpty());
|
|
|
| - ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| @Override
|
| public void run() {
|
| assertFalse("Data Reduction Proxy enabled",
|
| @@ -302,6 +297,7 @@
|
| @UiThreadTest
|
| @MediumTest
|
| @Feature({"Browser", "Main"})
|
| + @DisabledTest // crbug.com/625038
|
| public void testDataReductionPromoInfoBarPostM48Install() {
|
| assertFalse("Data Reduction Proxy enabled",
|
| DataReductionProxySettings.getInstance().isDataReductionProxyEnabled());
|
| @@ -326,6 +322,7 @@
|
| @UiThreadTest
|
| @MediumTest
|
| @Feature({"Browser", "Main"})
|
| + @DisabledTest // crbug.com/625038
|
| public void testDataReductionPromoInfoBarFreOptOut() {
|
| // Try to add an infobar. Infobar should not be added since the first run experience or
|
| // second run promo hasn't been shown.
|
|
|