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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java

Issue 2766393004: Convert most of the rest of instrumentation tests in content (Closed)
Patch Set: Keep @CommenLineFlags 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: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java
index ba3d5cfa664603720c3ce49d691b71863f9e5157..714c2111e44ec7fd526950ca2fa9a483045139aa 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeActivityTestRule.java
@@ -20,16 +20,22 @@ import java.lang.annotation.Annotation;
public class JavaBridgeActivityTestRule
extends ContentShellActivityTestRule implements TestCommonCallback<ContentShellActivity> {
private JavaBridgeTestCommon mTestCommon;
+ private final boolean mSetup;
public JavaBridgeActivityTestRule() {
+ this(true);
+ }
+
+ public JavaBridgeActivityTestRule(boolean setUp) {
jbudorick 2017/04/04 00:39:55 Should this use https://codereview.chromium.org/27
the real yoland 2017/04/04 17:41:25 Yes, will change to that once it lands
super();
+ mSetup = setUp;
mTestCommon = new JavaBridgeTestCommon(this);
}
/**
* Sets up the ContentView. Intended to be called from setUp().
*/
- private void setUpContentView() {
+ public void setUpContentView() {
mTestCommon.setUpContentView();
}
@@ -65,7 +71,9 @@ public class JavaBridgeActivityTestRule
return super.apply(new Statement() {
@Override
public void evaluate() throws Throwable {
- setUpContentView();
+ if (mSetup) {
+ setUpContentView();
+ }
base.evaluate();
}
}, desc);

Powered by Google App Engine
This is Rietveld 408576698