summaryrefslogtreecommitdiff
path: root/tests/testables
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2017-06-20 00:11:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-20 00:11:45 +0000
commit3998a5ccc6baa4c5d736e6e4aae763caa335d93a (patch)
tree85298dacc9ca0593b76d25f19758c01269da05a7 /tests/testables
parent1e7b0c81bfee52070950ab097abb1375505ba736 (diff)
parentd5c0ef9467a764a8a473b3c2009abc7396f61084 (diff)
Merge "Revive DeadZone" into oc-dev am: b278424fa6 am: 305fe47d65
am: d5c0ef9467 Change-Id: Iec82102d862097ef3242da9103996afe94f0909c
Diffstat (limited to 'tests/testables')
-rw-r--r--tests/testables/src/android/testing/BaseFragmentTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testables/src/android/testing/BaseFragmentTest.java b/tests/testables/src/android/testing/BaseFragmentTest.java
index 5cedbdffed35..5fa065a9135a 100644
--- a/tests/testables/src/android/testing/BaseFragmentTest.java
+++ b/tests/testables/src/android/testing/BaseFragmentTest.java
@@ -50,7 +50,7 @@ public abstract class BaseFragmentTest {
private static final int VIEW_ID = 42;
private final Class<? extends Fragment> mCls;
private Handler mHandler;
- private FrameLayout mView;
+ protected FrameLayout mView;
protected FragmentController mFragments;
protected Fragment mFragment;
@@ -61,9 +61,13 @@ public abstract class BaseFragmentTest {
mCls = cls;
}
+ protected void createRootView() {
+ mView = new FrameLayout(mContext);
+ }
+
@Before
public void setupFragment() throws Exception {
- mView = new FrameLayout(mContext);
+ createRootView();
mView.setId(VIEW_ID);
assertNotNull("BaseFragmentTest must be tagged with @RunWithLooper",