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

Side by Side Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java

Issue 2814533002: Adding a new annotation to set ChildProcessAllocator settings in tests. (Closed)
Patch Set: Clean-up 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 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.chrome.test; 5 package org.chromium.chrome.test;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 11
12 import com.google.android.gms.common.ConnectionResult; 12 import com.google.android.gms.common.ConnectionResult;
13 import com.google.android.gms.common.GoogleApiAvailability; 13 import com.google.android.gms.common.GoogleApiAvailability;
14 14
15 import org.chromium.base.ThreadUtils; 15 import org.chromium.base.ThreadUtils;
16 import org.chromium.base.test.BaseChromiumInstrumentationTestRunner;
17 import org.chromium.base.test.BaseTestResult; 16 import org.chromium.base.test.BaseTestResult;
18 import org.chromium.base.test.util.DisableIfSkipCheck; 17 import org.chromium.base.test.util.DisableIfSkipCheck;
19 import org.chromium.base.test.util.RestrictionSkipCheck; 18 import org.chromium.base.test.util.RestrictionSkipCheck;
20 import org.chromium.chrome.browser.ChromeVersionInfo; 19 import org.chromium.chrome.browser.ChromeVersionInfo;
21 import org.chromium.chrome.browser.vr_shell.VrClassesWrapper; 20 import org.chromium.chrome.browser.vr_shell.VrClassesWrapper;
22 import org.chromium.chrome.browser.vr_shell.VrDaydreamApi; 21 import org.chromium.chrome.browser.vr_shell.VrDaydreamApi;
23 import org.chromium.chrome.test.util.ChromeDisableIf; 22 import org.chromium.chrome.test.util.ChromeDisableIf;
24 import org.chromium.chrome.test.util.ChromeRestriction; 23 import org.chromium.chrome.test.util.ChromeRestriction;
24 import org.chromium.content.browser.test.ContentInstrumentationTestRunner;
25 import org.chromium.policy.test.annotations.Policies; 25 import org.chromium.policy.test.annotations.Policies;
26 import org.chromium.ui.base.DeviceFormFactor; 26 import org.chromium.ui.base.DeviceFormFactor;
27 27
28 import java.lang.reflect.Constructor; 28 import java.lang.reflect.Constructor;
29 import java.lang.reflect.InvocationTargetException; 29 import java.lang.reflect.InvocationTargetException;
30 import java.util.concurrent.Callable; 30 import java.util.concurrent.Callable;
31 import java.util.concurrent.CancellationException; 31 import java.util.concurrent.CancellationException;
32 import java.util.concurrent.ExecutionException; 32 import java.util.concurrent.ExecutionException;
33 import java.util.concurrent.FutureTask; 33 import java.util.concurrent.FutureTask;
34 34
35 /** 35 /**
36 * An Instrumentation test runner that optionally spawns a test HTTP server. 36 * An Instrumentation test runner that optionally spawns a test HTTP server.
37 * The server's root directory is the device's external storage directory. 37 * The server's root directory is the device's external storage directory.
38 */ 38 */
39 public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation TestRunner { 39 public class ChromeInstrumentationTestRunner extends ContentInstrumentationTestR unner {
40
41 private static final String TAG = "ChromeInstrumentationTestRunner"; 40 private static final String TAG = "ChromeInstrumentationTestRunner";
42 41
43 @Override 42 @Override
44 public void onCreate(Bundle arguments) { 43 public void onCreate(Bundle arguments) {
45 super.onCreate(arguments); 44 super.onCreate(arguments);
46 } 45 }
47 46
48 @Override 47 @Override
49 protected void addTestHooks(BaseTestResult result) { 48 protected void addTestHooks(BaseTestResult result) {
50 super.addTestHooks(result); 49 super.addTestHooks(result);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return true; 200 return true;
202 } 201 }
203 if (TextUtils.equals(type, ChromeDisableIf.LARGETABLET) 202 if (TextUtils.equals(type, ChromeDisableIf.LARGETABLET)
204 && DeviceFormFactor.isLargeTablet(mTargetContext)) { 203 && DeviceFormFactor.isLargeTablet(mTargetContext)) {
205 return true; 204 return true;
206 } 205 }
207 return false; 206 return false;
208 } 207 }
209 } 208 }
210 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698