Commit e0c4d057 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Move InstallerDelegateTest from ChromeShellTest to ChromePublicTest

This CL makes InstallerDelegateTest an instrumentation test and moves it to
ChromePublicTest.

BUG=505040
TEST=None
TBR=dfalcantara

Review URL: https://codereview.chromium.org/1228353007

Cr-Commit-Position: refs/heads/master@{#339751}
parent c68af9b7
...@@ -11,6 +11,8 @@ import android.os.Looper; ...@@ -11,6 +11,8 @@ import android.os.Looper;
import android.os.SystemClock; import android.os.SystemClock;
import android.text.TextUtils; import android.text.TextUtils;
import org.chromium.base.VisibleForTesting;
import java.util.List; import java.util.List;
/** /**
...@@ -131,6 +133,7 @@ public class InstallerDelegate implements Runnable { ...@@ -131,6 +133,7 @@ public class InstallerDelegate implements Runnable {
* Checks to see if the Runnable will continue scheduling itself. * Checks to see if the Runnable will continue scheduling itself.
* @return True if the runnable is still being scheduled. * @return True if the runnable is still being scheduled.
*/ */
@VisibleForTesting
boolean isRunning() { boolean isRunning() {
return mIsRunning; return mIsRunning;
} }
...@@ -140,6 +143,7 @@ public class InstallerDelegate implements Runnable { ...@@ -140,6 +143,7 @@ public class InstallerDelegate implements Runnable {
* @param msBetween How long to wait between executions of the Runnable. * @param msBetween How long to wait between executions of the Runnable.
* @param msMax How long to wait before giving up. * @param msMax How long to wait before giving up.
*/ */
@VisibleForTesting
void setTimingForTests(long msBetween, long msMax) { void setTimingForTests(long msBetween, long msMax) {
mMsBetweenRuns = msBetween; mMsBetweenRuns = msBetween;
mMsMaximumWaitingTime = msMax; mMsMaximumWaitingTime = msMax;
......
...@@ -6,10 +6,10 @@ package org.chromium.chrome.browser.banners; ...@@ -6,10 +6,10 @@ package org.chromium.chrome.browser.banners;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.os.HandlerThread; import android.os.HandlerThread;
import android.test.InstrumentationTestCase;
import android.test.mock.MockPackageManager; import android.test.mock.MockPackageManager;
import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.chrome.shell.ChromeShellTestBase;
import org.chromium.content.browser.test.util.Criteria; import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper; import org.chromium.content.browser.test.util.CriteriaHelper;
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
* Tests the InstallerDelegate to make sure that it functions correctly and responds to changes * Tests the InstallerDelegate to make sure that it functions correctly and responds to changes
* in the PackageManager. * in the PackageManager.
*/ */
public class InstallerDelegateTest extends ChromeShellTestBase public class InstallerDelegateTest extends InstrumentationTestCase
implements InstallerDelegate.Observer{ implements InstallerDelegate.Observer{
private static final String MOCK_PACKAGE_NAME = "mock.package.name"; private static final String MOCK_PACKAGE_NAME = "mock.package.name";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment