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

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

Issue 1761383002: [Android] Restrict tests inheriting from DocumentModeTestBase to phones. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java ('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 62264c8c7b39682820c12e64e6709be94746b8db..671c9b2704c9f3dff36ab6cb500ebe3002ea1011 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
@@ -4,6 +4,7 @@
package org.chromium.chrome.test;
+import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
@@ -15,6 +16,7 @@ import junit.framework.TestCase;
import org.chromium.base.test.BaseInstrumentationTestRunner;
import org.chromium.base.test.BaseTestResult;
+import org.chromium.base.test.util.RestrictionSkipCheck;
import org.chromium.base.test.util.SkipCheck;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.test.util.ChromeRestriction;
@@ -44,13 +46,17 @@ public class ChromeInstrumentationTestRunner extends BaseInstrumentationTestRunn
protected void addTestHooks(BaseTestResult result) {
super.addTestHooks(result);
result.addSkipCheck(new DisableInTabbedModeSkipCheck());
- result.addSkipCheck(new ChromeRestrictionSkipCheck());
+ result.addSkipCheck(new ChromeRestrictionSkipCheck(getTargetContext()));
result.addPreTestHook(Policies.getRegistrationHook());
}
private class ChromeRestrictionSkipCheck extends RestrictionSkipCheck {
+ public ChromeRestrictionSkipCheck(Context targetContext) {
+ super(targetContext);
+ }
+
@Override
protected boolean restrictionApplies(String restriction) {
if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_PHONE)
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698