| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/accessibility/platform/ax_platform_node.h" | 5 #include "ui/accessibility/platform/ax_platform_node.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <oleacc.h> | 9 #include <oleacc.h> |
| 10 | 10 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 ASSERT_EQ(E_INVALIDARG, child_iaccessible->get_accRole(SELF, nullptr)); | 225 ASSERT_EQ(E_INVALIDARG, child_iaccessible->get_accRole(SELF, nullptr)); |
| 226 ScopedVariant bad_id(999); | 226 ScopedVariant bad_id(999); |
| 227 ASSERT_EQ(E_INVALIDARG, child_iaccessible->get_accRole( | 227 ASSERT_EQ(E_INVALIDARG, child_iaccessible->get_accRole( |
| 228 bad_id, role.Receive())); | 228 bad_id, role.Receive())); |
| 229 } | 229 } |
| 230 | 230 |
| 231 TEST_F(AXPlatformNodeWinTest, TestIAccessibleLocation) { | 231 TEST_F(AXPlatformNodeWinTest, TestIAccessibleLocation) { |
| 232 AXNodeData root; | 232 AXNodeData root; |
| 233 root.id = 1; | 233 root.id = 1; |
| 234 root.location = gfx::Rect(10, 40, 800, 600); | 234 root.location = gfx::RectF(10, 40, 800, 600); |
| 235 Init(root); | 235 Init(root); |
| 236 | 236 |
| 237 TestAXNodeWrapper::SetGlobalCoordinateOffset(gfx::Vector2d(100, 200)); | 237 TestAXNodeWrapper::SetGlobalCoordinateOffset(gfx::Vector2d(100, 200)); |
| 238 | 238 |
| 239 LONG x_left, y_top, width, height; | 239 LONG x_left, y_top, width, height; |
| 240 ASSERT_EQ(S_OK, GetRootIAccessible()->accLocation( | 240 ASSERT_EQ(S_OK, GetRootIAccessible()->accLocation( |
| 241 &x_left, &y_top, &width, &height, SELF)); | 241 &x_left, &y_top, &width, &height, SELF)); |
| 242 EXPECT_EQ(110, x_left); | 242 EXPECT_EQ(110, x_left); |
| 243 EXPECT_EQ(240, y_top); | 243 EXPECT_EQ(240, y_top); |
| 244 EXPECT_EQ(800, width); | 244 EXPECT_EQ(800, width); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 ASSERT_EQ(E_FAIL, root_iaccessible2->get_indexInParent(&index)); | 392 ASSERT_EQ(E_FAIL, root_iaccessible2->get_indexInParent(&index)); |
| 393 | 393 |
| 394 ASSERT_EQ(S_OK, left_iaccessible2->get_indexInParent(&index)); | 394 ASSERT_EQ(S_OK, left_iaccessible2->get_indexInParent(&index)); |
| 395 EXPECT_EQ(0, index); | 395 EXPECT_EQ(0, index); |
| 396 | 396 |
| 397 ASSERT_EQ(S_OK, right_iaccessible2->get_indexInParent(&index)); | 397 ASSERT_EQ(S_OK, right_iaccessible2->get_indexInParent(&index)); |
| 398 EXPECT_EQ(1, index); | 398 EXPECT_EQ(1, index); |
| 399 } | 399 } |
| 400 | 400 |
| 401 } // namespace ui | 401 } // namespace ui |
| OLD | NEW |