9213d23178183981c653714f8df5806aab458bb0 |
|
29-Mar-2017 |
Phil Weaver <pweaver@google.com> |
Consolidate a11y unit tests and get them working Moving tests for accessibility manager into the a11y directory and getting them to use some of the newer test infrastructure. Minor tweaks to AccessibilityManager to make it testable. Deleting the AccessibilityManagerService tests entirely. This class is difficult to unit test with the current infrastructure, but is covered in CTS tests to a large degree. I wasn't able to get these working quickly, and they rely on timeouts that make them run much slower than the other tests. They also throw exceptions when their mock accessibility services receive accessibility events, which causes the system to blacklist those services, causing the tests to fail differently until the system is reset. I think it's better to focus on writing new, more robust tests than on rewriting these tests to pass. Bug: 36614219 Test: A11y unit tests now work. Change-Id: I8effe44f22110d55ebb700dc46f59b7e7a1aa946
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
|
192bb0bc54f6bb418f5778fe26eb2e68514290fb |
|
09-Mar-2017 |
Paul Duffin <paulduffin@google.com> |
Refactor code incompatible with Mockito 2.7.13 (cherry picked from 76e319f015c2b43498ce3ce610a253d63e76cbf3) Some additional internal only refactorings were done as well. Bug: 32912773 Test: make checkbuild Change-Id: I96e3da967fad731fc8f39bde9db95f50ab7353fb
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
|
89e3ffc66c5a05f188ff9748b48abebc247f664b |
|
19-Sep-2016 |
Phil Weaver <pweaver@google.com> |
Add tests for MagnificationController. Also refactoring the class to make it easier to test and chaning behavior where the current behavior seemed poorly defined. Refactoring: - Combined all handlers into one. - Simplified animation to use a ValueAnimator. - Eliminated ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE setting. Move rest of settings reading into mockable class. - Move callbacks from WindowManager into the main class. - Pulled out my instrumented Handler from the MotionEventInjectorTest into its own class so I can reuse it. Behavior changes: - Always constraining out-of-bounds values rather than refusing to change them. - Constraining offsets on bounds changes. We previously left them alone, even if they were out of bounds. - Keeping track of the animation starting point. We were interpolating between the current magnification spec and the final one. This change means the magnification animates to a different profile. Test: This CL adds tests. I've also run a11y CTS. Bugs: 31855954, 30325691 Change-Id: Ie00e29ae88b75d9fe1016f9d107257c9cf6425bb
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
|