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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java

Issue 11567061: Throw exception when initialization failed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java
index c721bff0544bc9f30848ac38435b16f6c748e6a4..9d0cc1dba96870d06f9d323a9c46c8ad593fce79 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/test/SelectPopupOtherContentViewTest.java
@@ -5,6 +5,7 @@
package org.chromium.content.browser;
import android.test.suitebuilder.annotation.LargeTest;
+import android.util.Log;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.ContentView;
@@ -21,6 +22,7 @@ import org.chromium.ui.gfx.ActivityNativeWindow;
import java.util.concurrent.TimeUnit;
public class SelectPopupOtherContentViewTest extends ChromiumTestShellTestBase {
+ private static final String TAG = "SelectPopupOtherContentViewTest";
private static final int WAIT_TIMEOUT_SECONDS = 2;
private static final String SELECT_URL =
"data:text/html;utf-8,<html><body>" +
@@ -73,10 +75,14 @@ public class SelectPopupOtherContentViewTest extends ChromiumTestShellTestBase {
public void run() {
int nativeWebContents = ContentViewUtil.createNativeWebContents(false);
ActivityNativeWindow nativeWindow = new ActivityNativeWindow(getActivity());
- ContentView contentView = ContentView.newInstance(
- getActivity(), nativeWebContents,
- nativeWindow, ContentView.PERSONALITY_CHROME);
- contentView.destroy();
+ try {
+ ContentView contentView = ContentView.newInstance(
+ getActivity(), nativeWebContents,
+ nativeWindow, ContentView.PERSONALITY_CHROME);
+ contentView.destroy();
+ } catch (AndroidBrowserProcessInitException e) {
+ Log.e(TAG, "Failed to create ContentView", e);
+ }
}
});

Powered by Google App Engine
This is Rietveld 408576698