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

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

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 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 349ef347f969a66d90666149d0e3657afa52064b..fdcfcda5625d609c22b2adcf5b6b79c05a314ffa 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
@@ -117,11 +117,11 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
@Override
protected boolean restrictionApplies(String restriction) {
if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_PHONE)
- && DeviceFormFactor.isTablet(getTargetContext())) {
+ && DeviceFormFactor.isTablet()) {
return true;
}
if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_TABLET)
- && !DeviceFormFactor.isTablet(getTargetContext())) {
+ && !DeviceFormFactor.isTablet()) {
return true;
}
if (TextUtils.equals(
@@ -191,12 +191,10 @@ public class ChromeInstrumentationTestRunner extends BaseChromiumInstrumentation
@Override
protected boolean deviceTypeApplies(String type) {
- if (TextUtils.equals(type, ChromeDisableIf.PHONE)
- && !DeviceFormFactor.isTablet(mTargetContext)) {
+ if (TextUtils.equals(type, ChromeDisableIf.PHONE) && !DeviceFormFactor.isTablet()) {
return true;
}
- if (TextUtils.equals(type, ChromeDisableIf.TABLET)
- && DeviceFormFactor.isTablet(mTargetContext)) {
+ if (TextUtils.equals(type, ChromeDisableIf.TABLET) && DeviceFormFactor.isTablet()) {
return true;
}
if (TextUtils.equals(type, ChromeDisableIf.LARGETABLET)

Powered by Google App Engine
This is Rietveld 408576698