OSDN Git Service

Update testActivity
authorJerome Gaillard <jgaillard@google.com>
Mon, 7 Nov 2016 17:01:16 +0000 (17:01 +0000)
committerJerome Gaillard <jgaillard@google.com>
Thu, 10 Nov 2016 16:35:09 +0000 (16:35 +0000)
Put android:animateFirstView false in the test application theme
so that the date picker view displays fully.
Update the golden image to reflect the changes.

Change-Id: If57fac5c182dd69b4b4d4fcc30d6f17a8f67ad68
(cherry picked from commit 96970138fc1c8d928a6d3ec362865e6c626f56e4)

tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png
tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/values/styles.xml
tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java

index 9bf302a..7b58539 100644 (file)
Binary files a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png and b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/golden/activity.png differ
index 88c9cbc..c8a5fec 100644 (file)
@@ -3,7 +3,7 @@
     <!-- Base application theme. -->
     <style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
         <item name="myattr">@integer/ten</item>
-        <!-- Customize your theme here. -->
+        <item name="android:animateFirstView">false</item>
     </style>
 
 </resources>
index e7c6cc9..55cfd6d 100644 (file)
@@ -309,15 +309,7 @@ public class Main {
     /** Test activity.xml */
     @Test
     public void testActivity() throws ClassNotFoundException {
-        try {
-            renderAndVerify("activity.xml", "activity.png");
-        } catch (AssertionError e) {
-            // This is a KI in CalendarWidget and DatePicker rendering.
-            // Tracker bug: http://b.android.com/214370
-            if (!e.getLocalizedMessage().startsWith("Images differ (by 6.5%)")) {
-                throw e;
-            }
-        }
+        renderAndVerify("activity.xml", "activity.png");
     }
 
     @Test