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

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

Issue 1582513003: Add a testing restriction for whether Google Play Services is up-to-date. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« chrome/test/android/BUILD.gn ('K') | « chrome/test/android/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java
index 25fb441181fb564e6283a3789dce5c4d8b7c0e1f..cb2d89ab0e0435d9dc452bcf3eb9c56f940ee53d 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java
@@ -10,6 +10,9 @@ import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.GoogleApiAvailability;
+
import junit.framework.TestCase;
import org.chromium.base.test.BaseInstrumentationTestRunner;
@@ -230,6 +233,12 @@ public class ChromeInstrumentationTestRunner extends BaseInstrumentationTestRunn
&& !DeviceFormFactor.isTablet(getTargetContext())) {
return true;
}
+ if (TextUtils.equals(restriction, Restriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES)
+ && (ConnectionResult.SUCCESS != GoogleApiAvailability.getInstance()
+ .isGooglePlayServicesAvailable(getTargetContext()))) {
jbudorick 2016/01/13 14:43:50 It's not clear to me from the docs (https://develo
Yaron 2016/01/13 15:54:30 Hmm, I didn't rule out the possibility that undern
+ return true;
+ }
+
return false;
}
}
« chrome/test/android/BUILD.gn ('K') | « chrome/test/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698