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

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: 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: 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 fef3dce57cce85df63d299e3e14847c8ecd26c3a..4bc9606ad78848e53b30bbcb14feac0ad9551656 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -45,32 +45,28 @@ 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);
}
+
}
private void runTests() {
@@ -85,7 +81,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);

Powered by Google App Engine
This is Rietveld 408576698