Issue metadata
Sign in to add a comment
|
ShadowAccessibilityManager does not work correctly |
||||||||||||||||||||||||
Issue description
Android takes a static instance of AccessibilityManager in testing whether accessibility is enabled or not. The usual pattern looks like this:
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
...
}
In a test,
ShadowAccessibilityManager shadow = Shadows.shadowOf(mAccessibilityManager);
shadow.setEnabled(true);
But this does not make getInstance().isEnabled() to return true.
,
Aug 21 2017
,
Aug 23 2017
https://chromium-review.googlesource.com/c/external/robolectric/+/620112 is under review. FYI, I have uploaded a workaround which basically disables accessibility testing. https://chromium-review.googlesource.com/c/chromium/src/+/630498 You can use the same switch when you test-upgrade robolectric.
,
Aug 29 2017
After got approval from stakeholders, I had to 'git push' the CL: https://chromium-review.googlesource.com/c/external/robolectric/+/620112
,
Aug 29 2017
yolandyan: we'll need to make sure this gets moved up into 3.4 before mikecase lands that.
,
Aug 29 2017
Note: I've filed https://github.com/robolectric/robolectric/issues/3364 to notify robolectric team. I expect that they come up with a more extensive version of the fix because other shadow managers may be suffering from the same problem.
,
Aug 30 2017
Hmm... Actually code search (https://cs.chromium.org/chromium/src/third_party/robolectric/robolectric/robolectric-shadows/shadows-core/src/main/java/org/robolectric/shadows/ShadowAccessibilityManager.java?q=shadowaccessibilitymanager&dr=CSs&l=29) and git try failure: https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/373967 suggest that the fix wasn't picked up. Is 3.2-chromium the right branch? Or should I cherry-pick it to some other branch?
,
Aug 30 2017
3.2-chromium is right, but we need to update DEPS.
,
Aug 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b88f95748961a292623b7673590c85d12c4df5b2 commit b88f95748961a292623b7673590c85d12c4df5b2 Author: Changwan Ryu <changwan@chromium.org> Date: Wed Aug 30 17:07:45 2017 Update DEPS for robolectric Rolling for one change: https://chromium.googlesource.com/external/robolectric/+/6d9859431b1201ad5d4139d0b397dd5b4bb22863 BUG= 756707 Change-Id: Ifb69f6731d8970de5c7bdf5565484eadc13c7a7c Reviewed-on: https://chromium-review.googlesource.com/642178 Reviewed-by: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#498508} [modify] https://crrev.com/b88f95748961a292623b7673590c85d12c4df5b2/DEPS
,
Aug 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/12f04b936a78057faf71ce25db9a3c3148c310c9 commit 12f04b936a78057faf71ce25db9a3c3148c310c9 Author: Scott Graham <scottmg@chromium.org> Date: Wed Aug 30 17:19:14 2017 Revert "Update DEPS for robolectric" This reverts commit b88f95748961a292623b7673590c85d12c4df5b2. Reason for revert: Doesn't seem to build at head, and all the tryruns look... not green either. Original change's description: > Update DEPS for robolectric > > Rolling for one change: > > https://chromium.googlesource.com/external/robolectric/+/6d9859431b1201ad5d4139d0b397dd5b4bb22863 > > BUG= 756707 > > Change-Id: Ifb69f6731d8970de5c7bdf5565484eadc13c7a7c > Reviewed-on: https://chromium-review.googlesource.com/642178 > Reviewed-by: Changwan Ryu <changwan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#498508} TBR=changwan@chromium.org Change-Id: Ic77e9c70635490d418612d95b10978663f24ec75 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 756707 Reviewed-on: https://chromium-review.googlesource.com/643966 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org> Cr-Commit-Position: refs/heads/master@{#498514} [modify] https://crrev.com/12f04b936a78057faf71ce25db9a3c3148c310c9/DEPS
,
Aug 31 2017
Also merged https://chromium-review.googlesource.com/c/external/robolectric/+/646278 to origin/3.2-chromium
,
Aug 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd7b13bd96b4fab786b24cc98cb9c42fd3905e6b commit bd7b13bd96b4fab786b24cc98cb9c42fd3905e6b Author: Changwan Ryu <changwan@chromium.org> Date: Thu Aug 31 23:14:21 2017 Enable accessibility tests for AutocompleteEditText Sets TEST_ACCESSIBILITY to true, and picks up the fix in robolectric. BUG= 756707 , 753369 Change-Id: Ida291a45baf942c19dfdc543578b445d1e4d7858 Reviewed-on: https://chromium-review.googlesource.com/643336 Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#499065} [modify] https://crrev.com/bd7b13bd96b4fab786b24cc98cb9c42fd3905e6b/DEPS [modify] https://crrev.com/bd7b13bd96b4fab786b24cc98cb9c42fd3905e6b/chrome/android/junit/src/org/chromium/chrome/browser/omnibox/AutocompleteEditTextTest.java
,
Sep 5 2017
This got in M62. Note that I also upstreamed the fix in robolectric to enable accessibility testing: https://github.com/robolectric/robolectric/issues/3364 https://github.com/robolectric/robolectric/pull/3372 It has 3.5 milestone, so hopefully version 3.5 will have the fix.
,
Sep 5 2017
[Auto-generated comment by a script] We noticed that this issue is targeted for M-62; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-62 label, otherwise remove Merge-TBD label. Thanks.
,
Sep 5 2017
#13 :D
,
Sep 5 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by changwan@chromium.org
, Aug 18 2017