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

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

Issue 2406093002: Fix monochrome not booting issue (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
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

Powered by Google App Engine
This is Rietveld 408576698