summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2020-07-23 17:39:45 +0000
committerYabin Huang <yabinh@google.com>2020-08-05 18:10:39 +0000
commit5961e8d5388d68a051e440dccfa95953b4018904 (patch)
treee52e6c2f15f49037064d9c62e631c26faa30a2a2
parent427a30db119ef92bf8d612de4f604d9e87862ce1 (diff)
downloadcts-5961e8d5388d68a051e440dccfa95953b4018904.tar.gz
Revert "Add 2 cts tests for FocusFinder"
Revert submission 11830696-b/158492287-stage-aosp-rvc-ts-dev Reason for revert: We reverted the framework change on stage-aosp-rvc-ts-dev and merged it to rvc-qpr-dev. We should do the same to the related cts tests too. Reverted Changes: Ie3d75abb1:Add 2 cts tests for FocusFinder Fixes: 162229346 Change-Id: I207da9b74a2d92ac8be4b813a330744cfbbd99e4
-rw-r--r--tests/tests/view/res/layout/focus_finder_layout.xml6
-rw-r--r--tests/tests/view/src/android/view/cts/FocusFinderCtsActivity.java6
-rw-r--r--tests/tests/view/src/android/view/cts/FocusFinderTest.java19
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);
- }
}