Fix for TabHost_TabSpecTest

Bug 5198068

New design only shows the icon when no TextView label
is present.

Change-Id: Ie70a9690e985443b64281a8db673d6155dedecea
diff --git a/tests/tests/widget/src/android/widget/cts/TabHost_TabSpecTest.java b/tests/tests/widget/src/android/widget/cts/TabHost_TabSpecTest.java
index 78a52ef..6a6b5b9 100644
--- a/tests/tests/widget/src/android/widget/cts/TabHost_TabSpecTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TabHost_TabSpecTest.java
@@ -100,7 +100,7 @@
 
         // normal value
         Drawable d = new ColorDrawable(Color.GRAY);
-        tabSpec.setIndicator(TAG_TAB2, d);
+        tabSpec.setIndicator("", d);
         tabSpec.setContent(new MockTabContentFactoryText());
         mTabHost.addTab(tabSpec);
         mTabHost.setCurrentTab(1);
@@ -109,7 +109,7 @@
         int idIcon = com.android.internal.R.id.icon;
         TextView tvTitle = (TextView) currentTabView.findViewById(idTitle);
         ImageView ivIcon = ((ImageView) currentTabView.findViewById(idIcon));
-        assertEquals(TAG_TAB2, tvTitle.getText().toString());
+        assertEquals("", tvTitle.getText().toString());
         assertSame(d, ivIcon.getDrawable());
 
         // exceptional
@@ -134,6 +134,17 @@
         ivIcon = ((ImageView) currentTabView.findViewById(idIcon));
         assertEquals("", tvTitle.getText().toString());
         assertNull(ivIcon.getDrawable());
+
+        tabSpec = mTabHost.newTabSpec("tab 5");
+        tabSpec.setIndicator("half cube", d);
+        tabSpec.setContent(new MockTabContentFactoryList());
+        mTabHost.addTab(tabSpec);
+        mTabHost.setCurrentTab(4);
+        currentTabView = mTabHost.getCurrentTabView();
+        tvTitle = (TextView) currentTabView.findViewById(idTitle);
+        ivIcon = ((ImageView) currentTabView.findViewById(idIcon));
+        assertEquals("half cube", tvTitle.getText().toString());
+        assertNull(ivIcon.getDrawable());
     }
 
     @TestTargetNew(