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

Unified Diff: base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java

Issue 2160013002: Add device format filter in DisableIf() annotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change mTargetContext to ChromeInstrumentationTestRunner.java. Change type name to be simpler. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java
diff --git a/base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java b/base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java
index 38eb16ada8347d3f83d324f6f1dfc95ce1563e73..bb878cccb93db4e1e0f7335a6b86d76b1cfb98c3 100644
--- a/base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java
+++ b/base/test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java
@@ -36,6 +36,17 @@ public class DisableIfSkipCheck extends SkipCheck {
}
}
+ for (DisableIf.Device d : getAnnotations(method, DisableIf.Device.class)) {
Yaron 2016/07/22 15:43:05 Do you need any modifications in base? Couldn't yo
shenghuazhang 2016/07/22 20:37:32 Yeah. I am not sure which is better, to keep the D
jbudorick 2016/07/27 15:12:52 This way works, and I think I'm ok with it for now
+ for (String deviceType : d.type()) {
+ if (deviceTypeApplies(deviceType)) {
+ Log.i(TAG, "Test " + testCase.getClass().getName() + "#"
+ + testCase.getName() + " disabled because of "
+ + d);
+ return true;
+ }
+ }
+ }
+
return false;
}
@@ -66,5 +77,9 @@ public class DisableIfSkipCheck extends SkipCheck {
&& Build.VERSION.SDK_INT < v.sdk_is_less_than();
}
+ protected boolean deviceTypeApplies(String type) {
+ return false;
+ }
+
}

Powered by Google App Engine
This is Rietveld 408576698