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

Unified Diff: chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java

Issue 251443004: ContentView->ContentViewCore.getContainerView in chrome/ tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
-}
+}
« no previous file with comments | « chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698