summaryrefslogtreecommitdiff
path: root/scripts/manifest_fixer_test.py
diff options
context:
space:
mode:
author Victor Hsieh <victorhsieh@google.com> 2019-01-29 13:00:33 -0800
committer Victor Hsieh <victorhsieh@google.com> 2019-01-29 13:09:10 -0800
commitd181c8ba7684b2ca787b7a0389b4c95ebec1f17c (patch)
treee8e44c08c888e920e33355c87ce71ec8a35541b7 /scripts/manifest_fixer_test.py
parent910cdf95cda8dc12335972963ffc0cb44db3b5b8 (diff)
Rename preferCodeIntegrity to useEmbeddedDex
Test: build and run testing app Bug: 112037137 Change-Id: Ia82c2c3ba7eb32117a4be078ac31ee2ba510f9eb
Diffstat (limited to 'scripts/manifest_fixer_test.py')
-rwxr-xr-xscripts/manifest_fixer_test.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/manifest_fixer_test.py b/scripts/manifest_fixer_test.py
index edc98cd3a..1d8de5565 100755
--- a/scripts/manifest_fixer_test.py
+++ b/scripts/manifest_fixer_test.py
@@ -346,12 +346,12 @@ class AddUsesNonSdkApiTest(unittest.TestCase):
self.assertEqual(output, expected)
-class PreferCodeIntegrityTest(unittest.TestCase):
- """Unit tests for add_prefer_code_integrity function."""
+class UseEmbeddedDexTest(unittest.TestCase):
+ """Unit tests for add_use_embedded_dex function."""
def run_test(self, input_manifest):
doc = minidom.parseString(input_manifest)
- manifest_fixer.add_prefer_code_integrity(doc)
+ manifest_fixer.add_use_embedded_dex(doc)
output = StringIO.StringIO()
manifest_fixer.write_xml(output, doc)
return output.getvalue()
@@ -362,23 +362,23 @@ class PreferCodeIntegrityTest(unittest.TestCase):
' <application%s/>\n'
'</manifest>\n')
- def prefer_code_integrity(self, value):
- return ' android:preferCodeIntegrity="%s"' % value
+ def use_embedded_dex(self, value):
+ return ' android:useEmbeddedDex="%s"' % value
def test_manifest_with_undeclared_preference(self):
manifest_input = self.manifest_tmpl % ''
- expected = self.manifest_tmpl % self.prefer_code_integrity('true')
+ expected = self.manifest_tmpl % self.use_embedded_dex('true')
output = self.run_test(manifest_input)
self.assertEqual(output, expected)
- def test_manifest_with_prefer_code_integrity(self):
- manifest_input = self.manifest_tmpl % self.prefer_code_integrity('true')
+ def test_manifest_with_use_embedded_dex(self):
+ manifest_input = self.manifest_tmpl % self.use_embedded_dex('true')
expected = manifest_input
output = self.run_test(manifest_input)
self.assertEqual(output, expected)
- def test_manifest_with_not_prefer_code_integrity(self):
- manifest_input = self.manifest_tmpl % self.prefer_code_integrity('false')
+ def test_manifest_with_not_use_embedded_dex(self):
+ manifest_input = self.manifest_tmpl % self.use_embedded_dex('false')
self.assertRaises(RuntimeError, self.run_test, manifest_input)
if __name__ == '__main__':