| Index: content/public/android/junit/src/org/chromium/content/browser/installedapp/InstalledAppProviderTest.java
|
| diff --git a/content/public/android/junit/src/org/chromium/content/browser/installedapp/InstalledAppProviderTest.java b/content/public/android/junit/src/org/chromium/content/browser/installedapp/InstalledAppProviderTest.java
|
| index b2c2161f033856d71c5500de3f2eba6219ab7b05..881e9068afc59d479c99f9faa46dcfb17adc493a 100644
|
| --- a/content/public/android/junit/src/org/chromium/content/browser/installedapp/InstalledAppProviderTest.java
|
| +++ b/content/public/android/junit/src/org/chromium/content/browser/installedapp/InstalledAppProviderTest.java
|
| @@ -12,15 +12,16 @@ import android.content.res.AssetManager;
|
| import android.content.res.Resources;
|
| import android.os.Bundle;
|
|
|
| +import org.junit.After;
|
| import org.junit.Assert;
|
| import org.junit.Before;
|
| import org.junit.Test;
|
| import org.junit.runner.RunWith;
|
| -
|
| import org.robolectric.RuntimeEnvironment;
|
| import org.robolectric.annotation.Config;
|
| import org.robolectric.res.builder.DefaultPackageManager;
|
|
|
| +import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.installedapp.mojom.InstalledAppProvider;
|
| import org.chromium.installedapp.mojom.RelatedApplication;
|
| @@ -294,6 +295,9 @@ public class InstalledAppProviderTest {
|
|
|
| @Before
|
| public void setUp() {
|
| + // Avoid triggering asserts in InstalledAppProviderImpl that check they are being run off
|
| + // the UI thread (since this is a single-threaded test).
|
| + ThreadUtils.setThreadAssertsDisabledForTesting(true);
|
| mPackageManager = new FakePackageManager();
|
| RuntimeEnvironment.setRobolectricPackageManager(mPackageManager);
|
| mFrameUrlDelegate = new FakeFrameUrlDelegate(URL_ON_ORIGIN);
|
| @@ -301,6 +305,11 @@ public class InstalledAppProviderTest {
|
| new InstalledAppProviderTestImpl(mFrameUrlDelegate, RuntimeEnvironment.application);
|
| }
|
|
|
| + @After
|
| + public void tearDown() {
|
| + ThreadUtils.setThreadAssertsDisabledForTesting(false);
|
| + }
|
| +
|
| /**
|
| * Origin of the page using the API is missing certain parts of the URI.
|
| */
|
|
|