Commit f872bb1a authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I9da3b25b into eclair

* changes:
  CTS test cleanup: mark known failures.
parents 0baaf4cf 68897e40
......@@ -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);
......
......@@ -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;
......
......@@ -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 {
......
......@@ -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);
......
......@@ -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,
......
......@@ -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
......
......@@ -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());
}
}
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment