| Index: chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
|
| diff --git a/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java b/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
|
| index 62ab37fbc0e5a1064fcb5120f49c23086cf88ab1..a7be42a7852f486ee39f5b8ae8457ebe3142ecc1 100644
|
| --- a/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
|
| +++ b/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
|
| @@ -8,7 +8,6 @@ import android.test.suitebuilder.annotation.SmallTest;
|
|
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.test.util.Feature;
|
| -import org.chromium.content.browser.ContentView;
|
| import org.chromium.content.browser.ContentViewCore;
|
| import org.chromium.content.browser.ContentViewRenderView;
|
|
|
| @@ -43,22 +42,17 @@ public class ChromeShellUrlTest extends ChromeShellTestBase {
|
| // Make sure the activity was created as expected.
|
| assertNotNull(activity);
|
|
|
| - // Ensure we have a ContentView and ContentViewCore.
|
| - final AtomicReference<ContentView> contentView = new AtomicReference<ContentView>();
|
| + // Ensure we have a valid ContentViewCore.
|
| final AtomicReference<ContentViewCore> contentViewCore =
|
| new AtomicReference<ContentViewCore>();
|
| ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| @Override
|
| public void run() {
|
| - ContentView activeContentView = activity.getActiveContentView();
|
| - contentView.set(activeContentView);
|
| - if (activeContentView != null) {
|
| - contentViewCore.set(activeContentView.getContentViewCore());
|
| - }
|
| + contentViewCore.set(activity.getActiveContentViewCore());
|
| }
|
| });
|
| - assertNotNull(contentView.get());
|
| assertNotNull(contentViewCore.get());
|
| + assertNotNull(contentViewCore.get().getContainerView());
|
|
|
| // Ensure the correct page has been loaded, ie. not interstitial, and title/url should
|
| // be sane. Note, a typical correct title is: "Welcome to Chromium", whereas a wrong one
|
| @@ -105,11 +99,11 @@ public class ChromeShellUrlTest extends ChromeShellTestBase {
|
| new ContentViewRenderView(getInstrumentation().getTargetContext(),
|
| activity.getWindowAndroid());
|
| contentViewRenderView.setCurrentContentViewCore(
|
| - activity.getActiveContentView().getContentViewCore());
|
| + activity.getActiveContentViewCore());
|
| }
|
| });
|
| } catch (Throwable e) {
|
| fail("Could not create a ContentViewRenderView: " + e);
|
| }
|
| }
|
| -}
|
| +}
|
|
|