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

Unified Diff: chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java

Issue 11280097: Initialize compositor early on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed DEPS Created 8 years, 1 month 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/testshell/DEPS ('k') | chrome/browser/chrome_browser_main_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java
diff --git a/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java b/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java
index 9f44ce9e6483146631ffe8658eda2f1df27ea74d..2a61f6b8972f91c6d5f6990f6ba2b39c777312dc 100644
--- a/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java
+++ b/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellUrlTest.java
@@ -7,6 +7,7 @@ package org.chromium.chrome.testshell;
import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.base.test.util.Feature;
+import org.chromium.content.browser.ContentViewRenderView;
public class ChromiumTestShellUrlTest extends ChromiumTestShellTestBase {
// URL used for base tests.
@@ -21,4 +22,31 @@ public class ChromiumTestShellUrlTest extends ChromiumTestShellTestBase {
// Make sure the activity was created as expected.
assertNotNull(activity);
}
+
+ /**
+ * Tests that creating an extra ContentViewRenderView does not cause an assert because we would
+ * initialize the compositor twice http://crbug.com/162312
+ */
+ @SmallTest
+ @Feature({"Main"})
+ public void testCompositorInit() throws Exception {
+ // Start the ChromiumTestShell, this loads the native library and create an instance of
+ // ContentViewRenderView.
+ final ChromiumTestShellActivity activity = launchChromiumTestShellWithUrl(URL);
+ waitForActiveShellToBeDoneLoading();
+
+ // Now create a new ContentViewRenderView, it should not assert.
+ try {
+ runTestOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ ContentViewRenderView contentViewRenderView =
+ new ContentViewRenderView(getInstrumentation().getTargetContext());
+ contentViewRenderView.setCurrentContentView(activity.getActiveContentView());
+ }
+ });
+ } catch (Throwable e) {
+ fail("Could not create a ContentViewRenderView: " + e);
+ }
+ }
}
« no previous file with comments | « chrome/android/testshell/DEPS ('k') | chrome/browser/chrome_browser_main_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698