| Index: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| diff --git a/chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| similarity index 96%
|
| rename from chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| rename to chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| index 4b1802481419de5c700af551bc451b6efcbbc6e1..dc8c0adbcc4984aec2d7ce9a94c9becb067ff03e 100644
|
| --- a/chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
|
| @@ -13,8 +13,9 @@ import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.base.test.util.UrlUtils;
|
| import org.chromium.chrome.R;
|
| +import org.chromium.chrome.browser.ChromeActivity;
|
| import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
|
| -import org.chromium.chrome.shell.ChromeShellTestBase;
|
| +import org.chromium.chrome.test.ChromeActivityTestCaseBase;
|
| import org.chromium.content.browser.ContentViewCore;
|
| import org.chromium.content.browser.test.util.Criteria;
|
| import org.chromium.content.browser.test.util.CriteriaHelper;
|
| @@ -32,7 +33,7 @@ import java.util.concurrent.TimeoutException;
|
| /**
|
| * Integration tests for the AutofillPopup.
|
| */
|
| -public class AutofillPopupTest extends ChromeShellTestBase {
|
| +public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity> {
|
|
|
| private static final String FIRST_NAME = "John";
|
| private static final String LAST_NAME = "Smith";
|
| @@ -118,6 +119,15 @@ public class AutofillPopupTest extends ChromeShellTestBase {
|
| private AutofillTestHelper mHelper;
|
| private List<AutofillLogger.LogEntry> mAutofillLoggedEntries;
|
|
|
| + public AutofillPopupTest() {
|
| + super(ChromeActivity.class);
|
| + }
|
| +
|
| + @Override
|
| + public void startMainActivity() throws InterruptedException {
|
| + // Don't launch activity automatically.
|
| + }
|
| +
|
| @Override
|
| public void setUp() throws Exception {
|
| super.setUp();
|
| @@ -136,13 +146,12 @@ public class AutofillPopupTest extends ChromeShellTestBase {
|
| private void loadAndFillForm(
|
| final String formDataUrl, final String inputText)
|
| throws InterruptedException, ExecutionException, TimeoutException {
|
| - launchChromeShellWithUrl(formDataUrl);
|
| - assertTrue(waitForActiveShellToBeDoneLoading());
|
| + startMainActivityWithURL(formDataUrl);
|
| mHelper = new AutofillTestHelper();
|
|
|
| // The TestInputMethodManagerWrapper intercepts showSoftInput so that a keyboard is never
|
| // brought up.
|
| - final ContentViewCore viewCore = getActivity().getActiveContentViewCore();
|
| + final ContentViewCore viewCore = getActivity().getCurrentContentViewCore();
|
| final WebContents webContents = viewCore.getWebContents();
|
| final ViewGroup view = viewCore.getContainerView();
|
| final TestInputMethodManagerWrapper immw =
|
| @@ -195,7 +204,7 @@ public class AutofillPopupTest extends ChromeShellTestBase {
|
| public void testClickAutofillPopupSuggestion()
|
| throws InterruptedException, ExecutionException, TimeoutException {
|
| loadAndFillForm(BASIC_PAGE_DATA, "J");
|
| - final ContentViewCore viewCore = getActivity().getActiveContentViewCore();
|
| + final ContentViewCore viewCore = getActivity().getCurrentContentViewCore();
|
| final WebContents webContents = viewCore.getWebContents();
|
|
|
| assertEquals("First name did not match",
|
|
|