Skip to content

Commit

Permalink
test: add test case for android:isAccessibilityTool (#3426)
Browse files Browse the repository at this point in the history
* test: add test case for android:isAccessibilityTool

* test: augment tests for accessibility service extension
  • Loading branch information
iBotPeaches authored Nov 16, 2023
1 parent 4441648 commit bf1041e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ public void xmlReferencesTest() throws BrutException {
compareXmlFiles("res/xml/references.xml");
}

@Test
public void xmlAccessibilityTest() throws BrutException {
compareXmlFiles("res/xml/accessibility_service_config.xml");
}

@Test
public void xmlXsdFileTest() throws BrutException {
compareXmlFiles("res/xml/ww_box_styles_schema.xsd");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public void xmlXsdFileTest() throws BrutException {
compareXmlFiles("res/xml/ww_box_styles_schema.xsd");
}

@Test
public void xmlAccessibilityTest() throws BrutException {
compareXmlFiles("res/xml/accessibility_service_config.xml");
}

@Test
public void multipleDexTest() throws BrutException, IOException {
compareBinaryFolder("/smali_classes2", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:appCategory="game" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="brut.apktool.testapp" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:glEsVersion="0x00030002" />
<application android:label="Issue2799 &amp; B">
<application android:label="Issue2799 &amp; B" android:isAccessibilityTool="false">
<service android:name=".MyAccessibilityService">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
<meta-data name="test_int_as_string" value="\ 12345" />
<meta-data name="test_int" value="12345" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:isAccessibilityTool="true"
/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:appCategory="game" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="brut.apktool.aapt1.testapp" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
<application android:label="Issue2799 &amp; B" android:enableOnBackInvokedCallback="true">
<application android:label="Issue2799 &amp; B" android:enableOnBackInvokedCallback="true" android:isAccessibilityTool="false">
<service android:name=".MyAccessibilityService">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
<meta-data name="test_int_as_string" value="\ 12345" />
<meta-data name="test_int" value="12345" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:isAccessibilityTool="true"
/>

0 comments on commit bf1041e

Please sign in to comment.