Chromium Code Reviews| Index: ui/accessibility/platform/ax_platform_node_win_unittest.cc |
| diff --git a/ui/accessibility/platform/ax_platform_node_win_unittest.cc b/ui/accessibility/platform/ax_platform_node_win_unittest.cc |
| index 506267ccaa1d5e4eb0a917282f8ec2259c51be91..65a39048126b27b06436932ad8da2f30f800da4c 100644 |
| --- a/ui/accessibility/platform/ax_platform_node_win_unittest.cc |
| +++ b/ui/accessibility/platform/ax_platform_node_win_unittest.cc |
| @@ -124,6 +124,24 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleDetachedObject) { |
| EXPECT_EQ(E_FAIL, root_obj->get_accName(SELF, name2.Receive())); |
| } |
| +TEST_F(AXPlatformNodeWinTest, TestIAccessibleHitTest) { |
| + AXNodeData root; |
| + root.id = 1; |
| + root.location = gfx::RectF(10, 40, 800, 600); |
|
dmazzoni
2017/06/23 18:51:12
Can you make this unit test work with more than on
dougt
2017/06/25 21:16:32
Done.
|
| + root.AddStringAttribute(AX_ATTR_NAME, "Name"); |
| + Init(root); |
| + |
| + ScopedComPtr<IAccessible> root_obj(GetRootIAccessible()); |
| + |
| + ScopedVariant obj; |
| + EXPECT_EQ(S_FALSE, root_obj->accHitTest(0, 0, obj.Receive())); |
| + EXPECT_EQ(VT_EMPTY, obj.type()); |
| + |
| + EXPECT_EQ(S_OK, root_obj->accHitTest(11, 41, obj.Receive())); |
| + // This is expected to return a id, not a dispatch. |
|
dmazzoni
2017/06/23 18:51:12
Shouldn't it return a dispatch if it's anything ot
dougt
2017/06/25 21:16:32
Done.
This was because our hit test testing code
|
| + EXPECT_EQ(VT_I4, obj.type()); |
| +} |
| + |
| TEST_F(AXPlatformNodeWinTest, TestIAccessibleName) { |
| AXNodeData root; |
| root.id = 1; |