Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c458b2ca authored by Brett Chabot's avatar Brett Chabot Committed by Android (Google) Code Review
Browse files

Merge "Frameworks core tests size cleanup." into gingerbread

parents d194f3d6 f76c56bc
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -18,10 +18,7 @@ package android.app.activity;

import android.content.ComponentName;
import android.content.Intent;
import android.test.FlakyTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.Suppress;

public class LifecycleTest extends ActivityTestsBase {
@@ -37,7 +34,7 @@ public class LifecycleTest extends ActivityTestsBase {
                LaunchpadActivity.class));
    }

    @LargeTest
    @MediumTest
    public void testBasic() throws Exception {
        mIntent = mTopIntent;
        runLaunchpad(LaunchpadActivity.LIFECYCLE_BASIC);
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.frameworks.coretests.R;
import org.xmlpull.v1.XmlPullParser;
@@ -134,7 +133,7 @@ public class MetaDataTest extends AndroidTestCase {
        assertNull("Meta data returned when not requested", si.metaData);
    }

    @MediumTest
    @SmallTest
    public void testProviderWithData() throws Exception {
        ComponentName cn = new ComponentName(mContext, LocalProvider.class);
        ProviderInfo pi = mContext.getPackageManager().resolveContentProvider(
+2 −3
Original line number Diff line number Diff line
@@ -16,13 +16,12 @@

package android.content;

import android.content.Intent;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;

/** Test to make sure brick intents <b>don't</b> work without permission. */
public class BrickDeniedTest extends AndroidTestCase {
    @MediumTest
    @SmallTest
    public void testBrick() {
        // Try both the old and new brick intent names.  Neither should work,
        // since this test application doesn't have the required permission.
+4 −3
Original line number Diff line number Diff line
@@ -16,10 +16,11 @@

package android.content;

import android.content.ContentResolver;
import android.net.Uri;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;

import java.io.InputStream;
import java.util.Arrays;
@@ -46,7 +47,7 @@ public class MemoryFileProviderTest extends AndroidTestCase {
    }

    // tests that we don't leak file descriptors or virtual address space
    @MediumTest
    @LargeTest
    public void testClose() throws Exception {
        ContentResolver resolver = getContext().getContentResolver();
        // open enough file descriptors that we will crash something if we leak FDs
@@ -65,7 +66,7 @@ public class MemoryFileProviderTest extends AndroidTestCase {
    }

    // tests that we haven't broken AssestFileDescriptors for normal files.
    @MediumTest
    @SmallTest
    public void testFile() throws Exception {
        ContentResolver resolver = getContext().getContentResolver();
        Uri uri = Uri.parse("content://android.content.MemoryFileProvider/file");
+11 −9
Original line number Diff line number Diff line
@@ -18,17 +18,19 @@ package android.content;

import com.android.internal.os.AtomicFile;

import android.accounts.Account;
import android.os.Bundle;
import android.test.AndroidTestCase;
import android.test.RenamingDelegatingContext;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.mock.MockContext;
import android.test.mock.MockContentResolver;
import android.accounts.Account;
import android.os.Bundle;
import android.test.mock.MockContext;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;

import java.util.List;
import java.io.File;
import java.io.FileOutputStream;
import java.util.List;

public class SyncStorageEngineTest extends AndroidTestCase {

@@ -57,7 +59,7 @@ public class SyncStorageEngineTest extends AndroidTestCase {
    /**
     * Test that we can create, remove and retrieve periodic syncs
     */
    @SmallTest
    @MediumTest
    public void testPeriodics() throws Exception {
        final Account account1 = new Account("a@example.com", "example.type");
        final Account account2 = new Account("b@example.com", "example.type.2");
@@ -114,7 +116,7 @@ public class SyncStorageEngineTest extends AndroidTestCase {
        }
    }

    @SmallTest
    @LargeTest
    public void testAuthorityPersistence() throws Exception {
        final Account account1 = new Account("a@example.com", "example.type");
        final Account account2 = new Account("b@example.com", "example.type.2");
@@ -197,7 +199,7 @@ public class SyncStorageEngineTest extends AndroidTestCase {
        assertEquals(0, engine.getIsSyncable(account2, authority2));
    }

    @SmallTest
    @MediumTest
    public void testAuthorityParsing() throws Exception {
        final Account account = new Account("account1", "type1");
        final String authority1 = "auth1";
@@ -299,7 +301,7 @@ public class SyncStorageEngineTest extends AndroidTestCase {
        assertEquals(sync3s, syncs.get(0));
    }

    @SmallTest
    @MediumTest
    public void testAuthorityRenaming() throws Exception {
        final Account account1 = new Account("acc1", "type1");
        final Account account2 = new Account("acc2", "type2");
Loading