Index: testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java |
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java b/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java |
index 84115838972fbedbc8e6b056cfc1ded075cdfca5..3d9290ed851d0aadcc633f5fc857774e5835be82 100644 |
--- a/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java |
+++ b/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java |
@@ -4,42 +4,26 @@ |
package org.chromium.native_test; |
+import android.app.Activity; |
import android.os.Bundle; |
-import org.chromium.base.ContextUtils; |
-import org.chromium.base.Log; |
-import org.chromium.base.PathUtils; |
-import org.chromium.base.PowerMonitor; |
-import org.chromium.base.library_loader.NativeLibraries; |
- |
/** |
* An {@link android.app.Activity} for running native unit tests. |
* (i.e., not browser tests) |
*/ |
-public class NativeUnitTestActivity extends NativeTestActivity { |
- |
- private static final String TAG = "cr_NativeTest"; |
+public class NativeUnitTestActivity extends Activity { |
+ private NativeUnitTest mTest = new NativeUnitTest(); |
@Override |
public void onCreate(Bundle savedInstanceState) { |
+ mTest.preCreate(this); |
super.onCreate(savedInstanceState); |
- |
- // Needed by path_utils_unittest.cc |
- PathUtils.setPrivateDataDirectorySuffix("chrome", getApplicationContext()); |
- |
- // Needed by system_monitor_unittest.cc |
- PowerMonitor.createForTests(this); |
- |
- ContextUtils.initApplicationContext(getApplicationContext()); |
- loadLibraries(); |
+ mTest.postCreate(this); |
} |
- private void loadLibraries() { |
- for (String library : NativeLibraries.LIBRARIES) { |
- Log.i(TAG, "loading: %s", library); |
- System.loadLibrary(library); |
- Log.i(TAG, "loaded: %s", library); |
- } |
- ContextUtils.initApplicationContextForNative(); |
+ @Override |
+ public void onStart() { |
+ super.onStart(); |
+ mTest.postStart(this, false); |
} |
} |