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

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: Addressed comments Created 7 years, 11 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
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..dcf3713be9ada3628a596a5d047b92a42d5ad1c1 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
@@ -14,6 +14,7 @@ import org.chromium.content.browser.test.util.CriteriaHelper;
import org.chromium.content.browser.test.util.DOMUtils;
import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
import org.chromium.content.browser.test.util.UiUtils;
+import org.chromium.content.common.ProcessInitException;
import org.chromium.chrome.browser.ContentViewUtil;
import org.chromium.chrome.testshell.ChromiumTestShellTestBase;
import org.chromium.ui.gfx.ActivityNativeWindow;
@@ -73,10 +74,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 (ProcessInitException e) {
+ throw new Error("Failed to create ContentView", e);
+ }
}
});

Powered by Google App Engine
This is Rietveld 408576698