Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1501)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java

Issue 1250683002: Reland: Move autofill tests chrome ChromeShellTest to ChromePublicTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..6d0b5706e8dab06ebf4aca17ab89c9ae15d77b84 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,10 +119,18 @@ 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();
- clearAppData();
mAutofillLoggedEntries = new ArrayList<AutofillLogger.LogEntry>();
AutofillLogger.setLogger(
new AutofillLogger.Logger() {
@@ -136,13 +145,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 +203,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",

Powered by Google App Engine
This is Rietveld 408576698