| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 button_.role = AX_ROLE_BUTTON; | 123 button_.role = AX_ROLE_BUTTON; |
| 124 button_.state = 1 << AX_STATE_HASPOPUP; | 124 button_.state = 1 << AX_STATE_HASPOPUP; |
| 125 button_.SetName("Button"); | 125 button_.SetName("Button"); |
| 126 button_.location = gfx::RectF(20, 20, 200, 30); | 126 button_.location = gfx::RectF(20, 20, 200, 30); |
| 127 button_.AddIntListAttribute(AX_ATTR_WORD_STARTS, std::vector<int32_t>{0}); | 127 button_.AddIntListAttribute(AX_ATTR_WORD_STARTS, std::vector<int32_t>{0}); |
| 128 button_.AddIntListAttribute(AX_ATTR_WORD_ENDS, std::vector<int32_t>{6}); | 128 button_.AddIntListAttribute(AX_ATTR_WORD_ENDS, std::vector<int32_t>{6}); |
| 129 button_.AddIntAttribute(AX_ATTR_NEXT_ON_LINE_ID, check_box_.id); | 129 button_.AddIntAttribute(AX_ATTR_NEXT_ON_LINE_ID, check_box_.id); |
| 130 root_.child_ids.push_back(button_.id); | 130 root_.child_ids.push_back(button_.id); |
| 131 | 131 |
| 132 check_box_.role = AX_ROLE_CHECK_BOX; | 132 check_box_.role = AX_ROLE_CHECK_BOX; |
| 133 check_box_.state = 1 << AX_STATE_CHECKED; | 133 check_box_.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, |
| 134 ui::AX_CHECKED_STATE_TRUE); |
| 134 check_box_.SetName("Check box"); | 135 check_box_.SetName("Check box"); |
| 135 check_box_.location = gfx::RectF(20, 50, 200, 30); | 136 check_box_.location = gfx::RectF(20, 50, 200, 30); |
| 136 check_box_.AddIntListAttribute(AX_ATTR_WORD_STARTS, | 137 check_box_.AddIntListAttribute(AX_ATTR_WORD_STARTS, |
| 137 std::vector<int32_t>{0, 6}); | 138 std::vector<int32_t>{0, 6}); |
| 138 check_box_.AddIntListAttribute(AX_ATTR_WORD_ENDS, std::vector<int32_t>{5, 9}); | 139 check_box_.AddIntListAttribute(AX_ATTR_WORD_ENDS, std::vector<int32_t>{5, 9}); |
| 139 check_box_.AddIntAttribute(AX_ATTR_PREVIOUS_ON_LINE_ID, button_.id); | 140 check_box_.AddIntAttribute(AX_ATTR_PREVIOUS_ON_LINE_ID, button_.id); |
| 140 root_.child_ids.push_back(check_box_.id); | 141 root_.child_ids.push_back(check_box_.id); |
| 141 | 142 |
| 142 text_field_.role = AX_ROLE_TEXT_FIELD; | 143 text_field_.role = AX_ROLE_TEXT_FIELD; |
| 143 text_field_.state = 1 << AX_STATE_EDITABLE; | 144 text_field_.state = 1 << AX_STATE_EDITABLE; |
| (...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 AX_TEXT_AFFINITY_DOWNSTREAM); | 1931 AX_TEXT_AFFINITY_DOWNSTREAM); |
| 1931 AXRange<AXPosition<AXNodePosition, AXNode>> forward_range(start->Clone(), | 1932 AXRange<AXPosition<AXNodePosition, AXNode>> forward_range(start->Clone(), |
| 1932 end->Clone()); | 1933 end->Clone()); |
| 1933 EXPECT_EQ(most_text, forward_range.GetText()); | 1934 EXPECT_EQ(most_text, forward_range.GetText()); |
| 1934 AXRange<AXPosition<AXNodePosition, AXNode>> backward_range(std::move(end), | 1935 AXRange<AXPosition<AXNodePosition, AXNode>> backward_range(std::move(end), |
| 1935 std::move(start)); | 1936 std::move(start)); |
| 1936 EXPECT_EQ(most_text, backward_range.GetText()); | 1937 EXPECT_EQ(most_text, backward_range.GetText()); |
| 1937 } | 1938 } |
| 1938 | 1939 |
| 1939 } // namespace ui | 1940 } // namespace ui |
| OLD | NEW |