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

Side by Side Diff: base/test/android/javatests/src/org/chromium/base/test/util/SkipCheck.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 5 years 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.base.test.util;
6
7 import junit.framework.TestCase;
8
9 import org.chromium.base.Log;
10
11 import java.lang.reflect.Method;
12
13 /**
14 * Check whether a test case should be skipped.
15 */
16 public abstract class SkipCheck {
17
18 private static final String TAG = "base_test";
19
20 /**
21 *
22 * Checks whether the given test case should be skipped.
23 *
24 * @param testCase The test case to check.
25 * @return Whether the test case should be skipped.
26 */
27 public abstract boolean shouldSkip(TestCase testCase);
28
29 protected static Method getTestMethod(TestCase testCase) {
30 try {
31 return testCase.getClass().getMethod(testCase.getName(), (Class[]) n ull);
32 } catch (NoSuchMethodException e) {
33 Log.e(TAG, "Unable to find %s in %s", testCase.getName(),
34 testCase.getClass().getName(), e);
35 return null;
36 }
37 }
38 }
39
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698