Merge "Move android.content out of CtsTestStubs" into lmp-dev
diff --git a/tests/tests/content/Android.mk b/tests/tests/content/Android.mk
index 6f883b6..2c185d9 100644
--- a/tests/tests/content/Android.mk
+++ b/tests/tests/content/Android.mk
@@ -23,12 +23,15 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctsdeviceutil ctstestrunner
+
+# Resource unit tests use a private locale and some densities
+LOCAL_AAPT_FLAGS = -c xx_YY -c cs -c small -c normal -c large -c xlarge \
+ -c 320dpi -c 240dpi -c 160dpi -c 32dpi \
+ -c kok,kok_IN,kok_419,kok_419_VARIANT,kok_Knda_419,kok_Knda_419_VARIANT,kok_VARIANT,kok_Knda,tgl,tgl_PH
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CtsContentTestCases
-LOCAL_INSTRUMENTATION_FOR := CtsTestStubs
-
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/content/AndroidManifest.xml b/tests/tests/content/AndroidManifest.xml
index 8d57e49..b3de29f 100644
--- a/tests/tests/content/AndroidManifest.xml
+++ b/tests/tests/content/AndroidManifest.xml
@@ -18,9 +18,53 @@
package="com.android.cts.content">
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
+ <!-- content sync tests -->
+ <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
+ <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
+ <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+ <uses-permission android:name="android.permission.USE_CREDENTIALS" />
+ <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
+ <uses-permission android:name="android.permission.READ_SYNC_STATS" />
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.SET_WALLPAPER" />
+ <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+ <uses-permission android:name="android.content.cts.permission.TEST_GRANTED" />
- <application>
- <activity android:name="android.app.cts.MockActivity">
+ <!-- Used for PackageManager test, don't delete this INTERNET permission -->
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <!-- Used for PackageManager test, don't delete this permission-tree -->
+ <permission-tree android:name="com.android.cts.content.permission.TEST_DYNAMIC"
+ android:label="Test Tree"/>
+
+ <!-- Used for PackageManager test, don't delete this permission-group -->
+ <permission-group android:name="android.permission-group.COST_MONEY"/>
+ <!-- Used for PackageManager test, don't delete! -->
+ <uses-configuration/>
+ <uses-feature android:name="android.hardware.camera" />
+ <uses-feature android:glEsVersion="0x00020000" />
+ <feature-group/>
+ <feature-group>
+ <uses-feature android:glEsVersion="0x00030000" />
+ <uses-feature android:name="android.hardware.location" />
+ </feature-group>
+ <feature-group>
+ <uses-feature android:glEsVersion="0x00010001" />
+ <uses-feature android:name="android.hardware.camera" />
+ </feature-group>
+
+ <application android:label="Android TestCase"
+ android:icon="@drawable/size_48x48"
+ android:maxRecents="1"
+ android:multiArch="true"
+ android:name="android.content.cts.MockApplication"
+ android:supportsRtl="true">
+ <activity android:name="android.content.cts.MockActivity">
+ <meta-data android:name="android.app.alias"
+ android:resource="@xml/alias" />
+ <meta-data android:name="android.app.intent.filter"
+ android:resource="@xml/intentfilter" />
<intent-filter>
<action android:name="com.android.cts.content.action.TEST_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
@@ -28,8 +72,8 @@
</intent-filter>
</activity>
- <activity-alias android:name="android.app.cts.MockActivity2"
- android:targetActivity="android.app.cts.MockActivity">
+ <activity-alias android:name="android.content.cts.MockActivity2"
+ android:targetActivity="android.content.cts.MockActivity">
<intent-filter>
<action android:name="com.android.cts.content.action.TEST_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
@@ -37,13 +81,114 @@
</activity-alias>
<uses-library android:name="android.test.runner" />
+
+ <service android:name="android.content.cts.MockContextWrapperService" />
+ <activity android:name=".content.ContextWrapperCtsActivity"
+ android:label="ContextWrapperCtsActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
+ <receiver android:name="android.content.cts.MockReceiverFirst">
+ <intent-filter android:priority="3">
+ <action android:name="android.content.cts.BroadcastReceiverTest.BROADCAST_TESTABORT" />
+ </intent-filter>
+ </receiver>
+ <receiver android:name="android.content.cts.MockReceiverAbort">
+ <intent-filter android:priority="2">
+ <action android:name="android.content.cts.BroadcastReceiverTest.BROADCAST_TESTABORT" />
+ </intent-filter>
+ </receiver>
+ <receiver android:name="android.content.cts.MockReceiver">
+ <intent-filter android:priority="1">
+ <action android:name="android.content.cts.BroadcastReceiverTest.BROADCAST_MOCKTEST" />
+ <action android:name="android.content.cts.BroadcastReceiverTest.BROADCAST_TESTABORT" />
+ <action android:name="android.content.cts.ContextWrapperTest.BROADCAST_TESTORDER" />
+ </intent-filter>
+ </receiver>
+
+ <activity android:name="android.content.cts.AvailableIntentsActivity"
+ android:label="AvailableIntentsActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
+ </intent-filter>
+ </activity>
+
+ <!--Test for PackageManager-->
+ <activity android:name="android.content.pm.cts.TestPmActivity"
+ android:icon="@drawable/start">
+ <intent-filter>
+ <action android:name="android.intent.action.PMTEST" />
+ <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
+ </intent-filter>
+ <meta-data android:name="android.content.pm.cts.xmltest" android:resource="@xml/pm_test" />
+ </activity>
+ <activity android:name="android.content.pm.cts.TestPmCompare">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.INFO" />
+ </intent-filter>
+ </activity>
+ <!--Test for PackageManager-->
+ <service android:name="android.content.pm.cts.TestPmService">
+ <intent-filter>
+ <action android:name="android.content.pm.cts.activity.PMTEST_SERVICE" />
+ </intent-filter>
+ </service>
+ <!--Test for PackageManager-->
+ <receiver android:name="android.content.pm.cts.PmTestReceiver">
+ <intent-filter>
+ <action android:name="android.content.pm.cts.PackageManagerTest.PMTEST_RECEIVER" />
+ </intent-filter>
+ </receiver>
+
+ <!-- Used for PackageManager test, don't delete this MockContentProvider provider -->
+ <provider android:name="android.content.cts.MockContentProvider" android:authorities="ctstest"
+ android:multiprocess="false" />
+ <provider android:name="android.content.cts.DummyProvider"
+ android:authorities="android.content.cts.dummyprovider"
+ android:multiprocess="true" />
+ <provider android:name="android.content.cts.MockRemoteContentProvider"
+ android:authorities="remotectstest"
+ android:process=":remoteprovider" android:multiprocess="false" />
+
+ <service android:name="android.content.cts.MockService" />
+
+ <service android:name="android.content.cts.MockSyncAdapterService" android:exported="true">
+ <intent-filter>
+ <action android:name="android.content.SyncAdapter" />
+ </intent-filter>
+
+ <meta-data android:name="android.content.SyncAdapter"
+ android:resource="@xml/syncadapter" />
+ </service>
+
+ <service android:name="android.content.cts.MockAccountService" android:exported="true"
+ >
+ <intent-filter>
+ <action android:name="android.accounts.AccountAuthenticator" />
+ </intent-filter>
+
+ <meta-data android:name="android.accounts.AccountAuthenticator"
+ android:resource="@xml/authenticator" />
+ </service>
+
+ <activity android:name="android.content.cts.ClipboardManagerListenerActivity"/>
+
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.cts.stub"
+ android:targetPackage="com.android.cts.content"
android:label="CTS tests of android.content">
<meta-data android:name="listener"
android:value="com.android.cts.runner.CtsTestRunListener" />
</instrumentation>
+
+ <!--Test for PackageManager, please put this at the very beginning-->
+ <instrumentation android:name="android.content.pm.cts.TestPmInstrumentation"
+ android:targetPackage="android"
+ android:label="PackageManager Instrumentation Test" />
</manifest>
diff --git a/tests/assets/text.txt b/tests/tests/content/assets/text.txt
similarity index 100%
rename from tests/assets/text.txt
rename to tests/tests/content/assets/text.txt
diff --git a/tests/tests/content/res/anim/anim_rotate.xml b/tests/tests/content/res/anim/anim_rotate.xml
new file mode 100644
index 0000000..4fbadcf
--- /dev/null
+++ b/tests/tests/content/res/anim/anim_rotate.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<rotate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromDegrees="0"
+ android:toDegrees="-45"
+ android:toYScale="0.0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:duration="700" />
diff --git a/tests/tests/content/res/color/color1.xml b/tests/tests/content/res/color/color1.xml
new file mode 100755
index 0000000..87034fa
--- /dev/null
+++ b/tests/tests/content/res/color/color1.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:color="@color/testcolor1"/>
+ <item android:color="@color/testcolor2"/>
+</selector>
diff --git a/tests/tests/content/res/drawable/ic_cts_minitab_selected.png b/tests/tests/content/res/drawable/ic_cts_minitab_selected.png
new file mode 100644
index 0000000..c730050
--- /dev/null
+++ b/tests/tests/content/res/drawable/ic_cts_minitab_selected.png
Binary files differ
diff --git a/tests/tests/content/res/drawable/ic_cts_selected.png b/tests/tests/content/res/drawable/ic_cts_selected.png
new file mode 100644
index 0000000..72a065c
--- /dev/null
+++ b/tests/tests/content/res/drawable/ic_cts_selected.png
Binary files differ
diff --git a/tests/tests/content/res/drawable/icon_black.jpg b/tests/tests/content/res/drawable/icon_black.jpg
new file mode 100644
index 0000000..4c9062a
--- /dev/null
+++ b/tests/tests/content/res/drawable/icon_black.jpg
Binary files differ
diff --git a/tests/tests/content/res/drawable/ninepatch_0.9.png b/tests/tests/content/res/drawable/ninepatch_0.9.png
new file mode 100644
index 0000000..24019d8
--- /dev/null
+++ b/tests/tests/content/res/drawable/ninepatch_0.9.png
Binary files differ
diff --git a/tests/tests/content/res/drawable/ninepatch_1.9.png b/tests/tests/content/res/drawable/ninepatch_1.9.png
new file mode 100644
index 0000000..c56b1db
--- /dev/null
+++ b/tests/tests/content/res/drawable/ninepatch_1.9.png
Binary files differ
diff --git a/tests/tests/content/res/drawable/pass.jpg b/tests/tests/content/res/drawable/pass.jpg
new file mode 100644
index 0000000..2f4b083
--- /dev/null
+++ b/tests/tests/content/res/drawable/pass.jpg
Binary files differ
diff --git a/tests/tests/content/res/drawable/scenery.jpg b/tests/tests/content/res/drawable/scenery.jpg
new file mode 100644
index 0000000..7a6145b
--- /dev/null
+++ b/tests/tests/content/res/drawable/scenery.jpg
Binary files differ
diff --git a/tests/tests/content/res/drawable/size_48x48.jpg b/tests/tests/content/res/drawable/size_48x48.jpg
new file mode 100644
index 0000000..5c2291e
--- /dev/null
+++ b/tests/tests/content/res/drawable/size_48x48.jpg
Binary files differ
diff --git a/tests/tests/content/res/drawable/start.jpg b/tests/tests/content/res/drawable/start.jpg
new file mode 100644
index 0000000..54e05e0
--- /dev/null
+++ b/tests/tests/content/res/drawable/start.jpg
Binary files differ
diff --git a/tests/tests/content/res/drawable/testcolor.xml b/tests/tests/content/res/drawable/testcolor.xml
new file mode 100644
index 0000000..d7b2718
--- /dev/null
+++ b/tests/tests/content/res/drawable/testcolor.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright (C) 2008 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.
+ */
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#FFA6C839"/>
+</selector>
+
diff --git a/tests/tests/content/res/drawable/testimage.jpg b/tests/tests/content/res/drawable/testimage.jpg
new file mode 100644
index 0000000..754df0c
--- /dev/null
+++ b/tests/tests/content/res/drawable/testimage.jpg
Binary files differ
diff --git a/tests/tests/content/res/layout/abslistview_layout.xml b/tests/tests/content/res/layout/abslistview_layout.xml
new file mode 100644
index 0000000..a090ce3
--- /dev/null
+++ b/tests/tests/content/res/layout/abslistview_layout.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<ViewGroup_Layout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/abslistview_root"
+ android:layout_width="25px"
+ android:layout_height="25px" >
+
+ <GridView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <ListView>
+ <TextView
+ android:text="@string/table_layout_first"
+ android:padding="3dip" />
+ <TextView
+ android:text="@string/table_layout_second"
+ android:padding="3dip" />
+ <TextView
+ android:text="@string/table_layout_third"
+ android:padding="3dip" />
+ </ListView>
+</ViewGroup_Layout>
+
diff --git a/tests/tests/content/res/layout/available_intents_layout.xml b/tests/tests/content/res/layout/available_intents_layout.xml
new file mode 100644
index 0000000..5415657
--- /dev/null
+++ b/tests/tests/content/res/layout/available_intents_layout.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="4dip"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:text="@string/text_view_hello"/>
+
+</LinearLayout>
diff --git a/tests/tests/content/res/layout/context_layout.xml b/tests/tests/content/res/layout/context_layout.xml
new file mode 100644
index 0000000..6ec6c76
--- /dev/null
+++ b/tests/tests/content/res/layout/context_layout.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <DatePicker
+ android:id="@+id/contextdatepicker_dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true" />
+
+</RelativeLayout>
diff --git a/tests/tests/content/res/layout/local_sample.xml b/tests/tests/content/res/layout/local_sample.xml
new file mode 100644
index 0000000..6f02e78
--- /dev/null
+++ b/tests/tests/content/res/layout/local_sample.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:padding="4dip"
+ android:gravity="center_horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:paddingBottom="4dip"
+ android:text="@string/text"/>
+
+ <Button android:id="@+id/go"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/text">
+ <requestFocus />
+ </Button>
+
+</LinearLayout>
+
diff --git a/tests/tests/content/res/raw/testimage.jpg b/tests/tests/content/res/raw/testimage.jpg
new file mode 100644
index 0000000..d3dae03
--- /dev/null
+++ b/tests/tests/content/res/raw/testimage.jpg
Binary files differ
diff --git a/tests/tests/content/res/raw/testmp3.mp3 b/tests/tests/content/res/raw/testmp3.mp3
new file mode 100755
index 0000000..657faf7
--- /dev/null
+++ b/tests/tests/content/res/raw/testmp3.mp3
Binary files differ
diff --git a/tests/assets/text.txt b/tests/tests/content/res/raw/text.txt
similarity index 100%
copy from tests/assets/text.txt
copy to tests/tests/content/res/raw/text.txt
diff --git a/tests/res/values-12key-63x57/configVarying.xml b/tests/tests/content/res/values-12key-63x57/configVarying.xml
similarity index 100%
rename from tests/res/values-12key-63x57/configVarying.xml
rename to tests/tests/content/res/values-12key-63x57/configVarying.xml
diff --git a/tests/res/values-12key-dpad/configVarying.xml b/tests/tests/content/res/values-12key-dpad/configVarying.xml
similarity index 100%
rename from tests/res/values-12key-dpad/configVarying.xml
rename to tests/tests/content/res/values-12key-dpad/configVarying.xml
diff --git a/tests/res/values-12key/configVarying.xml b/tests/tests/content/res/values-12key/configVarying.xml
similarity index 100%
rename from tests/res/values-12key/configVarying.xml
rename to tests/tests/content/res/values-12key/configVarying.xml
diff --git a/tests/res/values-240dpi/configVarying.xml b/tests/tests/content/res/values-240dpi/configVarying.xml
similarity index 100%
rename from tests/res/values-240dpi/configVarying.xml
rename to tests/tests/content/res/values-240dpi/configVarying.xml
diff --git a/tests/res/values-32dpi-keysexposed/configVarying.xml b/tests/tests/content/res/values-32dpi-keysexposed/configVarying.xml
similarity index 100%
rename from tests/res/values-32dpi-keysexposed/configVarying.xml
rename to tests/tests/content/res/values-32dpi-keysexposed/configVarying.xml
diff --git a/tests/res/values-32dpi-stylus/configVarying.xml b/tests/tests/content/res/values-32dpi-stylus/configVarying.xml
similarity index 100%
rename from tests/res/values-32dpi-stylus/configVarying.xml
rename to tests/tests/content/res/values-32dpi-stylus/configVarying.xml
diff --git a/tests/res/values-32dpi/configVarying.xml b/tests/tests/content/res/values-32dpi/configVarying.xml
similarity index 100%
rename from tests/res/values-32dpi/configVarying.xml
rename to tests/tests/content/res/values-32dpi/configVarying.xml
diff --git a/tests/res/values-480x320/configVarying.xml b/tests/tests/content/res/values-480x320/configVarying.xml
similarity index 100%
rename from tests/res/values-480x320/configVarying.xml
rename to tests/tests/content/res/values-480x320/configVarying.xml
diff --git a/tests/res/values-640x400/configVarying.xml b/tests/tests/content/res/values-640x400/configVarying.xml
similarity index 100%
rename from tests/res/values-640x400/configVarying.xml
rename to tests/tests/content/res/values-640x400/configVarying.xml
diff --git a/tests/res/values-b+kok+419+VARIANT/configVarying.xml b/tests/tests/content/res/values-b+kok+419+VARIANT/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+419+VARIANT/configVarying.xml
rename to tests/tests/content/res/values-b+kok+419+VARIANT/configVarying.xml
diff --git a/tests/res/values-b+kok+419/configVarying.xml b/tests/tests/content/res/values-b+kok+419/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+419/configVarying.xml
rename to tests/tests/content/res/values-b+kok+419/configVarying.xml
diff --git a/tests/res/values-b+kok+IN/configVarying.xml b/tests/tests/content/res/values-b+kok+IN/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+IN/configVarying.xml
rename to tests/tests/content/res/values-b+kok+IN/configVarying.xml
diff --git a/tests/res/values-b+kok+Knda+419+VARIANT/configVarying.xml b/tests/tests/content/res/values-b+kok+Knda+419+VARIANT/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+Knda+419+VARIANT/configVarying.xml
rename to tests/tests/content/res/values-b+kok+Knda+419+VARIANT/configVarying.xml
diff --git a/tests/res/values-b+kok+Knda+419/configVarying.xml b/tests/tests/content/res/values-b+kok+Knda+419/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+Knda+419/configVarying.xml
rename to tests/tests/content/res/values-b+kok+Knda+419/configVarying.xml
diff --git a/tests/res/values-b+kok+Knda/configVarying.xml b/tests/tests/content/res/values-b+kok+Knda/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+Knda/configVarying.xml
rename to tests/tests/content/res/values-b+kok+Knda/configVarying.xml
diff --git a/tests/res/values-b+kok+VARIANT/configVarying.xml b/tests/tests/content/res/values-b+kok+VARIANT/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok+VARIANT/configVarying.xml
rename to tests/tests/content/res/values-b+kok+VARIANT/configVarying.xml
diff --git a/tests/res/values-b+kok/configVarying.xml b/tests/tests/content/res/values-b+kok/configVarying.xml
similarity index 100%
rename from tests/res/values-b+kok/configVarying.xml
rename to tests/tests/content/res/values-b+kok/configVarying.xml
diff --git a/tests/res/values-b+tgl+PH/configVarying.xml b/tests/tests/content/res/values-b+tgl+PH/configVarying.xml
similarity index 100%
rename from tests/res/values-b+tgl+PH/configVarying.xml
rename to tests/tests/content/res/values-b+tgl+PH/configVarying.xml
diff --git a/tests/res/values-b+tgl/configVarying.xml b/tests/tests/content/res/values-b+tgl/configVarying.xml
similarity index 100%
rename from tests/res/values-b+tgl/configVarying.xml
rename to tests/tests/content/res/values-b+tgl/configVarying.xml
diff --git a/tests/res/values-cs/strings.xml b/tests/tests/content/res/values-cs/strings.xml
similarity index 100%
rename from tests/res/values-cs/strings.xml
rename to tests/tests/content/res/values-cs/strings.xml
diff --git a/tests/res/values-dpad-63x57/configVarying.xml b/tests/tests/content/res/values-dpad-63x57/configVarying.xml
similarity index 100%
rename from tests/res/values-dpad-63x57/configVarying.xml
rename to tests/tests/content/res/values-dpad-63x57/configVarying.xml
diff --git a/tests/res/values-dpad/configVarying.xml b/tests/tests/content/res/values-dpad/configVarying.xml
similarity index 100%
rename from tests/res/values-dpad/configVarying.xml
rename to tests/tests/content/res/values-dpad/configVarying.xml
diff --git a/tests/res/values-fr-rFR/configVarying.xml b/tests/tests/content/res/values-fr-rFR/configVarying.xml
similarity index 100%
rename from tests/res/values-fr-rFR/configVarying.xml
rename to tests/tests/content/res/values-fr-rFR/configVarying.xml
diff --git a/tests/res/values-fr/configVarying.xml b/tests/tests/content/res/values-fr/configVarying.xml
similarity index 100%
rename from tests/res/values-fr/configVarying.xml
rename to tests/tests/content/res/values-fr/configVarying.xml
diff --git a/tests/res/values-h550dp/configVarying.xml b/tests/tests/content/res/values-h550dp/configVarying.xml
similarity index 100%
rename from tests/res/values-h550dp/configVarying.xml
rename to tests/tests/content/res/values-h550dp/configVarying.xml
diff --git a/tests/res/values-h670dp/configVarying.xml b/tests/tests/content/res/values-h670dp/configVarying.xml
similarity index 100%
rename from tests/res/values-h670dp/configVarying.xml
rename to tests/tests/content/res/values-h670dp/configVarying.xml
diff --git a/tests/res/values-keysexposed-12key/configVarying.xml b/tests/tests/content/res/values-keysexposed-12key/configVarying.xml
similarity index 100%
rename from tests/res/values-keysexposed-12key/configVarying.xml
rename to tests/tests/content/res/values-keysexposed-12key/configVarying.xml
diff --git a/tests/res/values-keysexposed-dpad/configVarying.xml b/tests/tests/content/res/values-keysexposed-dpad/configVarying.xml
similarity index 100%
rename from tests/res/values-keysexposed-dpad/configVarying.xml
rename to tests/tests/content/res/values-keysexposed-dpad/configVarying.xml
diff --git a/tests/res/values-keysexposed/configVarying.xml b/tests/tests/content/res/values-keysexposed/configVarying.xml
similarity index 100%
rename from tests/res/values-keysexposed/configVarying.xml
rename to tests/tests/content/res/values-keysexposed/configVarying.xml
diff --git a/tests/res/values-land/configVarying.xml b/tests/tests/content/res/values-land/configVarying.xml
similarity index 100%
rename from tests/res/values-land/configVarying.xml
rename to tests/tests/content/res/values-land/configVarying.xml
diff --git a/tests/res/values-land/dimens.xml b/tests/tests/content/res/values-land/dimens.xml
similarity index 100%
rename from tests/res/values-land/dimens.xml
rename to tests/tests/content/res/values-land/dimens.xml
diff --git a/tests/res/values-large/configVarying.xml b/tests/tests/content/res/values-large/configVarying.xml
similarity index 100%
rename from tests/res/values-large/configVarying.xml
rename to tests/tests/content/res/values-large/configVarying.xml
diff --git a/tests/res/values-mcc110-xx/configVarying.xml b/tests/tests/content/res/values-mcc110-xx/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc110-xx/configVarying.xml
rename to tests/tests/content/res/values-mcc110-xx/configVarying.xml
diff --git a/tests/res/values-mcc111-mnc222/configVarying.xml b/tests/tests/content/res/values-mcc111-mnc222/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc111-mnc222/configVarying.xml
rename to tests/tests/content/res/values-mcc111-mnc222/configVarying.xml
diff --git a/tests/res/values-mcc111-xx-rYY/configVarying.xml b/tests/tests/content/res/values-mcc111-xx-rYY/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc111-xx-rYY/configVarying.xml
rename to tests/tests/content/res/values-mcc111-xx-rYY/configVarying.xml
diff --git a/tests/res/values-mcc111-xx/configVarying.xml b/tests/tests/content/res/values-mcc111-xx/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc111-xx/configVarying.xml
rename to tests/tests/content/res/values-mcc111-xx/configVarying.xml
diff --git a/tests/res/values-mcc111/configVarying.xml b/tests/tests/content/res/values-mcc111/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc111/configVarying.xml
rename to tests/tests/content/res/values-mcc111/configVarying.xml
diff --git a/tests/res/values-mcc112/configVarying.xml b/tests/tests/content/res/values-mcc112/configVarying.xml
similarity index 100%
rename from tests/res/values-mcc112/configVarying.xml
rename to tests/tests/content/res/values-mcc112/configVarying.xml
diff --git a/tests/res/values-mnc220-xx/configVarying.xml b/tests/tests/content/res/values-mnc220-xx/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc220-xx/configVarying.xml
rename to tests/tests/content/res/values-mnc220-xx/configVarying.xml
diff --git a/tests/res/values-mnc222-32dpi/configVarying.xml b/tests/tests/content/res/values-mnc222-32dpi/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc222-32dpi/configVarying.xml
rename to tests/tests/content/res/values-mnc222-32dpi/configVarying.xml
diff --git a/tests/res/values-mnc222-square/configVarying.xml b/tests/tests/content/res/values-mnc222-square/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc222-square/configVarying.xml
rename to tests/tests/content/res/values-mnc222-square/configVarying.xml
diff --git a/tests/res/values-mnc222-xx/configVarying.xml b/tests/tests/content/res/values-mnc222-xx/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc222-xx/configVarying.xml
rename to tests/tests/content/res/values-mnc222-xx/configVarying.xml
diff --git a/tests/res/values-mnc222/configVarying.xml b/tests/tests/content/res/values-mnc222/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc222/configVarying.xml
rename to tests/tests/content/res/values-mnc222/configVarying.xml
diff --git a/tests/res/values-mnc223/configVarying.xml b/tests/tests/content/res/values-mnc223/configVarying.xml
similarity index 100%
rename from tests/res/values-mnc223/configVarying.xml
rename to tests/tests/content/res/values-mnc223/configVarying.xml
diff --git a/tests/res/values-nokeys/configVarying.xml b/tests/tests/content/res/values-nokeys/configVarying.xml
similarity index 100%
rename from tests/res/values-nokeys/configVarying.xml
rename to tests/tests/content/res/values-nokeys/configVarying.xml
diff --git a/tests/res/values-nonav/configVarying.xml b/tests/tests/content/res/values-nonav/configVarying.xml
similarity index 100%
rename from tests/res/values-nonav/configVarying.xml
rename to tests/tests/content/res/values-nonav/configVarying.xml
diff --git a/tests/res/values-normal/configVarying.xml b/tests/tests/content/res/values-normal/configVarying.xml
similarity index 100%
rename from tests/res/values-normal/configVarying.xml
rename to tests/tests/content/res/values-normal/configVarying.xml
diff --git a/tests/res/values-notouch/configVarying.xml b/tests/tests/content/res/values-notouch/configVarying.xml
similarity index 100%
rename from tests/res/values-notouch/configVarying.xml
rename to tests/tests/content/res/values-notouch/configVarying.xml
diff --git a/tests/res/values-small/configVarying.xml b/tests/tests/content/res/values-small/configVarying.xml
similarity index 100%
rename from tests/res/values-small/configVarying.xml
rename to tests/tests/content/res/values-small/configVarying.xml
diff --git a/tests/res/values-square-32dpi/configVarying.xml b/tests/tests/content/res/values-square-32dpi/configVarying.xml
similarity index 100%
rename from tests/res/values-square-32dpi/configVarying.xml
rename to tests/tests/content/res/values-square-32dpi/configVarying.xml
diff --git a/tests/res/values-square-stylus/configVarying.xml b/tests/tests/content/res/values-square-stylus/configVarying.xml
similarity index 100%
rename from tests/res/values-square-stylus/configVarying.xml
rename to tests/tests/content/res/values-square-stylus/configVarying.xml
diff --git a/tests/res/values-square/configVarying.xml b/tests/tests/content/res/values-square/configVarying.xml
similarity index 100%
rename from tests/res/values-square/configVarying.xml
rename to tests/tests/content/res/values-square/configVarying.xml
diff --git a/tests/res/values-stylus-12key/configVarying.xml b/tests/tests/content/res/values-stylus-12key/configVarying.xml
similarity index 100%
rename from tests/res/values-stylus-12key/configVarying.xml
rename to tests/tests/content/res/values-stylus-12key/configVarying.xml
diff --git a/tests/res/values-stylus-keysexposed/configVarying.xml b/tests/tests/content/res/values-stylus-keysexposed/configVarying.xml
similarity index 100%
rename from tests/res/values-stylus-keysexposed/configVarying.xml
rename to tests/tests/content/res/values-stylus-keysexposed/configVarying.xml
diff --git a/tests/res/values-stylus/configVarying.xml b/tests/tests/content/res/values-stylus/configVarying.xml
similarity index 100%
rename from tests/res/values-stylus/configVarying.xml
rename to tests/tests/content/res/values-stylus/configVarying.xml
diff --git a/tests/res/values-sw590dp-hdpi/configVarying.xml b/tests/tests/content/res/values-sw590dp-hdpi/configVarying.xml
similarity index 100%
rename from tests/res/values-sw590dp-hdpi/configVarying.xml
rename to tests/tests/content/res/values-sw590dp-hdpi/configVarying.xml
diff --git a/tests/res/values-sw590dp-mdpi/configVarying.xml b/tests/tests/content/res/values-sw590dp-mdpi/configVarying.xml
similarity index 100%
rename from tests/res/values-sw590dp-mdpi/configVarying.xml
rename to tests/tests/content/res/values-sw590dp-mdpi/configVarying.xml
diff --git a/tests/res/values-sw590dp-xhdpi/configVarying.xml b/tests/tests/content/res/values-sw590dp-xhdpi/configVarying.xml
similarity index 100%
rename from tests/res/values-sw590dp-xhdpi/configVarying.xml
rename to tests/tests/content/res/values-sw590dp-xhdpi/configVarying.xml
diff --git a/tests/res/values-sw590dp/configVarying.xml b/tests/tests/content/res/values-sw590dp/configVarying.xml
similarity index 100%
rename from tests/res/values-sw590dp/configVarying.xml
rename to tests/tests/content/res/values-sw590dp/configVarying.xml
diff --git a/tests/res/values-sw591dp-hdpi/configVarying.xml b/tests/tests/content/res/values-sw591dp-hdpi/configVarying.xml
similarity index 100%
rename from tests/res/values-sw591dp-hdpi/configVarying.xml
rename to tests/tests/content/res/values-sw591dp-hdpi/configVarying.xml
diff --git a/tests/res/values-sw591dp/configVarying.xml b/tests/tests/content/res/values-sw591dp/configVarying.xml
similarity index 100%
rename from tests/res/values-sw591dp/configVarying.xml
rename to tests/tests/content/res/values-sw591dp/configVarying.xml
diff --git a/tests/res/values-sw600dp-land/configVarying.xml b/tests/tests/content/res/values-sw600dp-land/configVarying.xml
similarity index 100%
rename from tests/res/values-sw600dp-land/configVarying.xml
rename to tests/tests/content/res/values-sw600dp-land/configVarying.xml
diff --git a/tests/res/values-sw600dp-land/dimens.xml b/tests/tests/content/res/values-sw600dp-land/dimens.xml
similarity index 100%
rename from tests/res/values-sw600dp-land/dimens.xml
rename to tests/tests/content/res/values-sw600dp-land/dimens.xml
diff --git a/tests/res/values-sw600dp/configVarying.xml b/tests/tests/content/res/values-sw600dp/configVarying.xml
similarity index 100%
rename from tests/res/values-sw600dp/configVarying.xml
rename to tests/tests/content/res/values-sw600dp/configVarying.xml
diff --git a/tests/res/values-sw600dp/dimens.xml b/tests/tests/content/res/values-sw600dp/dimens.xml
similarity index 100%
rename from tests/res/values-sw600dp/dimens.xml
rename to tests/tests/content/res/values-sw600dp/dimens.xml
diff --git a/tests/res/values-sw720dp/configVarying.xml b/tests/tests/content/res/values-sw720dp/configVarying.xml
similarity index 100%
rename from tests/res/values-sw720dp/configVarying.xml
rename to tests/tests/content/res/values-sw720dp/configVarying.xml
diff --git a/tests/res/values-tl-rPH/configVarying.xml b/tests/tests/content/res/values-tl-rPH/configVarying.xml
similarity index 100%
rename from tests/res/values-tl-rPH/configVarying.xml
rename to tests/tests/content/res/values-tl-rPH/configVarying.xml
diff --git a/tests/res/values-tl/configVarying.xml b/tests/tests/content/res/values-tl/configVarying.xml
similarity index 100%
rename from tests/res/values-tl/configVarying.xml
rename to tests/tests/content/res/values-tl/configVarying.xml
diff --git a/tests/res/values-v10/strings.xml b/tests/tests/content/res/values-v10/strings.xml
similarity index 100%
rename from tests/res/values-v10/strings.xml
rename to tests/tests/content/res/values-v10/strings.xml
diff --git a/tests/res/values-v11/strings.xml b/tests/tests/content/res/values-v11/strings.xml
similarity index 100%
rename from tests/res/values-v11/strings.xml
rename to tests/tests/content/res/values-v11/strings.xml
diff --git a/tests/res/values-v12/strings.xml b/tests/tests/content/res/values-v12/strings.xml
similarity index 100%
rename from tests/res/values-v12/strings.xml
rename to tests/tests/content/res/values-v12/strings.xml
diff --git a/tests/res/values-v13/strings.xml b/tests/tests/content/res/values-v13/strings.xml
similarity index 100%
rename from tests/res/values-v13/strings.xml
rename to tests/tests/content/res/values-v13/strings.xml
diff --git a/tests/res/values-v14/strings.xml b/tests/tests/content/res/values-v14/strings.xml
similarity index 100%
rename from tests/res/values-v14/strings.xml
rename to tests/tests/content/res/values-v14/strings.xml
diff --git a/tests/res/values-v15/strings.xml b/tests/tests/content/res/values-v15/strings.xml
similarity index 100%
rename from tests/res/values-v15/strings.xml
rename to tests/tests/content/res/values-v15/strings.xml
diff --git a/tests/res/values-v16/strings.xml b/tests/tests/content/res/values-v16/strings.xml
similarity index 100%
rename from tests/res/values-v16/strings.xml
rename to tests/tests/content/res/values-v16/strings.xml
diff --git a/tests/res/values-v17/strings.xml b/tests/tests/content/res/values-v17/strings.xml
similarity index 100%
rename from tests/res/values-v17/strings.xml
rename to tests/tests/content/res/values-v17/strings.xml
diff --git a/tests/res/values-v18/strings.xml b/tests/tests/content/res/values-v18/strings.xml
similarity index 100%
rename from tests/res/values-v18/strings.xml
rename to tests/tests/content/res/values-v18/strings.xml
diff --git a/tests/res/values-v19/strings.xml b/tests/tests/content/res/values-v19/strings.xml
similarity index 100%
rename from tests/res/values-v19/strings.xml
rename to tests/tests/content/res/values-v19/strings.xml
diff --git a/tests/res/values-v20/strings.xml b/tests/tests/content/res/values-v20/strings.xml
similarity index 100%
rename from tests/res/values-v20/strings.xml
rename to tests/tests/content/res/values-v20/strings.xml
diff --git a/tests/res/values-v21/strings.xml b/tests/tests/content/res/values-v21/strings.xml
similarity index 100%
rename from tests/res/values-v21/strings.xml
rename to tests/tests/content/res/values-v21/strings.xml
diff --git a/tests/res/values-v22/strings.xml b/tests/tests/content/res/values-v22/strings.xml
similarity index 100%
rename from tests/res/values-v22/strings.xml
rename to tests/tests/content/res/values-v22/strings.xml
diff --git a/tests/res/values-v3/strings.xml b/tests/tests/content/res/values-v3/strings.xml
similarity index 100%
rename from tests/res/values-v3/strings.xml
rename to tests/tests/content/res/values-v3/strings.xml
diff --git a/tests/res/values-v4/strings.xml b/tests/tests/content/res/values-v4/strings.xml
similarity index 100%
rename from tests/res/values-v4/strings.xml
rename to tests/tests/content/res/values-v4/strings.xml
diff --git a/tests/res/values-v5/strings.xml b/tests/tests/content/res/values-v5/strings.xml
similarity index 100%
rename from tests/res/values-v5/strings.xml
rename to tests/tests/content/res/values-v5/strings.xml
diff --git a/tests/res/values-v6/strings.xml b/tests/tests/content/res/values-v6/strings.xml
similarity index 100%
rename from tests/res/values-v6/strings.xml
rename to tests/tests/content/res/values-v6/strings.xml
diff --git a/tests/res/values-v7/strings.xml b/tests/tests/content/res/values-v7/strings.xml
similarity index 100%
rename from tests/res/values-v7/strings.xml
rename to tests/tests/content/res/values-v7/strings.xml
diff --git a/tests/res/values-v8/strings.xml b/tests/tests/content/res/values-v8/strings.xml
similarity index 100%
rename from tests/res/values-v8/strings.xml
rename to tests/tests/content/res/values-v8/strings.xml
diff --git a/tests/res/values-v9/strings.xml b/tests/tests/content/res/values-v9/strings.xml
similarity index 100%
rename from tests/res/values-v9/strings.xml
rename to tests/tests/content/res/values-v9/strings.xml
diff --git a/tests/res/values-w600dp-h550dp/configVarying.xml b/tests/tests/content/res/values-w600dp-h550dp/configVarying.xml
similarity index 100%
rename from tests/res/values-w600dp-h550dp/configVarying.xml
rename to tests/tests/content/res/values-w600dp-h550dp/configVarying.xml
diff --git a/tests/res/values-w600dp/configVarying.xml b/tests/tests/content/res/values-w600dp/configVarying.xml
similarity index 100%
rename from tests/res/values-w600dp/configVarying.xml
rename to tests/tests/content/res/values-w600dp/configVarying.xml
diff --git a/tests/res/values-w720dp-h670dp/configVarying.xml b/tests/tests/content/res/values-w720dp-h670dp/configVarying.xml
similarity index 100%
rename from tests/res/values-w720dp-h670dp/configVarying.xml
rename to tests/tests/content/res/values-w720dp-h670dp/configVarying.xml
diff --git a/tests/res/values-w720dp/configVarying.xml b/tests/tests/content/res/values-w720dp/configVarying.xml
similarity index 100%
rename from tests/res/values-w720dp/configVarying.xml
rename to tests/tests/content/res/values-w720dp/configVarying.xml
diff --git a/tests/res/values-wheel/configVarying.xml b/tests/tests/content/res/values-wheel/configVarying.xml
similarity index 100%
rename from tests/res/values-wheel/configVarying.xml
rename to tests/tests/content/res/values-wheel/configVarying.xml
diff --git a/tests/res/values-xlarge/configVarying.xml b/tests/tests/content/res/values-xlarge/configVarying.xml
similarity index 100%
rename from tests/res/values-xlarge/configVarying.xml
rename to tests/tests/content/res/values-xlarge/configVarying.xml
diff --git a/tests/res/values-xx-32dpi/configVarying.xml b/tests/tests/content/res/values-xx-32dpi/configVarying.xml
similarity index 100%
rename from tests/res/values-xx-32dpi/configVarying.xml
rename to tests/tests/content/res/values-xx-32dpi/configVarying.xml
diff --git a/tests/res/values-xx-rYY/configVarying.xml b/tests/tests/content/res/values-xx-rYY/configVarying.xml
similarity index 100%
rename from tests/res/values-xx-rYY/configVarying.xml
rename to tests/tests/content/res/values-xx-rYY/configVarying.xml
diff --git a/tests/res/values-xx-square/configVarying.xml b/tests/tests/content/res/values-xx-square/configVarying.xml
similarity index 100%
rename from tests/res/values-xx-square/configVarying.xml
rename to tests/tests/content/res/values-xx-square/configVarying.xml
diff --git a/tests/res/values-xx/configVarying.xml b/tests/tests/content/res/values-xx/configVarying.xml
similarity index 100%
rename from tests/res/values-xx/configVarying.xml
rename to tests/tests/content/res/values-xx/configVarying.xml
diff --git a/tests/tests/content/res/values/arrays.xml b/tests/tests/content/res/values/arrays.xml
new file mode 100644
index 0000000..71e0133
--- /dev/null
+++ b/tests/tests/content/res/values/arrays.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<resources>
+ <item type="integer" name="reference" format="integer">101</item>
+
+ <string-array name="strings">
+ <item>zero</item>
+ <item>1</item>
+ <item>@string/reference</item>
+ </string-array>
+
+ <integer-array name="integers">
+ <item>0</item>
+ <item>1</item>
+ <item>@integer/reference</item>
+ </integer-array>
+
+ <array name="difficultyLevel">
+ <item>Easy</item>
+ <item>Medium</item>
+ <item>Hard</item>
+ </array>
+
+ <string-array name="string">
+ <item>Test String 1</item>
+ <item>Test String 2</item>
+ <item>Test String 3</item>
+ </string-array>
+
+ <integer-array name="table_row_layout">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ </integer-array>
+</resources>
diff --git a/tests/tests/content/res/values/attrs.xml b/tests/tests/content/res/values/attrs.xml
new file mode 100644
index 0000000..4c3d9db
--- /dev/null
+++ b/tests/tests/content/res/values/attrs.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<resources>
+ <declare-styleable name="Style1">
+ <attr name="Type1" format="integer">
+ <enum name="type" value="28" />
+ <enum name="data" value="0xff00ff00" />
+ <enum name="asset_cookie" value="0" />
+ <enum name="resource_id" value="0" />
+ <enum name="changing_config" value="0" />
+ </attr>
+ <attr name="Type2" format="integer">
+ <enum name="type" value="28" />
+ <enum name="data" value="0xff0000ff" />
+ <enum name="asset_cookie" value="0" />
+ <enum name="resource_id" value="0" />
+ <enum name="changing_config" value="0" />
+ </attr>
+ </declare-styleable>
+ <attr name="type1" format="boolean"/>
+ <attr name="type2" format="boolean"/>
+ <attr name="type3" format="color"/>
+ <attr name="type4" format="reference|color"/>
+ <attr name="type5" format="dimension"/>
+ <attr name="type6" format="dimension"/>
+ <attr name="type7" format="dimension"/>
+ <attr name="type8" format="reference"/>
+ <attr name="type9" format="float"/>
+ <attr name="type10" format="fraction"/>
+ <attr name="type11" format="integer"/>
+ <attr name="type12" format="integer"/>
+ <attr name="type13" format="reference|string"/>
+ <attr name="type14" format="string"/>
+ <attr name="type15" format="reference"/>
+ <attr name="type16" format="string"/>
+ <declare-styleable name="style1">
+ <attr name="type1"/>
+ <attr name="type2"/>
+ <attr name="type3"/>
+ <attr name="type4"/>
+ <attr name="type5"/>
+ <attr name="type6"/>
+ <attr name="type7"/>
+ <attr name="type8"/>
+ <attr name="type9"/>
+ <attr name="type10"/>
+ <attr name="type11"/>
+ <attr name="type12"/>
+ <attr name="type13"/>
+ <attr name="type14"/>
+ <attr name="type15"/>
+ <attr name="type16"/>
+ </declare-styleable>
+ <attr name="testEnum">
+ <enum name="val1" value="1" />
+ <enum name="val2" value="2" />
+ <enum name="val10" value="10" />
+ </attr>
+ <attr name="testFlags">
+ <flag name="bit1" value="0x1" />
+ <flag name="bit2" value="0x2" />
+ <flag name="bit31" value="0x40000000" />
+ </attr>
+ <attr name="testString" format="string" />
+ <declare-styleable name="EnumStyle">
+ <attr name="testEnum" />
+ </declare-styleable>
+ <declare-styleable name="FlagStyle">
+ <attr name="testFlags" />
+ </declare-styleable>
+ <declare-styleable name="TestConfig">
+ <attr name="testString" />
+ </declare-styleable>
+ <!-- Size of text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp).
+ Supported values include the following:<p/>
+ <ul>
+ <li><b>px</b> Pixels</li>
+ <li><b>sp</b> Scaled pixels (scaled to relative pixel size on screen). See {@link android.util.DisplayMetrics} for more information.</li>
+ <li><b>pt</b> Points</li>
+ <li><b>dip</b> Device independent pixels. See {@link android.util.DisplayMetrics} for more information.</li>
+ </ul>
+ -->
+ <attr name="textSize" format="dimension" />
+ <attr name="typeface">
+ <enum name="normal" value="0" />
+ <enum name="sans" value="1" />
+ <enum name="serif" value="2" />
+ <enum name="monospace" value="3" />
+ </attr>
+ <!-- Default text typeface style. -->
+ <attr name="textStyle">
+ <flag name="normal" value="0" />
+ <flag name="bold" value="1" />
+ <flag name="italic" value="2" />
+ </attr>
+ <!-- Color of text (usually same as colorForeground). -->
+ <attr name="textColor" format="reference|color" />
+ <!-- Color of highlighted text. -->
+ <attr name="textColorHighlight" format="reference|color" />
+ <!-- Color of hint text (displayed when the field is empty). -->
+ <attr name="textColorHint" format="reference|color" />
+ <!-- Color of link text (URLs). -->
+ <attr name="textColorLink" format="reference|color" />
+ <declare-styleable name="TextAppearance">
+ <attr name="textColor"/>
+ <attr name="textSize"/>
+ <attr name="textStyle"/>
+ <attr name="typeface"/>
+ <attr name="textColorHighlight"/>
+ <attr name="textColorHint"/>
+ <attr name="textColorLink"/>
+ </declare-styleable>
+ <!-- Integer used to uniquely identify theme overrides. -->
+ <attr name="themeType" format="integer"/>
+ <!-- Theme reference used to override parent theme. -->
+ <attr name="themeOverrideAttr" format="reference"/>
+
+ <!-- Drawable theming attributes -->
+ <attr name="themeBoolean" />
+ <attr name="themeColor" />
+ <attr name="themeFloat" />
+ <attr name="themeInteger" />
+ <attr name="themeDimension" />
+ <attr name="themeDrawable" />
+ <attr name="themeBitmap" />
+ <attr name="themeNinePatch" />
+ <attr name="themeGravity" />
+ <attr name="themeTileMode" />
+ <attr name="themeAngle" />
+</resources>
diff --git a/tests/tests/content/res/values/bools.xml b/tests/tests/content/res/values/bools.xml
new file mode 100755
index 0000000..f119cda
--- /dev/null
+++ b/tests/tests/content/res/values/bools.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<resources>
+ <bool name="trueRes">true</bool>
+ <bool name="falseRes">false</bool>
+</resources>
diff --git a/tests/tests/content/res/values/colors.xml b/tests/tests/content/res/values/colors.xml
new file mode 100644
index 0000000..f3cc325
--- /dev/null
+++ b/tests/tests/content/res/values/colors.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<resources>
+ <drawable name="red">#7f00</drawable>
+ <drawable name="blue">#770000ff</drawable>
+ <drawable name="black">#77ffffff</drawable>
+ <drawable name="yellow">#77ffff00</drawable>
+ <color name="testcolor1">#ff00ff00</color>
+ <color name="testcolor2">#ffff0000</color>
+ <color name="failColor">#ff0000ff</color>
+</resources>
diff --git a/tests/tests/content/res/values/configVarying.xml b/tests/tests/content/res/values/configVarying.xml
new file mode 100755
index 0000000..7b7d576
--- /dev/null
+++ b/tests/tests/content/res/values/configVarying.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<resources>
+ <item type="configVarying" name="simple">simple default</item>
+ <bag type="configVarying" name="bag">
+ <item name="testString">bag default</item>
+ </bag>
+ <item type="configVarying" name="small">default</item>
+ <item type="configVarying" name="normal">default</item>
+ <item type="configVarying" name="large">default</item>
+ <item type="configVarying" name="xlarge">default</item>
+ <item type="configVarying" name="sw">default</item>
+ <item type="configVarying" name="w">default</item>
+ <item type="configVarying" name="h">default</item>
+ <item type="configVarying" name="wh">default</item>
+</resources>
diff --git a/tests/tests/content/res/values/dimens.xml b/tests/tests/content/res/values/dimens.xml
new file mode 100755
index 0000000..bae216f
--- /dev/null
+++ b/tests/tests/content/res/values/dimens.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+
+<resources>
+ <item name="frac100perc" type="dimen" format="fraction">100%</item>
+ <item name="frac1perc" type="dimen" format="fraction">1%</item>
+ <item name="fracp1perc" type="dimen" format="fraction">.1%</item>
+ <item name="fracp01perc" type="dimen" format="fraction">.01%</item>
+ <item name="frac0perc" type="dimen" format="fraction">0%</item>
+ <item name="frac1p1perc" type="dimen" format="fraction">1.1%</item>
+ <item name="frac100p1perc" type="dimen" format="fraction">100.1%</item>
+ <item name="frac25510perc" type="dimen" format="fraction">25510%</item>
+ <item name="frac25610perc" type="dimen" format="fraction">25610%</item>
+ <item name="frac6553510perc" type="dimen" format="fraction">6553510%</item>
+ <item name="frac6553610perc" type="dimen" format="fraction">6553610%</item>
+
+ <item name="frac100pperc" type="dimen" format="fraction">100%p</item>
+ <item name="frac1pperc" type="dimen" format="fraction">1%p</item>
+ <item name="fracp1pperc" type="dimen" format="fraction">.1%p</item>
+ <item name="fracp01pperc" type="dimen" format="fraction">.01%p</item>
+ <item name="frac0pperc" type="dimen" format="fraction">0%p</item>
+ <item name="frac1p1pperc" type="dimen" format="fraction">1.1%p</item>
+ <item name="frac100p1pperc" type="dimen" format="fraction">100.1%p</item>
+ <item name="frac25510pperc" type="dimen" format="fraction">25510%p</item>
+ <item name="frac25610pperc" type="dimen" format="fraction">25610%p</item>
+ <item name="frac6553510pperc" type="dimen" format="fraction">6553510%p</item>
+ <item name="frac6553610pperc" type="dimen" format="fraction">6553610%p</item>
+</resources>
+
diff --git a/tests/tests/content/res/values/resources_test.xml b/tests/tests/content/res/values/resources_test.xml
new file mode 100644
index 0000000..91c2c4a
--- /dev/null
+++ b/tests/tests/content/res/values/resources_test.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+<resources>
+ <!-- The width that is used when creating thumbnails of applications. -->
+ <dimen name="thumbnail_width">84dp</dimen>
+ <!-- The height that is used when creating thumbnails of applications. -->
+ <dimen name="thumbnail_height">63dp</dimen>
+ <!-- The standard size (both width and height) of an application icon that
+ will be displayed in the app launcher and elsewhere. -->
+ <dimen name="app_icon_size">48px</dimen>
+ <dimen name="toast_y_offset">64dip</dimen>
+ <plurals name="plurals_test">
+ <item quantity="one">A dog</item>
+ <item quantity="other">Some dogs</item>
+ </plurals>
+ <color name="resource_test_color">#003B3B3B</color>
+ <integer name="resource_test_int">10</integer>
+</resources>
diff --git a/tests/tests/content/res/values/strings.xml b/tests/tests/content/res/values/strings.xml
new file mode 100644
index 0000000..c167278
--- /dev/null
+++ b/tests/tests/content/res/values/strings.xml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="permlab_testGranted">Test Granted</string>
+ <string name="permdesc_testGranted">Used for running CTS tests, for testing operations
+ where we have the permission.</string>
+ <string name="permlab_testDynamic">Test Dynamic</string>
+ <string name="permdesc_testDynamic">Used for running CTS tests, for testing adding
+ dynamic permissions.</string>
+ <string name="permlab_testDenied">Test Denied</string>
+ <string name="permdesc_testDenied">Used for running CTS tests, for testing operations
+ where we do not have the permission.</string>
+ <string name="explain">1. click start. \n2. if above image shaked, then press pass button,
+ else press failed button.</string>
+ <string name="text_view_hello">Hello! Text view!</string>
+ <string name="text_view_hello_two_lines">Hello! \nText view!</string>
+ <string name="text_view_simple_hint">This is a hint.</string>
+ <string name="text_view_hint">This is a string for testing hint of textview.</string>
+ <string name="activity_forwarding">App/Forwarding</string>
+ <string name="forwarding">$$$</string>
+ <string name="go">Go</string>
+ <string name="back">Back</string>
+ <string name="forward_target">
+ Press back button and notice we don\'t see the previous activity.
+ </string>
+ <string name="edit_text">testing</string>
+ <string name="text">DialogTest</string>
+ <string name="text_country">Country</string>
+ <string name="text_name">Name</string>
+ <string name="hello_world">Hello, World!</string>
+ <string name="hello_android">Hello, Android!</string>
+ <string name="alert_dialog_username">Name:</string>
+ <string name="alert_dialog_password">Password:</string>
+ <string name="alert_dialog_positive">Positive</string>
+ <string name="alert_dialog_negative">Negative</string>
+ <string name="alert_dialog_neutral">Neutral</string>
+ <string name="notify">Notify </string>
+ <string name="tabs_1">testing</string>
+ <string name="table_layout_first">first</string>
+ <string name="table_layout_second">second</string>
+ <string name="table_layout_third">third</string>
+ <string name="table_layout_long">Very long to make the string out of the screen</string>
+ <string name="chronometer_text">Test Chronometer</string>
+ <string name="am">AM</string>
+ <string name="pm">PM</string>
+ <string name="viewgroup_test">ViewGroup test</string>
+ <string name="viewanimator_test">ViewAnimator test</string>
+ <string name="id_ok">OK</string>
+ <string name="id_cancel">Cancel</string>
+ <string name="context_test_string1">This is %s string.</string>
+ <string name="context_test_string2">This is test string.</string>
+ <string name="animationutils_test_instructions">Choose different animations</string>
+ <string name="animationutils_test_alpha">Alpha animation</string>
+ <string name="animationutils_test_scale">Scale animation</string>
+ <string name="animationutils_test_rotate">Rotate animation</string>
+ <string name="animationutils_test_translate">Translate animation</string>
+ <string name="animationutils_test_set">Animation set</string>
+ <string name="animationutils_test_layout">Layout animation</string>
+ <string name="animationutils_test_gridlayout">Grid layout animation</string>
+ <string name="twolinelistitem_test_text1">text1</string>
+ <string name="twolinelistitem_test_text2">text2</string>
+ <string name="metadata_text">metadata text</string>
+ <string name="horizontal_text_1">horizontal 1</string>
+ <string name="horizontal_text_2">horizontal 2</string>
+ <string name="horizontal_text_3">horizontal 3</string>
+ <string name="vertical_text_1">vertical 1</string>
+ <string name="vertical_text_2">vertical 2</string>
+ <string name="vertical_text_3">vertical 3</string>
+ <string name="reference">here</string>
+ <string name="coerceIntegerToString">100</string>
+ <string name="coerceBooleanToString">true</string>
+ <string name="coerceColorToString">#fff</string>
+ <string name="coerceFloatToString">100.0</string>
+ <string name="coerceDimensionToString">100px</string>
+ <string name="coerceFractionToString">100<xliff:g id="percent">%</xliff:g></string>
+ <string name="formattedStringNone">Format[]</string>
+ <string name="formattedStringOne">Format[<xliff:g id="format">%d</xliff:g>]</string>
+ <string name="formattedStringTwo">Format[<xliff:g id="format">%3$d,%2$s</xliff:g>]</string>
+ <string name="checkboxpref_key">checkboxpref_key</string>
+ <string name="checkboxpref_title">title of preference</string>
+ <string name="checkboxpref_summary">summary of preference</string>
+ <string name="checkboxpref_summary_on">summary on of preference</string>
+ <string name="checkboxpref_summary_off">summary off of preference</string>
+ <string name="checkboxpref_depend">checkboxpref_depend</string>
+ <string name="checkboxpref_depend_title"> depend title of preference</string>
+ <string name="checkboxpref_depend_summary"> depend summary of preference</string>
+ <string name="edittextpref_key">edittextpref_key</string>
+ <string name="edittextpref_default_value">default value of preference</string>
+ <string name="edittextpref_title">title of edit text preference</string>
+ <string name="edittextpref_summary">summary of edit text preference</string>
+ <string name="edittextpref_dialog_title">dialog title of edit text preference</string>
+ <string name="edittextpref_text">text of edit text preference</string>
+ <string name="listpref_key">listpref_key</string>
+ <string name="listpref_title">title of list preference</string>
+ <string name="listpref_summary">summary of list preference</string>
+ <string name="listpref_dialogtitle">dialog title of list preference</string>
+ <string name="easy">Easy</string>
+ <string name="medium">Medium</string>
+ <string name="hard">Hard</string>
+ <string name="footer_view">Footer view</string>
+ <string name="header_view">Header view</string>
+ <string name="dialogpref_title">title of dialog preference </string>
+ <string name="dialogpref_dialog_title">dialog title of dialog preference </string>
+ <string name="dialogpref_key">dialogpref_key</string>
+ <string name="dialogpref_default_value">default value of dialog preference</string>
+ <string name="dialogpref_summary">summary of dialog preference</string>
+ <string name="dialogpref_message">message of dialog preference</string>
+ <string name="dialogpref_sure">Sure</string>
+ <string name="dialogpref_cancel">Cancel</string>
+ <string name="pref_key">pref_key</string>
+ <string name="pref_title">title of preference</string>
+ <string name="pref_summary">summary of preference</string>
+ <string name="pref_depend_key">pref_depend_key</string>
+ <string name="pref_depend_title"> depend title of preference</string>
+ <string name="pref_depend_summary"> depend summary of preference</string>
+ <string name="android_intent_action_preference">android.intent.action.PREFERENCE</string>
+ <string name="def_pref_key">def_pref_key</string>
+ <string name="def_pref_title">default preference</string>
+ <string name="def_pref_summary">This is default preference of cts</string>
+ <string name="relative_view1">view 1</string>
+ <string name="relative_view2">view 2</string>
+ <string name="relative_view3">view 3</string>
+ <string name="relative_view4">view 4</string>
+ <string name="relative_view5">view 5</string>
+ <string name="relative_view6">view 6</string>
+ <string name="relative_view7">view 7</string>
+ <string name="relative_view8">view 8</string>
+ <string name="relative_view9">view 9</string>
+ <string name="relative_view10">view 10</string>
+ <string name="relative_view11">view 11</string>
+ <string name="relative_view12">view 12</string>
+ <string name="relative_view13">view 13</string>
+ <string name="country">Country:</string>
+ <string name="symbol">Symbol:</string>
+ <string name="country_warning">No such country registered</string>
+ <string name="version_cur">base</string>
+ <string name="version_old">base</string>
+ <string name="version_v3">base</string>
+ <string name="authenticator_label">Android CTS</string>
+ <string name="search_label">Android CTS</string>
+ <string name="tag1">tag 1</string>
+ <string name="tag2">tag 2</string>
+
+ <string name="button">Button</string>
+ <string name="holo_test">Holo Test</string>
+ <string name="holo_generator">Holo Generator</string>
+ <string name="holo_light_test">Holo Light Test</string>
+ <string name="holo_light_generator">Holo Light Generator</string>
+ <string name="reference_image">Reference Image: </string>
+ <string name="generated_image">Generated Image: </string>
+ <string name="themes_prompt">Select a Theme:</string>
+ <string name="sample_text">Sample text goes here. I wanted something creative and whimsical
+but then I just got bored...</string>
+ <string name="long_text">This is a really long string which exceeds the width of the view.
+New devices have a much larger screen which actually enables long strings to be displayed
+with no fading. I have made this string longer to fix this case. If you are correcting this
+text, I would love to see the kind of devices you guys now use! Guys, maybe some devices need longer string!
+I think so, so how about double this string, like copy and paste!
+This is a really long string which exceeds the width of the view.
+New devices have a much larger screen which actually enables long strings to be displayed
+with no fading. I have made this string longer to fix this case. If you are correcting this
+text, I would love to see the kind of devices you guys now use! Guys, maybe some devices need longer string!
+I think so, so how about double this string, like copy and paste! </string>
+ <string name="rectangle200">"M 0,0 l 200,0 l 0, 200 l -200, 0 z"</string>
+</resources>
diff --git a/tests/tests/content/res/values/styles.xml b/tests/tests/content/res/values/styles.xml
new file mode 100644
index 0000000..20c80f8
--- /dev/null
+++ b/tests/tests/content/res/values/styles.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="Whatever">
+ <item name="type1">true</item>
+ <item name="type2">false</item>
+ <item name="type3">#ff0000ff</item>
+ <item name="type4">#ff00ff00</item>
+ <item name="type5">0.75px</item>
+ <item name="type6">10px</item>
+ <item name="type7">18px</item>
+ <item name="type8">@drawable/pass</item>
+ <item name="type9">3.14</item>
+ <item name="type10">100%</item>
+ <item name="type11">365</item>
+ <item name="type12">86400</item>
+ <item name="type13">@string/hello_android</item>
+ <item name="type14">TypedArray Test!</item>
+ <item name="type15">@array/difficultyLevel</item>
+ <item name="type16">Typed Value!</item>
+ </style>
+
+ <style name="TextViewWithoutColorAndAppearance">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextViewWithColorButWithOutAppearance">
+ <item name="android:textColor">#ff0000ff</item>
+ </style>
+
+ <style name="TextViewWithColorAndAppearance">
+ <item name="android:textColor">#ff0000ff</item>
+ <item name="android:textAppearance">@style/TextAppearance.WithColor</item>
+ </style>
+
+ <style name="TextViewWithoutColorButWithAppearance">
+ <item name="android:textAppearance">@style/TextAppearance.WithColor</item>
+ </style>
+
+ <style name="TextAppearance" parent="android:TextAppearance">
+ </style>
+
+ <style name="TextAppearance.WithColor">
+ <item name="android:textColor">#ffff0000</item>
+ </style>
+
+ <style name="TextAppearance.All">
+ <item name="android:textColor">@drawable/black</item>
+ <item name="android:textSize">20px</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textColorHint">@drawable/red</item>
+ <item name="android:textColorLink">@drawable/blue</item>
+ <item name="android:textColorHighlight">@drawable/yellow</item>
+ </style>
+
+ <style name="TextAppearance.Colors">
+ <item name="android:textColor">@drawable/black</item>
+ <item name="android:textColorHint">@drawable/blue</item>
+ <item name="android:textColorLink">@drawable/yellow</item>
+ <item name="android:textColorHighlight">@drawable/red</item>
+ </style>
+
+ <style name="TextAppearance.NotColors">
+ <item name="android:textSize">17px</item>
+ <item name="android:typeface">sans</item>
+ <item name="android:textStyle">normal</item>
+ </style>
+
+ <style name="TextAppearance.Style">
+ <item name="android:textStyle">normal</item>
+ </style>
+
+ <style name="TestEnum1">
+ <item name="testEnum">val1</item>
+ </style>
+
+ <style name="TestEnum2">
+ <item name="testEnum">val2</item>
+ </style>
+
+ <style name="TestEnum10">
+ <item name="testEnum">val10</item>
+ </style>
+
+ <style name="TestFlag1">
+ <item name="testFlags">bit1</item>
+ </style>
+
+ <style name="TestFlag2">
+ <item name="testFlags">bit2</item>
+ </style>
+
+ <style name="TestFlag31">
+ <item name="testFlags">bit31</item>
+ </style>
+
+ <style name="TestFlag1And2">
+ <item name="testFlags">bit1|bit2</item>
+ </style>
+
+ <style name="TestFlag1And2And31">
+ <item name="testFlags">bit1|bit2|bit31</item>
+ </style>
+
+ <style name="TestEnum1.EmptyInherit" />
+
+ <style name="Theme_AlertDialog">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TestProgressBar">
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:progressDrawable">?android:drawable/progress_horizontal</item>
+ <item name="android:indeterminateDrawable">?android:drawable/progress_horizontal</item>
+ <item name="android:minHeight">20dip</item>
+ <item name="android:maxHeight">20dip</item>
+ <item name="android:focusable">true</item>
+ </style>
+
+ <style name="Test_Theme">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:panelColorForeground">#ff000000</item>
+ <item name="android:panelColorBackground">#ffffffff</item>
+ </style>
+
+ <style name="Theme_OverrideOuter">
+ <item name="themeType">1</item>
+ </style>
+
+ <style name="Theme_OverrideInner">
+ <item name="themeType">2</item>
+ <item name="themeOverrideAttr">@style/Theme_OverrideAttr</item>
+ </style>
+
+ <style name="Theme_OverrideAttr">
+ <item name="themeType">3</item>
+ </style>
+
+ <style name="Theme_ThemedDrawableTest">
+ <item name="themeBoolean">true</item>
+ <item name="themeColor">@android:color/black</item>
+ <item name="themeFloat">1.0</item>
+ <item name="themeAngle">45.0</item>
+ <item name="themeInteger">1</item>
+ <item name="themeDimension">1px</item>
+ <item name="themeDrawable">@drawable/icon_black</item>
+ <item name="themeBitmap">@drawable/icon_black</item>
+ <item name="themeNinePatch">@drawable/ninepatch_0</item>
+ <item name="themeGravity">48</item>
+ <item name="themeTileMode">2</item>
+ </style>
+
+ <style name="Theme_NoSwipeDismiss">
+ <item name="android:windowSwipeToDismiss">false</item>
+ </style>
+
+</resources>
diff --git a/tests/tests/content/res/xml/alias.xml b/tests/tests/content/res/xml/alias.xml
new file mode 100644
index 0000000..f88f3dc
--- /dev/null
+++ b/tests/tests/content/res/xml/alias.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2008 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.
+ */
+-->
+
+<alias xmlns:android="http://schemas.android.com/apk/res/android">
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.cts.stub"
+ android:targetClass="android.app.cts.ChildActivity"
+ android:data="http://www.google.com/">
+ </intent>
+</alias>
+
diff --git a/tests/tests/content/res/xml/authenticator.xml b/tests/tests/content/res/xml/authenticator.xml
new file mode 100644
index 0000000..1e298b1
--- /dev/null
+++ b/tests/tests/content/res/xml/authenticator.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, 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.
+ */
+-->
+
+<!-- The attributes in this XML file provide configuration information -->
+<!-- for the Account Manager. -->
+
+<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:accountType="android.content.cts.account.type"
+ android:icon="@drawable/ic_cts_selected"
+ android:smallIcon="@drawable/ic_cts_minitab_selected"
+ android:label="@string/authenticator_label"
+/>
\ No newline at end of file
diff --git a/tests/tests/content/res/xml/colors.xml b/tests/tests/content/res/xml/colors.xml
new file mode 100644
index 0000000..8c44a66
--- /dev/null
+++ b/tests/tests/content/res/xml/colors.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2008 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.
+ */
+-->
+<resources>
+ <color name="testcolor1">#ff00ff00</color>
+ <color name="testcolor2">#ffff0000</color>
+ <color name="failColor">#ff0000ff</color>
+</resources>
+
diff --git a/tests/tests/content/res/xml/extra.xml b/tests/tests/content/res/xml/extra.xml
new file mode 100755
index 0000000..b3bffb4
--- /dev/null
+++ b/tests/tests/content/res/xml/extra.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+<tag xmlns:android="http://schemas.android.com/apk/res/android" android:name="Bruce" android:value="Lee">
+ <extra android:name="google" android:value="android">
+ </extra>
+</tag>
diff --git a/tests/tests/content/res/xml/intentfilter.xml b/tests/tests/content/res/xml/intentfilter.xml
new file mode 100644
index 0000000..7ed3a53
--- /dev/null
+++ b/tests/tests/content/res/xml/intentfilter.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2008 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.
+ */
+-->
+<intent-filter xmlns="http://schemas.android.com/apk/res/android">
+ <action name="testAction"/>
+ <cat name="testCategory" />
+ <type name="vnd.android.cursor.dir/person"/>
+ <scheme name="testScheme"/>
+ <auth host="testHost" port="80"/>
+ <path name="testPath" literal="test"/>
+ <path name="testPath" prefix="test"/>
+ <path name="testPath" sglob="test"/>
+</intent-filter>
diff --git a/tests/tests/content/res/xml/pm_test.xml b/tests/tests/content/res/xml/pm_test.xml
new file mode 100644
index 0000000..4db24cf
--- /dev/null
+++ b/tests/tests/content/res/xml/pm_test.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 2008 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.
+ -->
+ <!-- This xml is just test for PackageManager Test -->
+<resources>
+</resources>
diff --git a/tests/tests/content/res/xml/syncadapter.xml b/tests/tests/content/res/xml/syncadapter.xml
new file mode 100644
index 0000000..1c0bb72
--- /dev/null
+++ b/tests/tests/content/res/xml/syncadapter.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, 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.
+ */
+-->
+
+<!-- The attributes in this XML file provide configuration information -->
+<!-- for the SyncAdapter. -->
+
+<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
+ android:contentAuthority="android.content.cts.authority"
+ android:accountType="android.content.cts.account.type"
+/>
diff --git a/tests/tests/content/res/xml/test_color.xml b/tests/tests/content/res/xml/test_color.xml
new file mode 100644
index 0000000..97f7dec
--- /dev/null
+++ b/tests/tests/content/res/xml/test_color.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ android:versionName="testNonResourcesString">
+ <color name="testcolor1">#ff00ff00</color>
+ <color name="testcolor2">#ffff0000</color>
+ <color name="failColor">#ff0000ff</color>
+</resources>
diff --git a/tests/src/android/content/cts/AvailableIntentsActivity.java b/tests/tests/content/src/android/content/cts/AvailableIntentsActivity.java
similarity index 96%
rename from tests/src/android/content/cts/AvailableIntentsActivity.java
rename to tests/tests/content/src/android/content/cts/AvailableIntentsActivity.java
index ac676de..773defc 100644
--- a/tests/src/android/content/cts/AvailableIntentsActivity.java
+++ b/tests/tests/content/src/android/content/cts/AvailableIntentsActivity.java
@@ -16,7 +16,7 @@
package android.content.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.app.Activity;
import android.os.Bundle;
diff --git a/tests/tests/content/src/android/content/cts/BroadcastReceiverTest.java b/tests/tests/content/src/android/content/cts/BroadcastReceiverTest.java
index 2865f9e..526087b 100644
--- a/tests/tests/content/src/android/content/cts/BroadcastReceiverTest.java
+++ b/tests/tests/content/src/android/content/cts/BroadcastReceiverTest.java
@@ -18,8 +18,6 @@
import android.app.Service;
-import android.app.cts.MockActivity;
-import android.app.cts.MockService;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -52,7 +50,7 @@
private static final long START_SERVICE_TIMEOUT = 3000;
public BroadcastReceiverTest() {
- super("com.android.cts.stub", MockActivity.class);
+ super("com.android.cts.content", MockActivity.class);
}
@Override
diff --git a/tests/src/android/content/cts/ClipboardManagerListenerActivity.java b/tests/tests/content/src/android/content/cts/ClipboardManagerListenerActivity.java
similarity index 100%
rename from tests/src/android/content/cts/ClipboardManagerListenerActivity.java
rename to tests/tests/content/src/android/content/cts/ClipboardManagerListenerActivity.java
diff --git a/tests/tests/content/src/android/content/cts/ComponentNameTest.java b/tests/tests/content/src/android/content/cts/ComponentNameTest.java
index d14a95b..6277bd6 100644
--- a/tests/tests/content/src/android/content/cts/ComponentNameTest.java
+++ b/tests/tests/content/src/android/content/cts/ComponentNameTest.java
@@ -85,7 +85,7 @@
}
public void testFlattenToString() {
- assertEquals("com.android.cts.stub/android.content.cts.ComponentNameTest",
+ assertEquals("com.android.cts.content/android.content.cts.ComponentNameTest",
getComponentName().flattenToString());
}
@@ -121,7 +121,7 @@
public void testGetPackageName() {
final String actual = getComponentName().getPackageName();
- assertEquals("com.android.cts.stub", actual);
+ assertEquals("com.android.cts.content", actual);
}
public void testUnflattenFromString() {
@@ -135,7 +135,7 @@
public void testFlattenToShortString() {
// Test normal
String actual = getComponentName().flattenToShortString();
- assertEquals("com.android.cts.stub/android.content.cts.ComponentNameTest", actual);
+ assertEquals("com.android.cts.content/android.content.cts.ComponentNameTest", actual);
// Test long class name
final ComponentName componentName = new ComponentName("com.android.view",
@@ -168,7 +168,7 @@
public void testToShortString() {
// Test normal string
final String shortString = getComponentName().toShortString();
- assertEquals("{com.android.cts.stub/android.content.cts.ComponentNameTest}", shortString);
+ assertEquals("{com.android.cts.content/android.content.cts.ComponentNameTest}", shortString);
}
public void testGetClassName() {
@@ -196,7 +196,7 @@
ComponentName.writeToParcel(componentName, parcel);
parcel.setDataPosition(0);
assertFalse(0 == parcel.dataAvail());
- assertEquals("com.android.cts.stub", parcel.readString());
+ assertEquals("com.android.cts.content", parcel.readString());
assertEquals("android.content.cts.ComponentNameTest", parcel.readString());
// Test null data
diff --git a/tests/tests/content/src/android/content/cts/ContentProviderTest.java b/tests/tests/content/src/android/content/cts/ContentProviderTest.java
index 5ced37c..0b4d9aa 100644
--- a/tests/tests/content/src/android/content/cts/ContentProviderTest.java
+++ b/tests/tests/content/src/android/content/cts/ContentProviderTest.java
@@ -27,7 +27,7 @@
import android.os.ParcelFileDescriptor;
import android.test.AndroidTestCase;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import java.io.File;
import java.io.FileNotFoundException;
@@ -37,7 +37,7 @@
* Test {@link ContentProvider}.
*/
public class ContentProviderTest extends AndroidTestCase {
- private static final String TEST_PACKAGE_NAME = "com.android.cts.stub";
+ private static final String TEST_PACKAGE_NAME = "com.android.cts.content";
private static final String TEST_FILE_NAME = "testFile.tmp";
private static final String TEST_DB_NAME = "test.db";
diff --git a/tests/tests/content/src/android/content/cts/ContentResolverTest.java b/tests/tests/content/src/android/content/cts/ContentResolverTest.java
index 47371cc..4176da3 100644
--- a/tests/tests/content/src/android/content/cts/ContentResolverTest.java
+++ b/tests/tests/content/src/android/content/cts/ContentResolverTest.java
@@ -16,7 +16,7 @@
package android.content.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.accounts.Account;
@@ -75,7 +75,7 @@
private static final int VALUE2 = 2;
private static final int VALUE3 = 3;
- private static final String TEST_PACKAGE_NAME = "com.android.cts.stub";
+ private static final String TEST_PACKAGE_NAME = "com.android.cts.content";
private Context mContext;
private ContentResolver mContentResolver;
diff --git a/tests/tests/content/src/android/content/cts/ContextTest.java b/tests/tests/content/src/android/content/cts/ContextTest.java
index 70abe1f..7c5dc50 100644
--- a/tests/tests/content/src/android/content/cts/ContextTest.java
+++ b/tests/tests/content/src/android/content/cts/ContextTest.java
@@ -16,7 +16,7 @@
package android.content.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import com.android.internal.util.XmlUtils;
diff --git a/tests/src/android/content/cts/ContextWrapperStubActivity.java b/tests/tests/content/src/android/content/cts/ContextWrapperCtsActivity.java
similarity index 90%
rename from tests/src/android/content/cts/ContextWrapperStubActivity.java
rename to tests/tests/content/src/android/content/cts/ContextWrapperCtsActivity.java
index 977cedc..9ff4df9 100644
--- a/tests/src/android/content/cts/ContextWrapperStubActivity.java
+++ b/tests/tests/content/src/android/content/cts/ContextWrapperCtsActivity.java
@@ -21,9 +21,9 @@
import android.app.Activity;
import android.os.Bundle;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
-public class ContextWrapperStubActivity extends Activity {
+public class ContextWrapperCtsActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
diff --git a/tests/tests/content/src/android/content/cts/ContextWrapperTest.java b/tests/tests/content/src/android/content/cts/ContextWrapperTest.java
index 59fae2f..e7b6ed7 100644
--- a/tests/tests/content/src/android/content/cts/ContextWrapperTest.java
+++ b/tests/tests/content/src/android/content/cts/ContextWrapperTest.java
@@ -16,7 +16,7 @@
package android.content.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.content.ActivityNotFoundException;
@@ -79,8 +79,8 @@
private final static String MOCK_ACTION1 = ACTION_BROADCAST_TESTORDER + "1";
private final static String MOCK_ACTION2 = ACTION_BROADCAST_TESTORDER + "2";
- public static final String PERMISSION_GRANTED = "android.app.cts.permission.TEST_GRANTED";
- public static final String PERMISSION_DENIED = "android.app.cts.permission.TEST_DENIED";
+ public static final String PERMISSION_GRANTED = "android.content.cts.permission.TEST_GRANTED";
+ public static final String PERMISSION_DENIED = "android.content.cts.permission.TEST_DENIED";
private static final int BROADCAST_TIMEOUT = 10000;
@@ -402,7 +402,7 @@
}
public void testStartActivity() {
- Intent intent = new Intent(mContext, ContextWrapperStubActivity.class);
+ Intent intent = new Intent(mContext, ContextWrapperCtsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
mContextWrapper.startActivity(intent);
@@ -474,7 +474,7 @@
}
public void testGetPackageName() {
- assertEquals("com.android.cts.stub", mContextWrapper.getPackageName());
+ assertEquals("com.android.cts.content", mContextWrapper.getPackageName());
}
public void testGetCacheDir() {
diff --git a/tests/src/android/content/cts/DummyProvider.java b/tests/tests/content/src/android/content/cts/DummyProvider.java
similarity index 100%
rename from tests/src/android/content/cts/DummyProvider.java
rename to tests/tests/content/src/android/content/cts/DummyProvider.java
diff --git a/tests/src/android/content/cts/HighPriorityBroadcastReceiver.java b/tests/tests/content/src/android/content/cts/HighPriorityBroadcastReceiver.java
similarity index 100%
rename from tests/src/android/content/cts/HighPriorityBroadcastReceiver.java
rename to tests/tests/content/src/android/content/cts/HighPriorityBroadcastReceiver.java
diff --git a/tests/tests/content/src/android/content/cts/IntentFilterTest.java b/tests/tests/content/src/android/content/cts/IntentFilterTest.java
index d067b9e..d0e70f2 100644
--- a/tests/tests/content/src/android/content/cts/IntentFilterTest.java
+++ b/tests/tests/content/src/android/content/cts/IntentFilterTest.java
@@ -33,7 +33,6 @@
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
-import android.app.cts.MockActivity;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Intent;
diff --git a/tests/tests/content/src/android/content/cts/IntentTest.java b/tests/tests/content/src/android/content/cts/IntentTest.java
index d7bf6f4..d4fac55 100644
--- a/tests/tests/content/src/android/content/cts/IntentTest.java
+++ b/tests/tests/content/src/android/content/cts/IntentTest.java
@@ -22,8 +22,6 @@
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import android.app.cts.MockActivity;
-import android.app.cts.MockReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -730,18 +728,18 @@
// Should only have one activity responding to narrow category
final ComponentName target = intent.resolveActivity(mPm);
assertEquals("com.android.cts.content", target.getPackageName());
- assertEquals("android.app.cts.MockActivity", target.getClassName());
+ assertEquals("android.content.cts.MockActivity", target.getClassName());
}
public void testResolveActivityShortcutMatch() {
final Intent intent = new Intent("com.android.cts.content.action.TEST_ACTION");
intent.setComponent(
- new ComponentName("com.android.cts.content", "android.app.cts.MockActivity2"));
+ new ComponentName("com.android.cts.content", "android.content.cts.MockActivity2"));
// Multiple activities match, but we asked for explicit component
final ComponentName target = intent.resolveActivity(mPm);
assertEquals("com.android.cts.content", target.getPackageName());
- assertEquals("android.app.cts.MockActivity2", target.getClassName());
+ assertEquals("android.content.cts.MockActivity2", target.getClassName());
}
public void testResolveActivityMultipleMatch() {
diff --git a/tests/tests/content/src/android/content/cts/Intent_ShortcutIconResourceTest.java b/tests/tests/content/src/android/content/cts/Intent_ShortcutIconResourceTest.java
index b38f3fc..062ef90 100644
--- a/tests/tests/content/src/android/content/cts/Intent_ShortcutIconResourceTest.java
+++ b/tests/tests/content/src/android/content/cts/Intent_ShortcutIconResourceTest.java
@@ -29,7 +29,7 @@
ShortcutIconResource mShortcutIconResource;
Context mContext;
- final int resourceId = com.android.cts.stub.R.string.notify;
+ final int resourceId = com.android.cts.content.R.string.notify;
@Override
protected void setUp() throws Exception {
@@ -63,7 +63,7 @@
public void testWriteToParcel() {
mShortcutIconResource = ShortcutIconResource.fromContext(mContext,
- com.android.cts.stub.R.string.notify);
+ com.android.cts.content.R.string.notify);
assertNotNull(mShortcutIconResource);
Parcel parce = Parcel.obtain();
mShortcutIconResource.writeToParcel(parce, 1);
diff --git a/tests/src/android/content/cts/LowPriorityBroadcastReceiver.java b/tests/tests/content/src/android/content/cts/LowPriorityBroadcastReceiver.java
similarity index 100%
rename from tests/src/android/content/cts/LowPriorityBroadcastReceiver.java
rename to tests/tests/content/src/android/content/cts/LowPriorityBroadcastReceiver.java
diff --git a/tests/src/android/content/cts/MockAccountAuthenticator.java b/tests/tests/content/src/android/content/cts/MockAccountAuthenticator.java
similarity index 100%
rename from tests/src/android/content/cts/MockAccountAuthenticator.java
rename to tests/tests/content/src/android/content/cts/MockAccountAuthenticator.java
diff --git a/tests/src/android/content/cts/MockAccountService.java b/tests/tests/content/src/android/content/cts/MockAccountService.java
similarity index 100%
rename from tests/src/android/content/cts/MockAccountService.java
rename to tests/tests/content/src/android/content/cts/MockAccountService.java
diff --git a/tests/src/android/content/cts/ContextWrapperStubActivity.java b/tests/tests/content/src/android/content/cts/MockActivity.java
similarity index 63%
copy from tests/src/android/content/cts/ContextWrapperStubActivity.java
copy to tests/tests/content/src/android/content/cts/MockActivity.java
index 977cedc..19834df 100644
--- a/tests/src/android/content/cts/ContextWrapperStubActivity.java
+++ b/tests/tests/content/src/android/content/cts/MockActivity.java
@@ -16,19 +16,8 @@
package android.content.cts;
-// Need the following import to get access to the app resources, since this
-// class is in a sub-package.
import android.app.Activity;
-import android.os.Bundle;
-import com.android.cts.stub.R;
+public class MockActivity extends Activity {
-public class ContextWrapperStubActivity extends Activity {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.local_sample);
- }
}
-
diff --git a/tests/tests/content/src/android/content/cts/MockApplication.java b/tests/tests/content/src/android/content/cts/MockApplication.java
new file mode 100644
index 0000000..cca34d6
--- /dev/null
+++ b/tests/tests/content/src/android/content/cts/MockApplication.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2008 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 android.content.cts;
+
+import android.app.Application;
+import android.content.res.Configuration;
+
+
+public class MockApplication extends Application {
+
+ public boolean isOnCreateCalled;
+ public boolean isConstructorCalled;
+ public boolean isOnConfigurationChangedCalled;
+ public boolean isOnLowMemoryCalled;
+
+ public MockApplication() {
+ super();
+ isConstructorCalled = true;
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ isOnCreateCalled = true;
+ }
+
+ @Override
+ public void onTerminate() {
+ super.onTerminate();
+ // The documentation states that one cannot rely on this method being called. No need to
+ // test it here.
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ isOnConfigurationChangedCalled = true;
+ }
+
+ @Override
+ public void onLowMemory() {
+ super.onLowMemory();
+ isOnLowMemoryCalled = true;
+ }
+}
diff --git a/tests/src/android/content/cts/MockContentProvider.java b/tests/tests/content/src/android/content/cts/MockContentProvider.java
similarity index 100%
rename from tests/src/android/content/cts/MockContentProvider.java
rename to tests/tests/content/src/android/content/cts/MockContentProvider.java
diff --git a/tests/src/android/content/cts/MockContextWrapperService.java b/tests/tests/content/src/android/content/cts/MockContextWrapperService.java
similarity index 100%
rename from tests/src/android/content/cts/MockContextWrapperService.java
rename to tests/tests/content/src/android/content/cts/MockContextWrapperService.java
diff --git a/tests/src/android/content/cts/MockReceiver.java b/tests/tests/content/src/android/content/cts/MockReceiver.java
similarity index 100%
rename from tests/src/android/content/cts/MockReceiver.java
rename to tests/tests/content/src/android/content/cts/MockReceiver.java
diff --git a/tests/src/android/content/cts/MockReceiverAbort.java b/tests/tests/content/src/android/content/cts/MockReceiverAbort.java
similarity index 100%
rename from tests/src/android/content/cts/MockReceiverAbort.java
rename to tests/tests/content/src/android/content/cts/MockReceiverAbort.java
diff --git a/tests/src/android/content/cts/MockReceiverFirst.java b/tests/tests/content/src/android/content/cts/MockReceiverFirst.java
similarity index 100%
rename from tests/src/android/content/cts/MockReceiverFirst.java
rename to tests/tests/content/src/android/content/cts/MockReceiverFirst.java
diff --git a/tests/src/android/content/cts/MockRemoteContentProvider.java b/tests/tests/content/src/android/content/cts/MockRemoteContentProvider.java
similarity index 100%
rename from tests/src/android/content/cts/MockRemoteContentProvider.java
rename to tests/tests/content/src/android/content/cts/MockRemoteContentProvider.java
diff --git a/tests/src/android/content/cts/MockSRSProvider.java b/tests/tests/content/src/android/content/cts/MockSRSProvider.java
similarity index 100%
rename from tests/src/android/content/cts/MockSRSProvider.java
rename to tests/tests/content/src/android/content/cts/MockSRSProvider.java
diff --git a/tests/tests/content/src/android/content/cts/MockService.java b/tests/tests/content/src/android/content/cts/MockService.java
new file mode 100644
index 0000000..6726f8b
--- /dev/null
+++ b/tests/tests/content/src/android/content/cts/MockService.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2008 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 android.content.cts;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+
+public class MockService extends Service {
+ public static boolean result = false;
+ private final IBinder mBinder = new MockBinder();
+
+ public class MockBinder extends Binder {
+ MockService getService() {
+ return MockService.this;
+ }
+ }
+
+ /**
+ * set the result as true when service bind
+ */
+ @Override
+ public IBinder onBind(Intent intent) {
+ result = true;
+ return mBinder;
+ }
+
+ /**
+ * set the result as true when service start
+ */
+ @Override
+ public void onStart(Intent intent, int startId) {
+ super.onStart(intent, startId);
+ result = true;
+ }
+}
+
diff --git a/tests/src/android/content/cts/MockSyncAdapter.java b/tests/tests/content/src/android/content/cts/MockSyncAdapter.java
similarity index 100%
rename from tests/src/android/content/cts/MockSyncAdapter.java
rename to tests/tests/content/src/android/content/cts/MockSyncAdapter.java
diff --git a/tests/src/android/content/cts/MockSyncAdapterService.java b/tests/tests/content/src/android/content/cts/MockSyncAdapterService.java
similarity index 100%
rename from tests/src/android/content/cts/MockSyncAdapterService.java
rename to tests/tests/content/src/android/content/cts/MockSyncAdapterService.java
diff --git a/tests/tests/content/src/android/content/cts/MutableContextWrapperTest.java b/tests/tests/content/src/android/content/cts/MutableContextWrapperTest.java
index b81ca71..aaba30c 100644
--- a/tests/tests/content/src/android/content/cts/MutableContextWrapperTest.java
+++ b/tests/tests/content/src/android/content/cts/MutableContextWrapperTest.java
@@ -16,7 +16,6 @@
package android.content.cts;
-import android.app.cts.MockActivity;
import android.content.Context;
import android.content.MutableContextWrapper;
import android.test.AndroidTestCase;
diff --git a/tests/src/android/content/cts/ResultReceiver.java b/tests/tests/content/src/android/content/cts/ResultReceiver.java
similarity index 100%
rename from tests/src/android/content/cts/ResultReceiver.java
rename to tests/tests/content/src/android/content/cts/ResultReceiver.java
diff --git a/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java b/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
index 2354926..c271483 100644
--- a/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
+++ b/tests/tests/content/src/android/content/cts/SharedPreferencesTest.java
@@ -54,8 +54,8 @@
// Duplicated from ContextImpl.java. Not ideal, but there wasn't a better
// way to reach into Context{Wrapper,Impl} to ask where this file lives.
- mPrefsFile = new File("/data/data/com.android.cts.stub/shared_prefs",
- "com.android.cts.stub_preferences.xml");
+ mPrefsFile = new File("/data/data/com.android.cts.content/shared_prefs",
+ "com.android.cts.content_preferences.xml");
mPrefsFile.delete();
}
diff --git a/tests/tests/content/src/android/content/pm/cts/ActivityInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ActivityInfoTest.java
index 6c1ae40..caabdb4 100644
--- a/tests/tests/content/src/android/content/pm/cts/ActivityInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ActivityInfoTest.java
@@ -17,7 +17,7 @@
package android.content.pm.cts;
-import android.app.cts.MockActivity;
+import android.content.cts.MockActivity;
import android.content.ComponentName;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
diff --git a/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
index 3055e57..1e9f5a2 100644
--- a/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
@@ -16,7 +16,7 @@
package android.content.pm.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.content.pm.ApplicationInfo;
diff --git a/tests/tests/content/src/android/content/pm/cts/ApplicationInfo_DisplayNameComparatorTest.java b/tests/tests/content/src/android/content/pm/cts/ApplicationInfo_DisplayNameComparatorTest.java
index ebd75cc..211a2ca 100644
--- a/tests/tests/content/src/android/content/pm/cts/ApplicationInfo_DisplayNameComparatorTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ApplicationInfo_DisplayNameComparatorTest.java
@@ -26,7 +26,7 @@
* Test {@link DisplayNameComparator}.
*/
public class ApplicationInfo_DisplayNameComparatorTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
DisplayNameComparator mDisplayNameComparator;
@Override
diff --git a/tests/tests/content/src/android/content/pm/cts/ComponentInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ComponentInfoTest.java
index 7850e1e..361bfe4 100644
--- a/tests/tests/content/src/android/content/pm/cts/ComponentInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ComponentInfoTest.java
@@ -26,16 +26,15 @@
import android.test.AndroidTestCase;
import android.util.Printer;
import android.util.StringBuilderPrinter;
-import android.widget.cts.WidgetTestUtils;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
/**
* Test {@link ComponentInfo}.
*/
public class ComponentInfoTest extends AndroidTestCase {
- private final String PACKAGE_NAME = "com.android.cts.stub";
+ private final String PACKAGE_NAME = "com.android.cts.content";
private ComponentInfo mComponentInfo;
public void testConstructor() {
diff --git a/tests/tests/content/src/android/content/pm/cts/InstrumentationInfoTest.java b/tests/tests/content/src/android/content/pm/cts/InstrumentationInfoTest.java
index 4656949..5b7747d 100644
--- a/tests/tests/content/src/android/content/pm/cts/InstrumentationInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/InstrumentationInfoTest.java
@@ -25,7 +25,7 @@
import android.test.AndroidTestCase;
public class InstrumentationInfoTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String INSTRUMENTATION_NAME =
"android.content.pm.cts.TestPmInstrumentation";
diff --git a/tests/tests/content/src/android/content/pm/cts/PackageInfoTest.java b/tests/tests/content/src/android/content/pm/cts/PackageInfoTest.java
index cefe1a6..0540e0b 100644
--- a/tests/tests/content/src/android/content/pm/cts/PackageInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/PackageInfoTest.java
@@ -32,7 +32,7 @@
private PackageManager mPackageManager;
private PackageInfo mPackageInfo;
private PackageInfo mPackageInfoCmp;
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
@Override
protected void setUp() throws Exception {
diff --git a/tests/tests/content/src/android/content/pm/cts/PackageItemInfoTest.java b/tests/tests/content/src/android/content/pm/cts/PackageItemInfoTest.java
index d3372c6..53e69da 100644
--- a/tests/tests/content/src/android/content/pm/cts/PackageItemInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/PackageItemInfoTest.java
@@ -16,7 +16,7 @@
package android.content.pm.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.content.ComponentName;
@@ -30,7 +30,7 @@
import android.util.Printer;
public class PackageItemInfoTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String ACTIVITY_NAME = "android.content.pm.cts.TestPmActivity";
private static final String METADATA_NAME = "android.content.pm.cts.xmltest";
private PackageManager mPackageManager;
diff --git a/tests/tests/content/src/android/content/pm/cts/PackageItemInfo_DisplayNameComparatorTest.java b/tests/tests/content/src/android/content/pm/cts/PackageItemInfo_DisplayNameComparatorTest.java
index f332d6e..0cfd1dd 100644
--- a/tests/tests/content/src/android/content/pm/cts/PackageItemInfo_DisplayNameComparatorTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/PackageItemInfo_DisplayNameComparatorTest.java
@@ -26,7 +26,7 @@
import android.test.AndroidTestCase;
public class PackageItemInfo_DisplayNameComparatorTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String ACTIVITY_NAME = "android.content.pm.cts.TestPmActivity";
private static final String CMPACTIVITY_NAME = "android.content.pm.cts.TestPmCompare";
diff --git a/tests/tests/content/src/android/content/pm/cts/PackageManagerTest.java b/tests/tests/content/src/android/content/pm/cts/PackageManagerTest.java
index d1e1252..aaab8c4 100644
--- a/tests/tests/content/src/android/content/pm/cts/PackageManagerTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/PackageManagerTest.java
@@ -16,7 +16,7 @@
package android.content.pm.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import android.content.ComponentName;
@@ -44,7 +44,7 @@
*/
public class PackageManagerTest extends AndroidTestCase {
private PackageManager mPackageManager;
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String CONTENT_PKG_NAME = "com.android.cts.content";
private static final String ACTIVITY_ACTION_NAME = "android.intent.action.PMTEST";
private static final String MAIN_ACTION_NAME = "android.intent.action.MAIN";
@@ -395,7 +395,7 @@
public void testOpPermission() {
PermissionInfo permissionInfo = new PermissionInfo();
- String permissionName = "com.android.cts.stub.permission.TEST_DYNAMIC.ADD";
+ String permissionName = "com.android.cts.content.permission.TEST_DYNAMIC.ADD";
permissionInfo.name = permissionName;
permissionInfo.labelRes = R.string.permlab_testDynamic;
permissionInfo.nonLocalizedLabel = "Test Tree";
@@ -450,7 +450,7 @@
public void testGetResources() throws NameNotFoundException {
ComponentName componentName = new ComponentName(PACKAGE_NAME, ACTIVITY_NAME);
int resourceId = R.xml.pm_test;
- String xmlName = "com.android.cts.stub:xml/pm_test";
+ String xmlName = "com.android.cts.content:xml/pm_test";
ApplicationInfo appInfo = mPackageManager.getApplicationInfo(PACKAGE_NAME, 0);
assertNotNull(mPackageManager.getXml(PACKAGE_NAME, resourceId, appInfo));
assertEquals(xmlName, mPackageManager.getResourcesForActivity(componentName)
diff --git a/tests/tests/content/src/android/content/pm/cts/PackageStatsTest.java b/tests/tests/content/src/android/content/pm/cts/PackageStatsTest.java
index dca51e9..6425209 100644
--- a/tests/tests/content/src/android/content/pm/cts/PackageStatsTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/PackageStatsTest.java
@@ -22,7 +22,7 @@
import android.test.AndroidTestCase;
public class PackageStatsTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
public void testPackageStats() {
// Set mock data to make sure the functionality of constructor
diff --git a/tests/tests/content/src/android/content/pm/cts/ProviderInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ProviderInfoTest.java
index c585568..6256a69 100644
--- a/tests/tests/content/src/android/content/pm/cts/ProviderInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ProviderInfoTest.java
@@ -28,7 +28,7 @@
import java.util.List;
public class ProviderInfoTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String PROVIDER_NAME = "android.content.cts.MockContentProvider";
public void testProviderInfo() throws NameNotFoundException {
diff --git a/tests/tests/content/src/android/content/pm/cts/ResolveInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ResolveInfoTest.java
index 3501e86..af3f161 100644
--- a/tests/tests/content/src/android/content/pm/cts/ResolveInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ResolveInfoTest.java
@@ -26,7 +26,7 @@
import android.util.Printer;
public class ResolveInfoTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String MAIN_ACTION_NAME = "android.intent.action.MAIN";
private static final String ACTIVITY_NAME = "android.content.pm.cts.TestPmActivity";
private static final String SERVICE_NAME = "android.content.pm.cts.activity.PMTEST_SERVICE";
diff --git a/tests/tests/content/src/android/content/pm/cts/ServiceInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ServiceInfoTest.java
index 8508c15..297ab69 100644
--- a/tests/tests/content/src/android/content/pm/cts/ServiceInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ServiceInfoTest.java
@@ -25,7 +25,7 @@
import android.test.AndroidTestCase;
public class ServiceInfoTest extends AndroidTestCase {
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String SERVICE_NAME = "android.content.pm.cts.TestPmService";
public void testServiceInfo() throws NameNotFoundException {
diff --git a/tests/tests/content/src/android/content/pm/cts/WidgetTestUtils.java b/tests/tests/content/src/android/content/pm/cts/WidgetTestUtils.java
new file mode 100644
index 0000000..6efd8b1
--- /dev/null
+++ b/tests/tests/content/src/android/content/pm/cts/WidgetTestUtils.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2008 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 android.content.pm.cts;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+/**
+ * The useful methods for widget test.
+ */
+public class WidgetTestUtils {
+ /**
+ * Assert that two bitmaps are equal.
+ *
+ * @param Bitmap b1 the first bitmap which needs to compare.
+ * @param Bitmap b2 the second bitmap which needs to compare.
+ */
+ public static void assertEquals(Bitmap b1, Bitmap b2) {
+ if (b1 == b2) {
+ return;
+ }
+
+ if (b1 == null || b2 == null) {
+ Assert.fail("the bitmaps are not equal");
+ }
+
+ // b1 and b2 are all not null.
+ if (b1.getWidth() != b2.getWidth() || b1.getHeight() != b2.getHeight()
+ || b1.getConfig() != b2.getConfig()) {
+ Assert.fail("the bitmaps are not equal");
+ }
+
+ int w = b1.getWidth();
+ int h = b1.getHeight();
+ int s = w * h;
+ int[] pixels1 = new int[s];
+ int[] pixels2 = new int[s];
+
+ b1.getPixels(pixels1, 0, w, 0, 0, w, h);
+ b2.getPixels(pixels2, 0, w, 0, 0, w, h);
+
+ for (int i = 0; i < s; i++) {
+ if (pixels1[i] != pixels2[i]) {
+ Assert.fail("the bitmaps are not equal");
+ }
+ }
+ }
+
+ /**
+ * Find beginning of the special element.
+ * @param parser XmlPullParser will be parsed.
+ * @param firstElementName the target element name.
+ *
+ * @throws XmlPullParserException if XML Pull Parser related faults occur.
+ * @throws IOException if I/O-related error occur when parsing.
+ */
+ public static final void beginDocument(XmlPullParser parser, String firstElementName)
+ throws XmlPullParserException, IOException {
+ Assert.assertNotNull(parser);
+ Assert.assertNotNull(firstElementName);
+
+ int type;
+ while ((type = parser.next()) != XmlPullParser.START_TAG
+ && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+
+ if (!parser.getName().equals(firstElementName)) {
+ throw new XmlPullParserException("Unexpected start tag: found " + parser.getName()
+ + ", expected " + firstElementName);
+ }
+ }
+
+ /**
+ * Compare the expected pixels with actual, scaling for the target context density
+ *
+ * @throws AssertionFailedError
+ */
+ public static void assertScaledPixels(int expected, int actual, Context context) {
+ Assert.assertEquals(expected * context.getResources().getDisplayMetrics().density,
+ actual, 3);
+ }
+
+ /** Converts dips into pixels using the {@link Context}'s density. */
+ public static int convertDipToPixels(Context context, int dip) {
+ float density = context.getResources().getDisplayMetrics().density;
+ return Math.round(density * dip);
+ }
+
+ /**
+ * Retrieve a bitmap that can be used for comparison on any density
+ * @param resources
+ * @return the {@link Bitmap} or <code>null</code>
+ */
+ public static Bitmap getUnscaledBitmap(Resources resources, int resId) {
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inScaled = false;
+ return BitmapFactory.decodeResource(resources, resId, options);
+ }
+
+ /**
+ * Retrieve a dithered bitmap that can be used for comparison on any density
+ * @param resources
+ * @param config the preferred config for the returning bitmap
+ * @return the {@link Bitmap} or <code>null</code>
+ */
+ public static Bitmap getUnscaledAndDitheredBitmap(Resources resources,
+ int resId, Bitmap.Config config) {
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inDither = true;
+ options.inScaled = false;
+ options.inPreferredConfig = config;
+ return BitmapFactory.decodeResource(resources, resId, options);
+ }
+}
diff --git a/tests/tests/content/src/android/content/res/cts/ArrayTest.java b/tests/tests/content/src/android/content/res/cts/ArrayTest.java
index 1b1fcdf..909fbf6 100644
--- a/tests/tests/content/src/android/content/res/cts/ArrayTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ArrayTest.java
@@ -20,7 +20,7 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class ArrayTest extends AndroidTestCase {
private Resources mResources;
diff --git a/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java b/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
index cbf20ec..2870fee 100644
--- a/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
+++ b/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
@@ -30,7 +30,7 @@
import android.test.AndroidTestCase;
import android.util.TypedValue;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import com.android.internal.util.XmlUtils;
diff --git a/tests/tests/content/src/android/content/res/cts/ColorStateListTest.java b/tests/tests/content/src/android/content/res/cts/ColorStateListTest.java
index cd1ac8b..88f5798 100644
--- a/tests/tests/content/src/android/content/res/cts/ColorStateListTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ColorStateListTest.java
@@ -27,7 +27,7 @@
import android.os.Parcel;
import android.test.AndroidTestCase;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class ColorStateListTest extends AndroidTestCase {
diff --git a/tests/tests/content/src/android/content/res/cts/ConfigTest.java b/tests/tests/content/src/android/content/res/cts/ConfigTest.java
index bfc7887..0b94b6f 100644
--- a/tests/tests/content/src/android/content/res/cts/ConfigTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ConfigTest.java
@@ -31,7 +31,7 @@
import android.util.DisplayMetrics;
import android.util.Log;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class ConfigTest extends AndroidTestCase {
enum Properties {
diff --git a/tests/tests/content/src/android/content/res/cts/FractionTest.java b/tests/tests/content/src/android/content/res/cts/FractionTest.java
index 9fa896c..2c3e797 100644
--- a/tests/tests/content/src/android/content/res/cts/FractionTest.java
+++ b/tests/tests/content/src/android/content/res/cts/FractionTest.java
@@ -20,7 +20,7 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.TypedValue;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class FractionTest extends AndroidTestCase {
diff --git a/tests/tests/content/src/android/content/res/cts/PluralResourcesTest.java b/tests/tests/content/src/android/content/res/cts/PluralResourcesTest.java
index 074d10a..1fd204d 100644
--- a/tests/tests/content/src/android/content/res/cts/PluralResourcesTest.java
+++ b/tests/tests/content/src/android/content/res/cts/PluralResourcesTest.java
@@ -25,7 +25,7 @@
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class PluralResourcesTest extends AndroidTestCase {
public static boolean DEBUG = false;
diff --git a/tests/tests/content/src/android/content/res/cts/PrimitiveTest.java b/tests/tests/content/src/android/content/res/cts/PrimitiveTest.java
index c7da6d8..8eeb086 100644
--- a/tests/tests/content/src/android/content/res/cts/PrimitiveTest.java
+++ b/tests/tests/content/src/android/content/res/cts/PrimitiveTest.java
@@ -21,7 +21,7 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.TypedValue;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class PrimitiveTest extends AndroidTestCase {
private Resources mResources;
diff --git a/tests/tests/content/src/android/content/res/cts/RawResourceTest.java b/tests/tests/content/src/android/content/res/cts/RawResourceTest.java
index 9c8dae0..c92efc7 100644
--- a/tests/tests/content/src/android/content/res/cts/RawResourceTest.java
+++ b/tests/tests/content/src/android/content/res/cts/RawResourceTest.java
@@ -19,7 +19,7 @@
import android.content.res.Resources;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import java.io.IOException;
import java.io.InputStream;
diff --git a/tests/tests/content/src/android/content/res/cts/ResourceNameTest.java b/tests/tests/content/src/android/content/res/cts/ResourceNameTest.java
index eacf00d..a7cc03b 100644
--- a/tests/tests/content/src/android/content/res/cts/ResourceNameTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ResourceNameTest.java
@@ -20,7 +20,7 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class ResourceNameTest extends AndroidTestCase {
@@ -29,10 +29,10 @@
final Resources res = mContext.getResources();
final String fullName = res.getResourceName(R.configVarying.simple);
- assertEquals("com.android.cts.stub:configVarying/simple", fullName);
+ assertEquals("com.android.cts.content:configVarying/simple", fullName);
final String packageName = res.getResourcePackageName(R.configVarying.simple);
- assertEquals("com.android.cts.stub", packageName);
+ assertEquals("com.android.cts.content", packageName);
final String typeName = res.getResourceTypeName(R.configVarying.simple);
assertEquals("configVarying", typeName);
@@ -45,16 +45,16 @@
public void testGetResourceIdentifier() {
final Resources res = mContext.getResources();
int resid = res.getIdentifier(
- "com.android.cts.stub:configVarying/simple",
+ "com.android.cts.content:configVarying/simple",
null, null);
assertEquals(R.configVarying.simple, resid);
resid = res.getIdentifier("configVarying/simple", null,
- "com.android.cts.stub");
+ "com.android.cts.content");
assertEquals(R.configVarying.simple, resid);
resid = res.getIdentifier("simple", "configVarying",
- "com.android.cts.stub");
+ "com.android.cts.content");
assertEquals(R.configVarying.simple, resid);
}
}
diff --git a/tests/tests/content/src/android/content/res/cts/ResourcesTest.java b/tests/tests/content/src/android/content/res/cts/ResourcesTest.java
index 058076c..88caa6f 100644
--- a/tests/tests/content/src/android/content/res/cts/ResourcesTest.java
+++ b/tests/tests/content/src/android/content/res/cts/ResourcesTest.java
@@ -16,7 +16,7 @@
package android.content.res.cts;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import com.android.internal.util.XmlUtils;
@@ -49,9 +49,9 @@
private static final String CONFIG_VARYING = "configVarying";
private static final String SIMPLE = "simple";
private static final String CONFIG_VARYING_SIMPLE = "configVarying/simple";
- private static final String PACKAGE_NAME = "com.android.cts.stub";
+ private static final String PACKAGE_NAME = "com.android.cts.content";
private static final String COM_ANDROID_CTS_STUB_IDENTIFIER =
- "com.android.cts.stub:configVarying/simple";
+ "com.android.cts.content:configVarying/simple";
private Resources mResources;
@Override
@@ -320,7 +320,7 @@
//expected
}
- mResources.getValue("com.android.cts.stub:raw/text", tv, false);
+ mResources.getValue("com.android.cts.content:raw/text", tv, false);
assertNotNull(tv);
assertEquals("res/raw/text.txt", tv.coerceToString());
}
diff --git a/tests/tests/content/src/android/content/res/cts/Resources_ThemeTest.java b/tests/tests/content/src/android/content/res/cts/Resources_ThemeTest.java
index 4a4991f..349cb47 100644
--- a/tests/tests/content/src/android/content/res/cts/Resources_ThemeTest.java
+++ b/tests/tests/content/src/android/content/res/cts/Resources_ThemeTest.java
@@ -26,7 +26,7 @@
import android.util.TypedValue;
import android.util.Xml;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
public class Resources_ThemeTest extends AndroidTestCase {
diff --git a/tests/tests/content/src/android/content/res/cts/TypedArrayTest.java b/tests/tests/content/src/android/content/res/cts/TypedArrayTest.java
index c51405a..cc6c5ec 100644
--- a/tests/tests/content/src/android/content/res/cts/TypedArrayTest.java
+++ b/tests/tests/content/src/android/content/res/cts/TypedArrayTest.java
@@ -27,7 +27,7 @@
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
-import com.android.cts.stub.R;
+import com.android.cts.content.R;
import com.android.internal.util.XmlUtils;