diff options
9 files changed, 52 insertions, 22 deletions
diff --git a/tests/tests/app/src/android/app/cts/ActivityGroupTest.java b/tests/tests/app/src/android/app/cts/ActivityGroupTest.java index 0016f43fb6b..1cc808e94da 100644 --- a/tests/tests/app/src/android/app/cts/ActivityGroupTest.java +++ b/tests/tests/app/src/android/app/cts/ActivityGroupTest.java @@ -16,15 +16,17 @@ package android.app.cts; -import android.app.ActivityGroup; -import android.content.ComponentName; -import android.content.Intent; -import android.os.Bundle; +import dalvik.annotation.BrokenTest; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestTargets; +import android.app.ActivityGroup; +import android.content.ComponentName; +import android.content.Intent; +import android.os.Bundle; + @TestTargetClass(ActivityGroup.class) public class ActivityGroupTest extends ActivityTestsBase { private Intent mTabIntent; @@ -165,6 +167,7 @@ public class ActivityGroupTest extends ActivityTestsBase { args = {} ) }) + @BrokenTest(value="bug 2189784, needs investigation") public void testTabScreen() throws Exception { mIntent = mTabIntent; runLaunchpad(LaunchpadActivity.LIFECYCLE_SCREEN); diff --git a/tests/tests/graphics/src/android/graphics/cts/AvoidXfermodeTest.java b/tests/tests/graphics/src/android/graphics/cts/AvoidXfermodeTest.java index 550c19ed58c..74eda03f03b 100644 --- a/tests/tests/graphics/src/android/graphics/cts/AvoidXfermodeTest.java +++ b/tests/tests/graphics/src/android/graphics/cts/AvoidXfermodeTest.java @@ -15,6 +15,7 @@ */ package android.graphics.cts; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; @@ -46,6 +47,7 @@ public class AvoidXfermodeTest extends TestCase { ) @ToBeFixed(bug = "2034547", explanation = "AvoidXfermode does not work as expected with tolerance 0.") + @KnownFailure(value="bug 2136225") public void testAvoidXfermode() { Paint greenPaint; Paint redAvoidingGreenPaint; diff --git a/tests/tests/graphics/src/android/graphics/cts/TypefaceTest.java b/tests/tests/graphics/src/android/graphics/cts/TypefaceTest.java index c3fef1e9c54..982cb4f3114 100644 --- a/tests/tests/graphics/src/android/graphics/cts/TypefaceTest.java +++ b/tests/tests/graphics/src/android/graphics/cts/TypefaceTest.java @@ -18,6 +18,7 @@ package android.graphics.cts; import com.android.cts.stub.R; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; @@ -162,6 +163,7 @@ public class TypefaceTest extends AndroidTestCase { method = "createFromAsset", args = {android.content.res.AssetManager.class, java.lang.String.class} ) + @KnownFailure(value="bug 2136234") public void testCreateFromAsset() { // input abnormal params. try { diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java index a473cd95415..b9e1e4b85aa 100644 --- a/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java +++ b/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java @@ -115,7 +115,13 @@ public class NinePatchDrawableTest extends InstrumentationTestCase { fail("The constructor should accept null srcname."); } - new NinePatchDrawable(new NinePatch(bmp, chunk, name)); + // Known Failure - should not throw NPE bug 2136234 + // still test for this so test can be adjusted once framework fixed + try { + new NinePatchDrawable(new NinePatch(bmp, chunk, name)); + } catch (NullPointerException e) { + // expected + } // constructor should accept a null NinePatch mNinePatchDrawable = new NinePatchDrawable(null); diff --git a/tests/tests/provider/src/android/provider/cts/ContactsTest.java b/tests/tests/provider/src/android/provider/cts/ContactsTest.java index 2dd59c7ab92..0496385e9c5 100644 --- a/tests/tests/provider/src/android/provider/cts/ContactsTest.java +++ b/tests/tests/provider/src/android/provider/cts/ContactsTest.java @@ -16,6 +16,10 @@ package android.provider.cts; +import dalvik.annotation.BrokenTest; +import dalvik.annotation.KnownFailure; +import dalvik.annotation.TestTargetClass; + import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; @@ -44,9 +48,6 @@ import android.provider.Contacts.Settings; import android.telephony.PhoneNumberUtils; import android.test.InstrumentationTestCase; -import dalvik.annotation.BrokenTest; -import dalvik.annotation.TestTargetClass; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -868,6 +869,7 @@ public class ContactsTest extends InstrumentationTestCase { * Test case for the behavior of the ContactsProvider's groupmembership table * It does not test any APIs in android.provider.Contacts.java */ + @KnownFailure(value="bug 2258907, needs investigation") public void testGroupMembershipTable() { final String[] GROUP_MEMBERSHIP_PROJECTION = new String[] { GroupMembership._ID, GroupMembership.PERSON_ID, diff --git a/tests/tests/text/src/android/text/method/cts/ScrollingMovementMethodTest.java b/tests/tests/text/src/android/text/method/cts/ScrollingMovementMethodTest.java index 31c85a9b9e1..8e6ddde1ea9 100644 --- a/tests/tests/text/src/android/text/method/cts/ScrollingMovementMethodTest.java +++ b/tests/tests/text/src/android/text/method/cts/ScrollingMovementMethodTest.java @@ -16,6 +16,7 @@ package android.text.method.cts; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; @@ -893,6 +894,7 @@ public class ScrollingMovementMethodTest extends ActivityInstrumentationTestCase + "ScrollingMovementMethod#left(TextView, Spannable) and " + "ScrollingMovementMethod#right(TextView, Spannable)" + "when the param widget or buffer is null") + @KnownFailure(value="bug 2323405, needs investigation") public void testHorizontalMovement() throws Throwable { /* * All these assertions depends on whether the TextView has a layout.The text view will not diff --git a/tests/tests/util/src/android/util/cts/TimeUtilsTest.java b/tests/tests/util/src/android/util/cts/TimeUtilsTest.java index fb66a77c838..8a720ef3f12 100644 --- a/tests/tests/util/src/android/util/cts/TimeUtilsTest.java +++ b/tests/tests/util/src/android/util/cts/TimeUtilsTest.java @@ -15,16 +15,21 @@ */ package android.util.cts; -import java.util.Calendar; -import java.util.TimeZone; -import org.apache.harmony.luni.internal.util.ZoneInfoDB; -import junit.framework.TestCase; -import android.util.TimeUtils; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargetNew; import dalvik.annotation.TestTargets; +import org.apache.harmony.luni.internal.util.ZoneInfoDB; + +import android.util.TimeUtils; + +import java.util.Calendar; +import java.util.TimeZone; + +import junit.framework.TestCase; + @TestTargetClass(TimeUtils.class) public class TimeUtilsTest extends TestCase { @TestTargets({ @@ -117,6 +122,7 @@ public class TimeUtilsTest extends TestCase { args = {int.class, boolean.class, long.class, String.class} ) }) + @KnownFailure(value="bug 2323433, needs investigation") public void testWorld() throws Exception { String[] world = new String[] { "ad", "Europe/Andorra", @@ -427,10 +433,14 @@ public class TimeUtilsTest extends TestCase { c.set(2009, Calendar.JULY, 20, 12, 00, 00); guess = guessTimeZone(c, country); + assertNotNull(String.format("guessTimeZone returned null for 07/20/09 %s", name), + guess); assertEquals(name, guess.getID()); // this would failed on emulator for "Shanghai" c.set(2009, Calendar.JANUARY, 20, 12, 00, 00); guess = guessTimeZone(c, country); + assertNotNull(String.format("guessTimeZone returned null for 01/20/09 %s", name), + guess); assertEquals(name, guess.getID()); } } diff --git a/tests/tests/view/src/android/view/cts/ViewStubTest.java b/tests/tests/view/src/android/view/cts/ViewStubTest.java index b29ad2c5924..ca846e07fa1 100644 --- a/tests/tests/view/src/android/view/cts/ViewStubTest.java +++ b/tests/tests/view/src/android/view/cts/ViewStubTest.java @@ -16,11 +16,19 @@ package android.view.cts; +import com.android.cts.stub.R; + +import dalvik.annotation.KnownFailure; +import dalvik.annotation.TestLevel; +import dalvik.annotation.TestTargetClass; +import dalvik.annotation.TestTargetNew; +import dalvik.annotation.TestTargets; +import dalvik.annotation.ToBeFixed; + import org.xmlpull.v1.XmlPullParser; import android.app.Activity; import android.content.Context; -import android.graphics.Canvas; import android.test.ActivityInstrumentationTestCase; import android.test.UiThreadTest; import android.util.AttributeSet; @@ -31,14 +39,6 @@ import android.view.ViewStub; import android.view.ViewStub.OnInflateListener; import android.widget.LinearLayout; -import com.android.cts.stub.R; - -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.ToBeFixed; - /** * Test {@link ViewStub}. */ @@ -149,6 +149,7 @@ public class ViewStubTest extends ActivityInstrumentationTestCase<ViewStubStubAc method = "setVisibility", args = {int.class} ) + @KnownFailure(value="bug 2323459, fixed in future release") @UiThreadTest public void testSetVisibility() { final ViewStub viewStub1 = (ViewStub) mActivity.findViewById(R.id.viewstub); diff --git a/tests/tests/webkit/src/android/webkit/cts/WebIconDatabaseTest.java b/tests/tests/webkit/src/android/webkit/cts/WebIconDatabaseTest.java index 81241c14e29..64b5204e67b 100644 --- a/tests/tests/webkit/src/android/webkit/cts/WebIconDatabaseTest.java +++ b/tests/tests/webkit/src/android/webkit/cts/WebIconDatabaseTest.java @@ -79,6 +79,7 @@ public class WebIconDatabaseTest extends args = {} ) }) + @BrokenTest(value="intermittently fails bug 2250024") public void testOpen() { final WebIconDatabase webIconDatabase = WebIconDatabase.getInstance(); @@ -131,6 +132,7 @@ public class WebIconDatabaseTest extends args = {String.class} ) }) + @BrokenTest(value="intermittently fails bug 2250024") public void testRetainIconForPageUrl() throws Exception { final WebIconDatabase webIconDatabase = WebIconDatabase.getInstance(); webIconDatabase.open(mFilePath); |