Fix and improve RequestFocusTest
RequestFocusTest used the deprecated ActivityInstrumentationTestCase2 and associated support. It also uses the @UiThreadTest annotation which is only supported in junit4 leading to half of the suite failing with exceptions due to calls on a non-main thread. This change: - migrates to junit4 - uses modern constructs like ActivityScenarioRule - moves UI thread dependent logic to ActivityScenarioRule.onActivity - resolves new base assumption of default touch mode by adding logic to force non-touch by sending a key event - rebaselines behaviors e.g. global focus change is no longer called - motivates more tests for keyboard + focus - will be used to also adapt this suite for system + a11y focus testing Bug: 393668723 Test: atest RequestFocusTest Change-Id: Ifcdb1c5a5bb7508ed94ee4799f1412d13bab6086
Loading
Please register or sign in to comment