aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Vuong <akvuong@google.com>2023-03-14 16:35:21 +0000
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-04-03 16:42:59 +0000
commit616fc402e235939bcebc8b4135665874a0962b0c (patch)
treedffefd0374f7ed3358f3a252c2e2aafba60b76be
parent6a30958ac795b8a4a03d052d8b1475ca207215cf (diff)
downloadjava-encoder-616fc402e235939bcebc8b4135665874a0962b0c.tar.gz
Add OwaspJavaEncoderTestCases and TEST_MAPPINGaml_wif_331910020aml_tz4_332714010
Bug: 262898801 Test: atest (cherry picked from https://android-review.googlesource.com/q/commit:d86fa4e886eda62c4718b24d0feff83868c72fb8) Merged-In: Ie63b019dde762257df5c1c9eefbd471d67808432 Change-Id: Ie63b019dde762257df5c1c9eefbd471d67808432
-rw-r--r--Android.bp22
-rw-r--r--AndroidManifest.xml27
-rw-r--r--AndroidTest.xml28
-rw-r--r--TEST_MAPPING10
4 files changed, 87 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index f2f0816..7223c96 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,3 +41,25 @@ java_library {
"//packages/modules/OnDevicePersonalization:__subpackages__",
],
}
+
+android_test {
+ name: "OwaspJavaEncoderTestCases",
+ srcs: [
+ "core/src/test/**/*.java",
+ ],
+ java_resource_dirs: ["core/src/test/resources"],
+ static_libs: [
+ "androidx.test.rules",
+ "owasp-java-encoder",
+ ],
+ libs: [
+ "android.test.base",
+ ],
+ min_sdk_version: "33",
+ sdk_version: "test_current",
+ test_suites: [
+ "general-tests",
+ "mts-ondevicepersonalization",
+ ],
+ visibility: ["//visibility:private"],
+}
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..5dd9e6c
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.owasp.encoder" >
+
+ <uses-sdk android:minSdkVersion="33" />
+ <application />
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="org.owasp.encoder" >
+ </instrumentation>
+</manifest>
diff --git a/AndroidTest.xml b/AndroidTest.xml
new file mode 100644
index 0000000..e8bfa45
--- /dev/null
+++ b/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+<configuration description="Config for owasp java encoder tests">
+ <option name="test-suite-tag" value="mts" />
+
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true"/>
+ <option name="test-file-name" value="OwaspJavaEncoderTestCases.apk"/>
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <option name="package" value="org.owasp.encoder"/>
+ </test>
+</configuration> \ No newline at end of file
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..be3eb2f
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,10 @@
+{
+ "presubmit": [
+ {
+ "name": "OnDevicePersonalizationManagingServicesTests"
+ },
+ {
+ "name": "OwaspJavaEncoderTestCases"
+ }
+ ]
+}