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

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

Issue 2760153002: Convert chrome compositor test's InstrumentationTestCases (Closed)
Patch Set: Address comments Created 3 years, 9 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: 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 c446243a63d225087b01f88cb10423740923ed8b..43650dda91e880fb49f6fb0fafad22bd0eaf593c 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
@@ -57,7 +57,7 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
result.addPreTestHook(Policies.getRegistrationHook());
}
- private class ChromeRestrictionSkipCheck extends RestrictionSkipCheck {
+ static class ChromeRestrictionSkipCheck extends RestrictionSkipCheck {
private VrDaydreamApi mDaydreamApi;
private boolean mAttemptedToGetApi;
@@ -128,10 +128,11 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
&& !DeviceFormFactor.isTablet(getTargetContext())) {
return true;
}
- if (TextUtils.equals(restriction,
- ChromeRestriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES)
- && (ConnectionResult.SUCCESS != GoogleApiAvailability.getInstance()
- .isGooglePlayServicesAvailable(getTargetContext()))) {
+ if (TextUtils.equals(
+ restriction, ChromeRestriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES)
+ && (ConnectionResult.SUCCESS
+ != GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
+ getTargetContext()))) {
return true;
}
if (TextUtils.equals(restriction,
@@ -185,8 +186,7 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
}
}
- private class ChromeDisableIfSkipCheck extends DisableIfSkipCheck {
-
+ static class ChromeDisableIfSkipCheck extends DisableIfSkipCheck {
private final Context mTargetContext;
public ChromeDisableIfSkipCheck(Context targetContext) {
@@ -196,15 +196,15 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
@Override
protected boolean deviceTypeApplies(String type) {
if (TextUtils.equals(type, ChromeDisableIf.PHONE)
- && !DeviceFormFactor.isTablet(getTargetContext())) {
+ && !DeviceFormFactor.isTablet(mTargetContext)) {
return true;
}
if (TextUtils.equals(type, ChromeDisableIf.TABLET)
- && DeviceFormFactor.isTablet(getTargetContext())) {
+ && DeviceFormFactor.isTablet(mTargetContext)) {
return true;
}
if (TextUtils.equals(type, ChromeDisableIf.LARGETABLET)
- && DeviceFormFactor.isLargeTablet(getTargetContext())) {
+ && DeviceFormFactor.isLargeTablet(mTargetContext)) {
return true;
}
return false;
« no previous file with comments | « chrome/test/android/BUILD.gn ('k') | chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeJUnit4ClassRunner.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698