Removing CTS Verifier Tests

Nobody runs the tests. "make cts" doesn't build them either,
so these are just a build breakage waiting to happen.

Change-Id: If4aaf411944253bc97376c4f6415a8c75aef4055
diff --git a/apps/CtsVerifier/tests/Android.mk b/apps/CtsVerifier/tests/Android.mk
deleted file mode 100644
index b9572fb..0000000
--- a/apps/CtsVerifier/tests/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := CtsVerifierTests
-
-LOCAL_INSTRUMENTATION_FOR := CtsVerifier
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/apps/CtsVerifier/tests/AndroidManifest.xml b/apps/CtsVerifier/tests/AndroidManifest.xml
deleted file mode 100644
index 7b642d9..0000000
--- a/apps/CtsVerifier/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="com.android.cts.verifier.test"
-      android:versionCode="1"
-      android:versionName="1.0">
-    
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <instrumentation android:targetPackage="com.android.cts.verifier" android:name="android.test.InstrumentationTestRunner" />
-    
-</manifest> 
\ No newline at end of file
diff --git a/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java b/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java
deleted file mode 100644
index a7d5df5..0000000
--- a/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier;
-
-import android.app.Activity;
-import android.app.Instrumentation;
-import android.app.Instrumentation.ActivityMonitor;
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.Button;
-import android.widget.TextView;
-
-import java.util.concurrent.TimeUnit;
-
-public class CtsVerifierActivityTest
-        extends ActivityInstrumentationTestCase2<CtsVerifierActivity> {
-
-    private Activity mActivity;
-    private Instrumentation mInstrumentation;
-    private TextView mWelcomeTextView;
-    private Button mContinueButton;
-    private String mWelcomeText;
-    private String mContinueText;
-
-    public CtsVerifierActivityTest() {
-        super(CtsVerifierActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mActivity = getActivity();
-        mInstrumentation = getInstrumentation();
-        mWelcomeTextView = (TextView) mActivity.findViewById(R.id.welcome_text);
-        mWelcomeText = mActivity.getString(R.string.welcome_text);
-        mContinueButton = (Button) mActivity.findViewById(R.id.continue_button);
-        mContinueText = mActivity.getString(R.string.continue_button_text);
-    }
-
-    public void testPreconditions() {
-        assertNotNull(mWelcomeTextView);
-        assertNotNull(mWelcomeText);
-        assertNotNull(mContinueButton);
-    }
-
-    public void testWelcome() {
-        assertEquals(mWelcomeText, mWelcomeTextView.getText().toString());
-        assertEquals(mContinueText, mContinueButton.getText().toString());
-    }
-
-    /** Check that the continue button leads to the test list successfully. */
-    public void testContinueButton() throws Throwable {
-        ActivityMonitor monitor =
-                new ActivityMonitor(TestListActivity.class.getName(), null, false);
-        mInstrumentation.addMonitor(monitor);
-
-        runTestOnUiThread(new Runnable() {
-            public void run() {
-               assertTrue(mContinueButton.performClick());
-            }
-        });
-
-        Activity activity = mInstrumentation.waitForMonitorWithTimeout(monitor,
-                TimeUnit.SECONDS.toMillis(10));
-        assertNotNull(activity);
-        activity.finish();
-    }
-}
diff --git a/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestListActivityTest.java b/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestListActivityTest.java
deleted file mode 100644
index 8961c16..0000000
--- a/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestListActivityTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier;
-
-import android.app.Activity;
-import android.app.Instrumentation;
-import android.app.Instrumentation.ActivityMonitor;
-import android.content.ContentResolver;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.Cursor;
-import android.test.ActivityInstrumentationTestCase2;
-import android.view.KeyEvent;
-
-import java.util.concurrent.TimeUnit;
-
-public class TestListActivityTest
-        extends ActivityInstrumentationTestCase2<TestListActivity> {
-
-    private TestListActivity mActivity;
-    private Instrumentation mInstrumentation;
-
-    public TestListActivityTest() {
-        super(TestListActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mActivity = getActivity();
-        mInstrumentation = getInstrumentation();
-    }
-
-    /** Check that querying the for manual tests somewhat works. */
-    public void testListAdapter() {
-        assertNotNull(mActivity.getListAdapter());
-        assertTrue(mActivity.getListAdapter().getCount() > 0);
-    }
-
-    /** Test that clicking on an item launches a test. */
-    public void testLaunchAndFinishTestActivity() throws Throwable {
-        clearAllTestResults();
-        Activity testActivity = launchTestActivity();
-        finishTestActivity(testActivity);
-    }
-
-    private void clearAllTestResults() throws Throwable {
-        runTestOnUiThread(new Runnable() {
-            public void run() {
-                ContentResolver resolver = mActivity.getContentResolver();
-                resolver.delete(TestResultsProvider.RESULTS_CONTENT_URI, "1", null);
-
-                Cursor cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI,
-                        TestResultsProvider.ALL_COLUMNS, null, null, null);
-                assertEquals(0, cursor.getCount());
-                cursor.close();
-            }
-        });
-    }
-
-    private Activity launchTestActivity() {
-        IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN);
-        filter.addCategory(TestListAdapter.CATEGORY_MANUAL_TEST);
-
-        ActivityMonitor monitor = new ActivityMonitor(filter, null, false);
-        mInstrumentation.addMonitor(monitor);
-
-        sendKeys(KeyEvent.KEYCODE_ENTER);
-
-        Activity activity = mInstrumentation.waitForMonitorWithTimeout(monitor,
-                TimeUnit.SECONDS.toMillis(1));
-        assertNotNull(activity);
-        return activity;
-    }
-
-    private void finishTestActivity(Activity activity) throws Throwable {
-        TestResult.setPassedResult(activity);
-        activity.finish();
-        mInstrumentation.waitForIdleSync();
-
-        ContentResolver resolver = mActivity.getContentResolver();
-        Cursor cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI,
-                TestResultsProvider.ALL_COLUMNS, null, null, null);
-        assertEquals(1, cursor.getCount());
-        cursor.close();
-    }
-}
diff --git a/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestResultsProviderTest.java b/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestResultsProviderTest.java
deleted file mode 100644
index 9999125..0000000
--- a/apps/CtsVerifier/tests/src/com/android/cts/verifier/TestResultsProviderTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.android.cts.verifier;
-
-import android.content.ContentValues;
-import android.database.Cursor;
-import android.net.Uri;
-import android.test.ProviderTestCase2;
-
-public class TestResultsProviderTest extends ProviderTestCase2<TestResultsProvider> {
-
-    private static final String FOO_TEST_NAME = "com.android.cts.verifier.foo.FooActivity";
-
-    private static final String BAR_TEST_NAME = "com.android.cts.verifier.foo.BarActivity";
-
-    private TestResultsProvider mProvider;
-
-    public TestResultsProviderTest() {
-        super(TestResultsProvider.class, TestResultsProvider.AUTHORITY);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mProvider = getProvider();
-    }
-
-    public void testInsertUpdateDeleteByTestName() {
-        Cursor cursor = mProvider.query(TestResultsProvider.RESULTS_CONTENT_URI,
-                TestResultsProvider.ALL_COLUMNS, null, null, null);
-        assertEquals(0, cursor.getCount());
-
-        ContentValues values = new ContentValues(2);
-        values.put(TestResultsProvider.COLUMN_TEST_NAME, FOO_TEST_NAME);
-        values.put(TestResultsProvider.COLUMN_TEST_RESULT, TestResult.TEST_RESULT_FAILED);
-        assertNotNull(mProvider.insert(TestResultsProvider.RESULTS_CONTENT_URI, values));
-
-        cursor = mProvider.query(TestResultsProvider.RESULTS_CONTENT_URI, TestResultsProvider.ALL_COLUMNS,
-                null, null, null);
-        assertEquals(1, cursor.getCount());
-        assertTrue(cursor.moveToFirst());
-        assertEquals(FOO_TEST_NAME, cursor.getString(1));
-        assertEquals(TestResult.TEST_RESULT_FAILED, cursor.getInt(2));
-        cursor.close();
-
-        values = new ContentValues();
-        values.put(TestResultsProvider.COLUMN_TEST_NAME, BAR_TEST_NAME);
-        values.put(TestResultsProvider.COLUMN_TEST_RESULT, TestResult.TEST_RESULT_PASSED);
-        int numUpdated = mProvider.update(TestResultsProvider.RESULTS_CONTENT_URI, values,
-                TestResultsProvider.COLUMN_TEST_NAME + " = ?", new String[] {BAR_TEST_NAME});
-        assertEquals(0, numUpdated);
-
-        cursor = mProvider.query(TestResultsProvider.RESULTS_CONTENT_URI, TestResultsProvider.ALL_COLUMNS,
-                null, null, null);
-        assertEquals(1, cursor.getCount());
-        assertTrue(cursor.moveToFirst());
-        assertEquals(FOO_TEST_NAME, cursor.getString(1));
-        assertEquals(TestResult.TEST_RESULT_FAILED, cursor.getInt(2));
-        cursor.close();
-
-        values = new ContentValues(1);
-        values.put(TestResultsProvider.COLUMN_TEST_RESULT, TestResult.TEST_RESULT_PASSED);
-        numUpdated = mProvider.update(TestResultsProvider.RESULTS_CONTENT_URI, values,
-                TestResultsProvider.COLUMN_TEST_NAME + " = ?", new String[] {FOO_TEST_NAME});
-        assertEquals(1, numUpdated);
-
-        cursor = mProvider.query(TestResultsProvider.RESULTS_CONTENT_URI, TestResultsProvider.ALL_COLUMNS,
-                null, null, null);
-        assertEquals(1, cursor.getCount());
-        assertTrue(cursor.moveToFirst());
-        assertEquals(FOO_TEST_NAME, cursor.getString(1));
-        assertEquals(TestResult.TEST_RESULT_PASSED, cursor.getInt(2));
-        cursor.close();
-
-        int numDeleted = mProvider.delete(TestResultsProvider.RESULTS_CONTENT_URI, "1", null);
-        assertEquals(1, numDeleted);
-
-        cursor = mProvider.query(TestResultsProvider.RESULTS_CONTENT_URI, TestResultsProvider.ALL_COLUMNS,
-                null, null, null);
-        assertEquals(0, cursor.getCount());
-        cursor.close();
-    }
-}
diff --git a/apps/CtsVerifier/tests/src/com/android/cts/verifier/features/FeatureSummaryActivityTest.java b/apps/CtsVerifier/tests/src/com/android/cts/verifier/features/FeatureSummaryActivityTest.java
deleted file mode 100644
index d05075b..0000000
--- a/apps/CtsVerifier/tests/src/com/android/cts/verifier/features/FeatureSummaryActivityTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.features;
-
-import com.android.cts.verifier.features.FeatureSummaryActivity.Feature;
-
-import android.content.pm.PackageManager;
-import android.os.Build;
-
-import java.lang.reflect.Field;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-public class FeatureSummaryActivityTest extends TestCase {
-
-    public void testAllFeatures() throws Exception {
-        int version = Build.VERSION.SDK_INT;
-
-        Set<String> expectedFeatures = getFeatureConstants();
-
-        Set<String> actualFeatures = new HashSet<String>();
-        for (Feature feature : FeatureSummaryActivity.ALL_ECLAIR_FEATURES) {
-            actualFeatures.add(feature.name);
-        }
-        if (version >= Build.VERSION_CODES.FROYO) {
-            for (Feature feature : FeatureSummaryActivity.ALL_FROYO_FEATURES) {
-                actualFeatures.add(feature.name);
-            }
-        }
-        if (version >= Build.VERSION_CODES.GINGERBREAD) {
-            for (Feature feature : FeatureSummaryActivity.ALL_GINGERBREAD_FEATURES) {
-                actualFeatures.add(feature.name);
-            }
-        }
-
-        assertEquals("Feature list needs to be updated.",
-                expectedFeatures.size(), actualFeatures.size());
-    }
-
-    private static Set<String> getFeatureConstants()
-            throws IllegalArgumentException, IllegalAccessException {
-        Set<String> features = new HashSet<String>();
-        Field[] fields = PackageManager.class.getFields();
-        for (Field field : fields) {
-            if (field.getName().startsWith("FEATURE_")) {
-                String feature = (String) field.get(null);
-                features.add(feature);
-            }
-        }
-        return features;
-    }
-}