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

Unified Diff: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java

Issue 11567061: Throw exception when initialization failed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
index 490ed1419a15e7a089d1f2720c9781668beb0dcd..21b0f853dccace9506856c89fceed7472a202683 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -45,31 +45,26 @@ public class ChromeNativeTestActivity extends ChromiumActivity {
// Needed by system_monitor_unittest.cc
SystemMonitor.createForTests(this);
- try {
- loadLibrary();
- Bundle extras = this.getIntent().getExtras();
- if (extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD)) {
- // Create a new thread and run tests on it.
- new Thread() {
- @Override
- public void run() {
- runTests();
- }
- }.start();
- } else {
- // Post a task to run the tests. This allows us to not block
- // onCreate and still run tests on the main thread.
- new Handler().postDelayed(new Runnable() {
- @Override
- public void run() {
- runTests();
- }
- }, RUN_TESTS_DELAY_IN_MS);
- }
- } catch (UnsatisfiedLinkError e) {
- Log.e(TAG, "Unable to load lib" + mLibrary + ".so: " + e);
- nativeTestFailed();
- throw e;
+
+ loadLibrary();
+ Bundle extras = this.getIntent().getExtras();
+ if (extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD)) {
+ // Create a new thread and run tests on it.
+ new Thread() {
+ @Override
+ public void run() {
+ runTests();
+ }
+ }.start();
+ } else {
+ // Post a task to run the tests. This allows us to not block
+ // onCreate and still run tests on the main thread.
+ new Handler().postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ runTests();
+ }
+ }, RUN_TESTS_DELAY_IN_MS);
}
}
@@ -85,7 +80,7 @@ public class ChromeNativeTestActivity extends ChromiumActivity {
Log.e(TAG, "[ RUNNER_FAILED ] could not load native library");
}
- private void loadLibrary() throws UnsatisfiedLinkError {
+ private void loadLibrary() {
Log.i(TAG, "loading: " + mLibrary);
System.loadLibrary(mLibrary);
Log.i(TAG, "loaded: " + mLibrary);
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698