| Index: chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| diff --git a/chrome/android/javatests_shell/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| similarity index 84%
|
| rename from chrome/android/javatests_shell/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| rename to chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| index 34ab8d2d749534b7be1d8c26c1844c9e5694bf96..00aa6bde26fc8db91961ac20f1cd64683861cf20 100644
|
| --- a/chrome/android/javatests_shell/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
|
| @@ -7,8 +7,9 @@ package org.chromium.chrome.browser.input;
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.test.util.DisabledTest;
|
| import org.chromium.base.test.util.UrlUtils;
|
| +import org.chromium.chrome.browser.ChromeActivity;
|
| import org.chromium.chrome.browser.WebContentsFactory;
|
| -import org.chromium.chrome.shell.ChromeShellTestBase;
|
| +import org.chromium.chrome.test.ChromeActivityTestCaseBase;
|
| import org.chromium.content.browser.ContentView;
|
| import org.chromium.content.browser.ContentViewCore;
|
| import org.chromium.content.browser.test.util.Criteria;
|
| @@ -21,7 +22,7 @@ import org.chromium.ui.base.WindowAndroid;
|
| /**
|
| * Test the select popup and how it interacts with another ContentViewCore.
|
| */
|
| -public class SelectPopupOtherContentViewTest extends ChromeShellTestBase {
|
| +public class SelectPopupOtherContentViewTest extends ChromeActivityTestCaseBase<ChromeActivity> {
|
| private static final String SELECT_URL = UrlUtils.encodeHtmlDataUri(
|
| "<html><body>"
|
| + "Which animal is the strongest:<br/>"
|
| @@ -39,12 +40,18 @@ public class SelectPopupOtherContentViewTest extends ChromeShellTestBase {
|
| private class PopupShowingCriteria implements Criteria {
|
| @Override
|
| public boolean isSatisfied() {
|
| - ContentViewCore contentViewCore = getActivity().getActiveContentViewCore();
|
| + ContentViewCore contentViewCore = getActivity().getCurrentContentViewCore();
|
| return contentViewCore.getSelectPopupForTest() != null;
|
| }
|
| }
|
|
|
| public SelectPopupOtherContentViewTest() {
|
| + super(ChromeActivity.class);
|
| + }
|
| +
|
| + @Override
|
| + public void startMainActivity() throws InterruptedException {
|
| + // Don't launch activity automatically.
|
| }
|
|
|
| /**
|
| @@ -59,10 +66,9 @@ public class SelectPopupOtherContentViewTest extends ChromeShellTestBase {
|
| public void testPopupNotClosedByOtherContentView()
|
| throws InterruptedException, Exception, Throwable {
|
| // Load the test page.
|
| - launchChromeShellWithUrl(SELECT_URL);
|
| - assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading());
|
| + startMainActivityWithURL(SELECT_URL);
|
|
|
| - final ContentViewCore viewCore = getActivity().getActiveContentViewCore();
|
| + final ContentViewCore viewCore = getActivity().getCurrentContentViewCore();
|
|
|
| // Once clicked, the popup should show up.
|
| DOMUtils.clickNode(this, viewCore, "select");
|
|
|