| Index: testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
|
| diff --git a/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java b/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
|
| index 86ac990c300d6ed5738c6728d48a38fca71b1a37..8b60b1af69e302c7949e8f0245b9c89a3b9e86a6 100644
|
| --- a/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
|
| +++ b/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
|
| @@ -47,7 +47,7 @@ public AnnotationProcessor(Class<T> annotationClass) {
|
| @Override
|
| public Statement apply(Statement base, Description description) {
|
| mTestDescription = description;
|
| - mAnnotation = description.getAnnotation(mAnnotationClass);
|
| + mAnnotation = getAnnotation(description);
|
| if (mAnnotation == null) return base;
|
|
|
| // Return the wrapped statement to execute before() and after().
|
| @@ -63,4 +63,12 @@ protected Description getTestDescription() {
|
| protected T getAnnotation() {
|
| return mAnnotation;
|
| }
|
| +
|
| + private T getAnnotation(Description description) {
|
| + T annotation = description.getAnnotation(mAnnotationClass);
|
| + if (annotation != null) return annotation;
|
| +
|
| + annotation = description.getTestClass().getAnnotation(mAnnotationClass);
|
| + return annotation;
|
| + }
|
| }
|
|
|