New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 756707 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Team-Accessibility

Blocking:
issue 753369



Sign in to add a comment

ShadowAccessibilityManager does not work correctly

Project Member Reported by changwan@chromium.org, Aug 18 2017

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.

 
Blocking: 753369
Cc: yolandyan@chromium.org
Labels: ReleaseBlock-Stable M-62
marking RBS as it blocks  issue 753369 
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.

Status: Fixed (was: Started)
After got approval from stakeholders, I had to 'git push' the CL: https://chromium-review.googlesource.com/c/external/robolectric/+/620112

yolandyan: we'll need to make sure this gets moved up into 3.4 before mikecase lands that.
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.
Status: Started (was: Fixed)
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?

3.2-chromium is right, but we need to update DEPS.
Project Member

Comment 9 by bugdroid1@chromium.org, 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

Project Member

Comment 10 by bugdroid1@chromium.org, 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

Project Member

Comment 12 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)
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.

Labels: Merge-TBD
[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.
#13 :D
Labels: -Merge-TBD

Sign in to add a comment