| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 root.role = ui::AX_ROLE_ROOT_WEB_AREA; | 337 root.role = ui::AX_ROLE_ROOT_WEB_AREA; |
| 338 root.child_ids.push_back(2); | 338 root.child_ids.push_back(2); |
| 339 | 339 |
| 340 ui::AXNodeData text_field; | 340 ui::AXNodeData text_field; |
| 341 text_field.id = 2; | 341 text_field.id = 2; |
| 342 text_field.role = ui::AX_ROLE_TEXT_FIELD; | 342 text_field.role = ui::AX_ROLE_TEXT_FIELD; |
| 343 text_field.state = 1 << ui::AX_STATE_EDITABLE; | 343 text_field.state = 1 << ui::AX_STATE_EDITABLE; |
| 344 text_field.SetValue(text_value); | 344 text_field.SetValue(text_value); |
| 345 std::vector<int32_t> line_start_offsets; | 345 std::vector<int32_t> line_start_offsets; |
| 346 line_start_offsets.push_back(15); | 346 line_start_offsets.push_back(15); |
| 347 text_field.AddIntListAttribute( | 347 text_field.AddIntListAttribute(ui::AX_ATTR_CACHED_LINE_STARTS, |
| 348 ui::AX_ATTR_LINE_BREAKS, line_start_offsets); | 348 line_start_offsets); |
| 349 text_field.child_ids.push_back(3); | 349 text_field.child_ids.push_back(3); |
| 350 text_field.child_ids.push_back(5); | 350 text_field.child_ids.push_back(5); |
| 351 text_field.child_ids.push_back(6); | 351 text_field.child_ids.push_back(6); |
| 352 | 352 |
| 353 ui::AXNodeData static_text1; | 353 ui::AXNodeData static_text1; |
| 354 static_text1.id = 3; | 354 static_text1.id = 3; |
| 355 static_text1.role = ui::AX_ROLE_STATIC_TEXT; | 355 static_text1.role = ui::AX_ROLE_STATIC_TEXT; |
| 356 static_text1.state = 1 << ui::AX_STATE_EDITABLE; | 356 static_text1.state = 1 << ui::AX_STATE_EDITABLE; |
| 357 static_text1.SetName(line1); | 357 static_text1.SetName(line1); |
| 358 static_text1.child_ids.push_back(4); | 358 static_text1.child_ids.push_back(4); |
| (...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 std::vector<AXEventNotificationDetails> events = {event}; | 2462 std::vector<AXEventNotificationDetails> events = {event}; |
| 2463 manager->OnAccessibilityEvents(events); | 2463 manager->OnAccessibilityEvents(events); |
| 2464 | 2464 |
| 2465 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations)); | 2465 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations)); |
| 2466 EXPECT_EQ(2, n_relations); | 2466 EXPECT_EQ(2, n_relations); |
| 2467 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations)); | 2467 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations)); |
| 2468 EXPECT_EQ(2, n_relations); | 2468 EXPECT_EQ(2, n_relations); |
| 2469 } | 2469 } |
| 2470 | 2470 |
| 2471 } // namespace content | 2471 } // namespace content |
| OLD | NEW |