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

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

Issue 1519523002: [Android] Support conditional test disabling based on android.os.Build values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix one outdated use of SkipCheck Created 4 years, 12 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 | « chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java ('k') | no next file » | 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.chrome.test; 5 package org.chromium.chrome.test;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.os.Bundle; 8 import android.os.Bundle;
9 import android.os.Environment; 9 import android.os.Environment;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 import android.util.Log; 11 import android.util.Log;
12 12
13 import junit.framework.TestCase; 13 import junit.framework.TestCase;
14 14
15 import org.chromium.base.test.BaseInstrumentationTestRunner; 15 import org.chromium.base.test.BaseInstrumentationTestRunner;
16 import org.chromium.base.test.BaseTestResult; 16 import org.chromium.base.test.BaseTestResult;
17 import org.chromium.base.test.BaseTestResult.SkipCheck;
18 import org.chromium.base.test.util.Restriction; 17 import org.chromium.base.test.util.Restriction;
18 import org.chromium.base.test.util.SkipCheck;
19 import org.chromium.chrome.browser.util.FeatureUtilities; 19 import org.chromium.chrome.browser.util.FeatureUtilities;
20 import org.chromium.chrome.test.util.DisableInTabbedMode; 20 import org.chromium.chrome.test.util.DisableInTabbedMode;
21 import org.chromium.net.test.BaseHttpTestServer; 21 import org.chromium.net.test.BaseHttpTestServer;
22 import org.chromium.policy.test.annotations.Policies; 22 import org.chromium.policy.test.annotations.Policies;
23 import org.chromium.ui.base.DeviceFormFactor; 23 import org.chromium.ui.base.DeviceFormFactor;
24 24
25 import java.io.File; 25 import java.io.File;
26 import java.io.IOException; 26 import java.io.IOException;
27 import java.lang.reflect.Method; 27 import java.lang.reflect.Method;
28 import java.net.Socket; 28 import java.net.Socket;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 && !DeviceFormFactor.isTablet(getTargetContext())) { 230 && !DeviceFormFactor.isTablet(getTargetContext())) {
231 return true; 231 return true;
232 } 232 }
233 return false; 233 return false;
234 } 234 }
235 } 235 }
236 236
237 /** 237 /**
238 * Checks for tests that should only run in document mode. 238 * Checks for tests that should only run in document mode.
239 */ 239 */
240 private class DisableInTabbedModeSkipCheck implements SkipCheck { 240 private class DisableInTabbedModeSkipCheck extends SkipCheck {
241 241
242 /** 242 /**
243 * If the test is running in tabbed mode, checks for 243 * If the test is running in tabbed mode, checks for
244 * {@link org.chromium.chrome.test.util.DisableInTabbedMode}. 244 * {@link org.chromium.chrome.test.util.DisableInTabbedMode}.
245 * 245 *
246 * @param testCase The test to check. 246 * @param testCase The test to check.
247 * @return Whether the test is running in tabbed mode and has been marke d as disabled in 247 * @return Whether the test is running in tabbed mode and has been marke d as disabled in
248 * tabbed mode. 248 * tabbed mode.
249 */ 249 */
250 @Override 250 @Override
(...skipping 10 matching lines...) Expand all
261 } 261 }
262 } 262 }
263 } catch (NoSuchMethodException e) { 263 } catch (NoSuchMethodException e) {
264 Log.e(TAG, "Couldn't find test method: " + e.toString()); 264 Log.e(TAG, "Couldn't find test method: " + e.toString());
265 } 265 }
266 266
267 return false; 267 return false;
268 } 268 }
269 } 269 }
270 } 270 }
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698