Commit 2d1e6ddf authored by Jun Mukai's avatar Jun Mukai Committed by Chromium LUCI CQ

Clear the cache in AutomationManagerAura when disabled.

On the Tast tests which use the Automation features, I'm seeing
sometimes the automation node tree gets empty. During the debugging,
I've noticed that sometimes the automation tree fails to build
the tree updates (happens OnSerializeFailure).

This can be resolved by clearing the cache when it is disabled
(which happens regularly on tests).

Bug: 1165292
Test: on kevin64, run informational Tast tests
AX-Relnotes: n/a
Change-Id: I835e06ca2118ae6c36d6fb8b877fad074bd41fcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627715
Commit-Queue: Jun Mukai <mukai@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845868}
parent fdde8d2e
...@@ -75,6 +75,8 @@ void AutomationManagerAura::Enable() { ...@@ -75,6 +75,8 @@ void AutomationManagerAura::Enable() {
void AutomationManagerAura::Disable() { void AutomationManagerAura::Disable() {
enabled_ = false; enabled_ = false;
cache_ = std::make_unique<views::AXAuraObjCache>();
tree_.reset();
Reset(true); Reset(true);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment