summaryrefslogtreecommitdiff
path: root/tests/UpdatableSystemFontTest/src
AgeCommit message (Collapse)Author
2021-06-10Read font attributes from buffer.Kohsuke Yatoh
minikin::Font::typeface() is expensive because it will open the font file. Font attribute getters should avoid calling it. Bug: 188201287 Test: atest UpdatableSystemFontTest Test: atest CtsGraphicsTestCases:FontTest Test: atest CtsGraphicsTestCases:SystemFontsTest Change-Id: Ic8554f6dfacbe27ddfea6b375633c96bced2cc09
2021-05-13Close FDs even when throwing SecurityException.Kohsuke Yatoh
Bug: 187879195 Test: atest UpdatableSystemFontTest Change-Id: I34d04f152210fe2f89f4d96e920978dde21d06c8
2021-05-13Close FDs / mmap handles promptly.Kohsuke Yatoh
Currently we rely on GC to close them. This may cause system_server crash depending on the timing of GC. Bug: 187879195 Test: atest UpdatableSystemFontTest Change-Id: I09ac3f349e5ec100e4164320cbf27977474cc4bb
2021-05-05Ignore 'cmd font clear' failure in tearDown().Kohsuke Yatoh
This would fail (as expected) on Pixel 3 / 3a. On Pixel 3 / 3a, we skip the test in assumeTrue() in setUp(). tearDown() should not throw and make the test fail. Bug: 187364676 Test: forrest Change-Id: I9e82c2e27c3ef71e73bf022db543318cfc0f2ef7
2021-05-03Use FontManager Java API in tests.Kohsuke Yatoh
Thanks to commit 84383b5ef87586804238c5dc62a2f274e7deb82e, now Shell has UPDATE_FONTS permission and we can use it in instrumentation tests via UiAutomation#adoptShellPermissionIdentity(). Bug: 186966067 Test: atest UpdatableSystemFontTest Change-Id: Idd2043f53d95b7c904d563dd3ef1d1846841c0d6
2021-05-03Make UpdatableSystemFontTest device side test.Kohsuke Yatoh
As commit 679a824773aee8c4424787e9f36d10de1f984112 removed 'adb shell stop', this test doesn't need to be a host side test. This allows us to call FontManager Java API in UpdatableSystemFontTest. I will rewrite 'cmd font' to FontManager API calls in a following CL. Bug: 186966067 Test: atest UpdatableSystemFontTest Change-Id: I3bad29a3ea8402c990ae0dd553d3230db2d9f67c
2021-04-22Do not actually reboot the device in VTS test.Kohsuke Yatoh
- Sometimes reboot takes longer time and makes following tests fail. - If the device has a screen lock, tests get stuck there. This is not a new issue, but a recently added test (#launchApp) tries to start an Activity and it fails when the device is still booting or at a screen lock. Bug: 185483743 Bug: 185576411 Test: atest FrameworksServicesTests:UpdatableFontDirTest Test: atest UpdatableSystemFontTest Change-Id: I86d4be1761e648114503b5f3560992a89c0b34d7
2021-04-20Wait more time for activity start.Kohsuke Yatoh
- Looks like 5 seconds is too short on some emulator devices. - Makes sure that the app is installed and enabled. Bug: 185483743 Bug: 185576411 Test: atest UpdatableSystemFontTest#launchApp --rerun-until-failure Change-Id: Ibc1dba9f4b2b3c694e186798f65a456e712cba9e
2021-04-13Verify updated font is used in app process.Kohsuke Yatoh
This CL adds a VTS test that: 1. Updates NotoColorEmoji font 2. Launches a test app that renders an emoji 3. Verifies that the updated NotoColorEmoji font file is used by the app process. Bug: 180370569 Test: atest UpdatableSystemFontTest Change-Id: I418d7cc23a290ebe4ae6e5b8af782b336497fbdd
2021-04-08Allow same version update.Kohsuke Yatoh
Bug: 184862662 Test: atest FrameworksServicesTests:UpdatableFontDirTest Test: atest UpdatableSystemFontTest Change-Id: Ic955e2713c08e4c258d61cd3b597a472e1e3298c
2021-03-02Revert "Add crash detection and recovery."Kohsuke Yatoh
This partially reverts the following commits: - commit de417e735ede24b0a3513772b1653996d0c05575 - commit 45c6231908265da0b91ad61df81a0c5af77e0c4a Reason for revert: Caused boot time regression. Bug: 176939176 Bug: 181536798 Test: atest FrameworksServicesTests:UpdatableFontDirTest Test: atest UpdatableSystemFontTest Change-Id: Ibb5505018b24caa442fcbefda57aaa674ab9441e
2021-02-04Add test for font crash protection.Kohsuke Yatoh
This test modifies the installed font file with block_device_writer. FontManagerService should detect it and remove the modified file. Bug: 176939176 Test: atest ApkVerityTest Test: atest UpdatableSystemFontTest Change-Id: I7da3f2911459619d5d56a94e091b912d67cb27d3
2021-02-01Integration test for updatable system font.Kohsuke Yatoh
This test: (1) signs a font file with the test key. (2) side-loads the test cert to the device under test. (3) verifies that the signed font file can be installed. The device must be rootable for doing step (2). Bug: 176939176 Test: atest UpdatableSystemFontTest Change-Id: I7a9b614aa3c77589c3495b663cb76056ba657006