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

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

Issue 2412623002: Reland "Move PathUtils to use ContextUtils." (Closed)
Patch Set: Created 4 years, 2 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/shell_apk/src/org/chromium/content_shell_apk/ContentShellApplication.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d7209ba836e58757d4b9e6a9f1634c2080ab8fca..c71effa808cab603755bd1c22850c411480eb7f4 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,14 +21,16 @@ 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", activity.getApplicationContext());
+ PathUtils.setPrivateDataDirectorySuffix("chrome");
// 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
« no previous file with comments | « content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellApplication.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698