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

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

Issue 1587253003: Revert of [Android] Rework multidex and enable multidex for unit_tests_apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/base.gyp ('k') | build/android/gyp/configure_multidex.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.content.Context; 7 import android.content.Context;
8 import android.net.ConnectivityManager; 8 import android.net.ConnectivityManager;
9 import android.net.NetworkInfo; 9 import android.net.NetworkInfo;
10 import android.os.Build; 10 import android.os.Build;
11 import android.os.Bundle; 11 import android.os.Bundle;
12 import android.test.AndroidTestRunner; 12 import android.test.AndroidTestRunner;
13 import android.test.InstrumentationTestRunner; 13 import android.test.InstrumentationTestRunner;
14 import android.text.TextUtils; 14 import android.text.TextUtils;
15 15
16 import junit.framework.TestCase; 16 import junit.framework.TestCase;
17 import junit.framework.TestResult; 17 import junit.framework.TestResult;
18 18
19 import org.chromium.base.Log; 19 import org.chromium.base.Log;
20 import org.chromium.base.SysUtils; 20 import org.chromium.base.SysUtils;
21 import org.chromium.base.multidex.ChromiumMultiDexInstaller; 21 import org.chromium.base.multidex.ChromiumMultiDex;
22 import org.chromium.base.test.util.CommandLineFlags; 22 import org.chromium.base.test.util.CommandLineFlags;
23 import org.chromium.base.test.util.DisableIfSkipCheck; 23 import org.chromium.base.test.util.DisableIfSkipCheck;
24 import org.chromium.base.test.util.MinAndroidSdkLevel; 24 import org.chromium.base.test.util.MinAndroidSdkLevel;
25 import org.chromium.base.test.util.Restriction; 25 import org.chromium.base.test.util.Restriction;
26 import org.chromium.base.test.util.SkipCheck; 26 import org.chromium.base.test.util.SkipCheck;
27 import org.chromium.test.reporter.TestStatusListener; 27 import org.chromium.test.reporter.TestStatusListener;
28 28
29 import java.lang.reflect.Method; 29 import java.lang.reflect.Method;
30 30
31 // TODO(jbudorick): Add support for on-device handling of timeouts. 31 // TODO(jbudorick): Add support for on-device handling of timeouts.
32 /** 32 /**
33 * An Instrumentation test runner that checks SDK level for tests with specific requirements. 33 * An Instrumentation test runner that checks SDK level for tests with specific requirements.
34 */ 34 */
35 public class BaseInstrumentationTestRunner extends InstrumentationTestRunner { 35 public class BaseInstrumentationTestRunner extends InstrumentationTestRunner {
36 private static final String TAG = "base_test"; 36 private static final String TAG = "base_test";
37 37
38 @Override 38 @Override
39 public void onCreate(Bundle arguments) { 39 public void onCreate(Bundle arguments) {
40 ChromiumMultiDexInstaller.install(getTargetContext()); 40 ChromiumMultiDex.install(getTargetContext());
41 super.onCreate(arguments); 41 super.onCreate(arguments);
42 } 42 }
43 43
44 @Override 44 @Override
45 protected AndroidTestRunner getAndroidTestRunner() { 45 protected AndroidTestRunner getAndroidTestRunner() {
46 AndroidTestRunner runner = new AndroidTestRunner() { 46 AndroidTestRunner runner = new AndroidTestRunner() {
47 @Override 47 @Override
48 protected TestResult createTestResult() { 48 protected TestResult createTestResult() {
49 BaseTestResult r = new BaseTestResult(BaseInstrumentationTestRun ner.this); 49 BaseTestResult r = new BaseTestResult(BaseInstrumentationTestRun ner.this);
50 addTestHooks(r); 50 addTestHooks(r);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 Log.i(TAG, "Test " + testClass.getName() + "#" + testCase.ge tName() 136 Log.i(TAG, "Test " + testClass.getName() + "#" + testCase.ge tName()
137 + " is not enabled at SDK level " + Build.VERSION.SD K_INT 137 + " is not enabled at SDK level " + Build.VERSION.SD K_INT
138 + "."); 138 + ".");
139 return true; 139 return true;
140 } 140 }
141 } 141 }
142 return false; 142 return false;
143 } 143 }
144 } 144 }
145 } 145 }
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | build/android/gyp/configure_multidex.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698