diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-08-06 20:04:48 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-08-06 20:04:48 +0000 |
commit | 348a45c8b73557891460d8f12773a0a483c7b28d (patch) | |
tree | 89878454431d3d4886737a6640846a3a3d453aae | |
parent | 926f77049a71f5a0d354904a362fffa919a2a363 (diff) | |
parent | ec228c06c6dbd3668a8a7d67544a582de9d47377 (diff) | |
download | cts-348a45c8b73557891460d8f12773a0a483c7b28d.tar.gz |
Merge "Revert "Add 2 cts tests for FocusFinder"" into stage-aosp-rvc-ts-dev am: ec228c06c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/12219460
Change-Id: Ic9bbb53914f3780faffd44e48c70c3c778b48183
3 files changed, 1 insertions, 30 deletions
diff --git a/tests/tests/view/res/layout/focus_finder_layout.xml b/tests/tests/view/res/layout/focus_finder_layout.xml index 4e2726c7f78..1dea6846cce 100644 --- a/tests/tests/view/res/layout/focus_finder_layout.xml +++ b/tests/tests/view/res/layout/focus_finder_layout.xml @@ -46,11 +46,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/layout"> - <android.view.cts.TestButton - android:id="@+id/bottom_button" - android:layout_width="60dp" - android:layout_height="match_parent" - android:text="B" /> + </LinearLayout> </RelativeLayout> diff --git a/tests/tests/view/src/android/view/cts/FocusFinderCtsActivity.java b/tests/tests/view/src/android/view/cts/FocusFinderCtsActivity.java index 300d3a58e9c..ae0b4bf08f9 100644 --- a/tests/tests/view/src/android/view/cts/FocusFinderCtsActivity.java +++ b/tests/tests/view/src/android/view/cts/FocusFinderCtsActivity.java @@ -25,8 +25,6 @@ public class FocusFinderCtsActivity extends Activity { public ViewGroup layout; - public ViewGroup inflateLayout; - public Button topLeftButton; public Button topRightButton; @@ -35,19 +33,15 @@ public class FocusFinderCtsActivity extends Activity { public Button bottomRightButton; - public Button bottomButton; - @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.focus_finder_layout); layout = (ViewGroup) findViewById(R.id.layout); - inflateLayout = (ViewGroup) findViewById(R.id.inflate_layout); topLeftButton = (Button) findViewById(R.id.top_left_button); topRightButton = (Button) findViewById(R.id.top_right_button); bottomLeftButton = (Button) findViewById(R.id.bottom_left_button); bottomRightButton = (Button) findViewById(R.id.bottom_right_button); - bottomButton = (Button) findViewById(R.id.bottom_button); } } diff --git a/tests/tests/view/src/android/view/cts/FocusFinderTest.java b/tests/tests/view/src/android/view/cts/FocusFinderTest.java index 53992ceb2af..11e921ab559 100644 --- a/tests/tests/view/src/android/view/cts/FocusFinderTest.java +++ b/tests/tests/view/src/android/view/cts/FocusFinderTest.java @@ -18,7 +18,6 @@ package android.view.cts; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -45,12 +44,10 @@ import org.junit.runner.RunWith; public class FocusFinderTest { private FocusFinder mFocusFinder; private ViewGroup mLayout; - private ViewGroup mInflateLayout; private Button mTopLeft; private Button mTopRight; private Button mBottomLeft; private Button mBottomRight; - private Button mBottom; @Rule public ActivityTestRule<FocusFinderCtsActivity> mActivityRule = @@ -62,17 +59,14 @@ public class FocusFinderTest { mFocusFinder = FocusFinder.getInstance(); mLayout = activity.layout; - mInflateLayout = activity.inflateLayout; mTopLeft = activity.topLeftButton; mTopRight = activity.topRightButton; mBottomLeft = activity.bottomLeftButton; mBottomRight = activity.bottomRightButton; - mBottom = activity.bottomButton; mTopLeft.setNextFocusLeftId(View.NO_ID); mTopRight.setNextFocusLeftId(View.NO_ID); mBottomLeft.setNextFocusLeftId(View.NO_ID); mBottomRight.setNextFocusLeftId(View.NO_ID); - mBottom.setNextFocusLeftId(View.NO_ID); } @Test @@ -462,17 +456,4 @@ public class FocusFinderTest { view.setRight(right); view.setBottom(bottom); } - - @Test - public void testFindNextFocusDoesNotReturnItself() { - View nextFocus = mFocusFinder.findNextFocus(mInflateLayout, mBottom, View.FOCUS_FORWARD); - assertNull(nextFocus); - } - - @Test - public void testFindPreviousFocusDoesNotReturnItself() { - View previousFocus = - mFocusFinder.findNextFocus(mInflateLayout, mBottom, View.FOCUS_BACKWARD); - assertNull(previousFocus); - } } |