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

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

Issue 1243273002: Revert: 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_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java b/chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
similarity index 96%
rename from chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
rename to chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
index 6d0b5706e8dab06ebf4aca17ab89c9ae15d77b84..4b1802481419de5c700af551bc451b6efcbbc6e1 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
+++ b/chrome/android/javatests_shell/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
@@ -13,9 +13,8 @@ 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.test.ChromeActivityTestCaseBase;
+import org.chromium.chrome.shell.ChromeShellTestBase;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -33,7 +32,7 @@ import java.util.concurrent.TimeoutException;
/**
* Integration tests for the AutofillPopup.
*/
-public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity> {
+public class AutofillPopupTest extends ChromeShellTestBase {
private static final String FIRST_NAME = "John";
private static final String LAST_NAME = "Smith";
@@ -119,18 +118,10 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity
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() {
@@ -145,12 +136,13 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity
private void loadAndFillForm(
final String formDataUrl, final String inputText)
throws InterruptedException, ExecutionException, TimeoutException {
- startMainActivityWithURL(formDataUrl);
+ launchChromeShellWithUrl(formDataUrl);
+ assertTrue(waitForActiveShellToBeDoneLoading());
mHelper = new AutofillTestHelper();
// The TestInputMethodManagerWrapper intercepts showSoftInput so that a keyboard is never
// brought up.
- final ContentViewCore viewCore = getActivity().getCurrentContentViewCore();
+ final ContentViewCore viewCore = getActivity().getActiveContentViewCore();
final WebContents webContents = viewCore.getWebContents();
final ViewGroup view = viewCore.getContainerView();
final TestInputMethodManagerWrapper immw =
@@ -203,7 +195,7 @@ public class AutofillPopupTest extends ChromeActivityTestCaseBase<ChromeActivity
public void testClickAutofillPopupSuggestion()
throws InterruptedException, ExecutionException, TimeoutException {
loadAndFillForm(BASIC_PAGE_DATA, "J");
- final ContentViewCore viewCore = getActivity().getCurrentContentViewCore();
+ final ContentViewCore viewCore = getActivity().getActiveContentViewCore();
final WebContents webContents = viewCore.getWebContents();
assertEquals("First name did not match",

Powered by Google App Engine
This is Rietveld 408576698