Index: base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java |
diff --git a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java |
index fcd60869866f239ecda1d7efc821c5434cb6e579..a48c4ab71301190bef89adf33a2a056832068600 100644 |
--- a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java |
+++ b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java |
@@ -4,7 +4,8 @@ |
package org.chromium.base.test; |
-import android.os.Bundle; |
+import android.app.Application; |
+import android.content.Context; |
import android.support.test.runner.AndroidJUnitRunner; |
import org.chromium.base.multidex.ChromiumMultiDexInstaller; |
@@ -18,8 +19,11 @@ import org.chromium.base.multidex.ChromiumMultiDexInstaller; |
*/ |
public class BaseChromiumAndroidJUnitRunner extends AndroidJUnitRunner { |
@Override |
- public void onCreate(Bundle arguments) { |
- ChromiumMultiDexInstaller.install(getTargetContext()); |
- super.onCreate(arguments); |
+ public Application newApplication(ClassLoader cl, String className, Context context) |
+ throws ClassNotFoundException, IllegalAccessException, InstantiationException { |
+ ChromiumMultiDexInstaller.install(new BaseChromiumRunnerCommon.MultiDexContextWrapper( |
+ getContext(), getTargetContext())); |
+ BaseChromiumRunnerCommon.reorderDexPathElements(cl, getContext(), getTargetContext()); |
+ return super.newApplication(cl, className, context); |
} |
} |