Commit 6a144ecb authored by Kevin Babbitt's avatar Kevin Babbitt Committed by Commit Bot

a11y: Remove fragment root override for GetRuntimeId

The default HWND provider for UI Automation will generate a runtime id
for our fragment root, but relying on this behavior for the legacy
window was breaking the Inspect tool's ability to expand the tree for
web content. Removing the special case and generating a runtime id for
the fragment root as for any other node fixes the issue.

Bug: 928811
Change-Id: Id15d33cacbc97699e904e9bf53e1b39975cbf8a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797096Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#695812}
parent f4050b14
......@@ -90,14 +90,6 @@ class AXFragmentRootPlatformNodeWin : public AXPlatformNodeWin,
return S_OK;
}
STDMETHOD(GetRuntimeId)(SAFEARRAY** runtime_id) {
UIA_VALIDATE_CALL_1_ARG(runtime_id);
// UIA obtains a runtime ID for a fragment root from the associated HWND.
*runtime_id = nullptr;
return S_OK;
}
//
// IRawElementProviderFragmentRoot methods.
//
......
......@@ -35,22 +35,6 @@ TEST_F(AXFragmentRootTest, TestUIAGetFragmentRoot) {
EXPECT_EQ(expected_fragment_root.Get(), actual_fragment_root.Get());
}
TEST_F(AXFragmentRootTest, TestUIAGetRuntimeId) {
AXNodeData root;
Init(root);
InitFragmentRoot();
ComPtr<IRawElementProviderFragmentRoot> fragment_root_provider =
GetFragmentRoot();
ComPtr<IRawElementProviderFragment> fragment_provider;
fragment_root_provider.As(&fragment_provider);
base::win::ScopedSafearray runtime_id;
EXPECT_HRESULT_SUCCEEDED(
fragment_provider->GetRuntimeId(runtime_id.Receive()));
EXPECT_EQ(runtime_id.Get(), nullptr);
}
TEST_F(AXFragmentRootTest, TestUIAElementProviderFromPoint) {
AXNodeData root_data;
root_data.id = 1;
......
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