Improve GridLayoutTest

A GridLayoutTest was relying on the fact that a certain text
won't fit horizontally which breaks in landscape.

This CL limits the width of the container to ensure it does
not fit. Even this is flaky since it is using a TextView but
enough to fix the test in landscape for now.

Bug: 30206950
Change-Id: I88387a7ee58ff4585d5a0c16a9f6aff05e1c74a8
diff --git a/v7/gridlayout/tests/res/layout/height_wrap_content_test.xml b/v7/gridlayout/tests/res/layout/height_wrap_content_test.xml
index 308539a..4a618e0 100644
--- a/v7/gridlayout/tests/res/layout/height_wrap_content_test.xml
+++ b/v7/gridlayout/tests/res/layout/height_wrap_content_test.xml
@@ -18,7 +18,7 @@
         xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:app="http://schemas.android.com/apk/res-auto"
         android:id="@+id/gridView"
-        android:layout_width="match_parent"
+        android:layout_width="100dp"
         android:layout_height="wrap_content"
         android:layout_margin="10dp"
         android:background="@android:color/white"
diff --git a/v7/gridlayout/tests/src/android/support/v7/widget/GridLayoutTest.java b/v7/gridlayout/tests/src/android/support/v7/widget/GridLayoutTest.java
index 89ccac7..b343ca33c 100644
--- a/v7/gridlayout/tests/src/android/support/v7/widget/GridLayoutTest.java
+++ b/v7/gridlayout/tests/src/android/support/v7/widget/GridLayoutTest.java
@@ -124,7 +124,7 @@
         assertTrue("test sanity", left > 0);
         assertTrue("test sanity", right > 0);
         assertTrue("test sanity", total > 0);
-        assertTrue("right should be taller than left", right > left);
+        assertTrue("right should be taller than left", right >= left);
         assertTrue("total height should be smaller than what it could be",
                 total < ((ViewGroup) mGridView.getParent()).getHeight());
     }