Index: testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTest.java |
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTest.java b/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTest.java |
index c71effa808cab603755bd1c22850c411480eb7f4..d7209ba836e58757d4b9e6a9f1634c2080ab8fca 100644 |
--- a/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTest.java |
+++ b/testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTest.java |
@@ -21,16 +21,14 @@ public class NativeUnitTest extends NativeTest { |
@Override |
public void preCreate(Activity activity) { |
super.preCreate(activity); |
- // Necessary because NativeUnitTestActivity uses BaseChromiumApplication which does not |
- // initialize ContextUtils. |
- ContextUtils.initApplicationContext(activity.getApplicationContext()); |
// Needed by path_utils_unittest.cc |
- PathUtils.setPrivateDataDirectorySuffix("chrome"); |
+ PathUtils.setPrivateDataDirectorySuffix("chrome", activity.getApplicationContext()); |
// Needed by system_monitor_unittest.cc |
PowerMonitor.createForTests(activity); |
+ ContextUtils.initApplicationContext(activity.getApplicationContext()); |
// For NativeActivity based tests, |
// dependency libraries must be loaded before NativeActivity::OnCreate, |
// otherwise loading android.app.lib_name will fail |