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

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

Issue 13962003: [Android] Use the build-generated list of libraries for gtest APKs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/public/android/java/templates/NativeLibraries.template ('k') | testing/android/native_test.gyp » ('j') | 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 d15d04ef459fa3d7184e76238d2022e88421dfba..6486a14f3cb8108f531baf44e8aac1722b2abe1f 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -15,6 +15,9 @@ import org.chromium.base.ChromiumActivity;
import org.chromium.base.PathUtils;
import org.chromium.base.PowerMonitor;
+// TODO(cjhopman): This should not refer to content. NativeLibraries should be moved to base.
+import org.chromium.content.app.NativeLibraries;
+
import java.io.File;
// Android's NativeActivity is mostly useful for pure-native code.
@@ -26,27 +29,16 @@ public class ChromeNativeTestActivity extends ChromiumActivity {
// We post a delayed task to run tests so that we do not block onCreate().
private static final long RUN_TESTS_DELAY_IN_MS = 300;
- // Name of our shlib as obtained from a string resource.
- private String mLibrary;
-
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
- mLibrary = getResources().getString(R.string.native_library);
- if ((mLibrary == null) || mLibrary.startsWith("replace")) {
- nativeTestFailed();
- return;
- }
-
// Needed by path_utils_unittest.cc
PathUtils.setPrivateDataDirectorySuffix("chrome");
// Needed by system_monitor_unittest.cc
PowerMonitor.createForTests(this);
-
- loadLibrary();
+ loadLibraries();
Bundle extras = this.getIntent().getExtras();
if (extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD)) {
// Create a new thread and run tests on it.
@@ -80,10 +72,12 @@ public class ChromeNativeTestActivity extends ChromiumActivity {
Log.e(TAG, "[ RUNNER_FAILED ] could not load native library");
}
- private void loadLibrary() {
- Log.i(TAG, "loading: " + mLibrary);
- System.loadLibrary(mLibrary);
- Log.i(TAG, "loaded: " + mLibrary);
+ private void loadLibraries() {
+ for (String library: NativeLibraries.libraries) {
+ Log.i(TAG, "loading: " + library);
+ System.loadLibrary(library);
+ Log.i(TAG, "loaded: " + library);
+ }
}
private native void nativeRunTests(String filesDir, Context appContext);
« no previous file with comments | « content/public/android/java/templates/NativeLibraries.template ('k') | testing/android/native_test.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698