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

Side by Side Diff: base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java

Issue 2839983002: [Android] Enable multidex for release builds of chrome_public_test_apk. (RELAND) (Closed)
Patch Set: roll deps Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.base.test; 5 package org.chromium.base.test;
6 6
7 import android.os.Bundle; 7 import android.app.Application;
8 import android.content.Context;
8 import android.support.test.runner.AndroidJUnitRunner; 9 import android.support.test.runner.AndroidJUnitRunner;
9 10
10 import org.chromium.base.multidex.ChromiumMultiDexInstaller; 11 import org.chromium.base.multidex.ChromiumMultiDexInstaller;
11 12
12 /** 13 /**
13 * A custom AndroidJUnitRunner that supports multidex installer. 14 * A custom AndroidJUnitRunner that supports multidex installer.
14 * 15 *
15 * This class is the equivalent of BaseChromiumInstrumentationTestRunner in JUni t3. Please 16 * This class is the equivalent of BaseChromiumInstrumentationTestRunner in JUni t3. Please
16 * beware that is this not a class runner. It is declared in test apk AndroidMan ifest.xml 17 * beware that is this not a class runner. It is declared in test apk AndroidMan ifest.xml
17 * <instrumentation> 18 * <instrumentation>
18 */ 19 */
19 public class BaseChromiumAndroidJUnitRunner extends AndroidJUnitRunner { 20 public class BaseChromiumAndroidJUnitRunner extends AndroidJUnitRunner {
20 @Override 21 @Override
21 public void onCreate(Bundle arguments) { 22 public Application newApplication(ClassLoader cl, String className, Context context)
22 ChromiumMultiDexInstaller.install(getTargetContext()); 23 throws ClassNotFoundException, IllegalAccessException, Instantiation Exception {
23 super.onCreate(arguments); 24 ChromiumMultiDexInstaller.install(new BaseChromiumRunnerCommon.MultiDexC ontextWrapper(
25 getContext(), getTargetContext()));
26 BaseChromiumRunnerCommon.reorderDexPathElements(cl, getContext(), getTar getContext());
27 return super.newApplication(cl, className, context);
24 } 28 }
25 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698