| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 button_.AddState(AX_STATE_HASPOPUP); | 124 button_.AddState(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_.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, | 133 check_box_.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, |
| 134 ui::AX_CHECKED_STATE_TRUE); | 134 ui::AX_BUTTON_STATE_TRUE); |
| 135 check_box_.SetName("Check box"); | 135 check_box_.SetName("Check box"); |
| 136 check_box_.location = gfx::RectF(20, 50, 200, 30); | 136 check_box_.location = gfx::RectF(20, 50, 200, 30); |
| 137 check_box_.AddIntListAttribute(AX_ATTR_WORD_STARTS, | 137 check_box_.AddIntListAttribute(AX_ATTR_WORD_STARTS, |
| 138 std::vector<int32_t>{0, 6}); | 138 std::vector<int32_t>{0, 6}); |
| 139 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}); |
| 140 check_box_.AddIntAttribute(AX_ATTR_PREVIOUS_ON_LINE_ID, button_.id); | 140 check_box_.AddIntAttribute(AX_ATTR_PREVIOUS_ON_LINE_ID, button_.id); |
| 141 root_.child_ids.push_back(check_box_.id); | 141 root_.child_ids.push_back(check_box_.id); |
| 142 | 142 |
| 143 text_field_.role = AX_ROLE_TEXT_FIELD; | 143 text_field_.role = AX_ROLE_TEXT_FIELD; |
| 144 text_field_.AddState(AX_STATE_EDITABLE); | 144 text_field_.AddState(AX_STATE_EDITABLE); |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 AX_TEXT_AFFINITY_DOWNSTREAM); | 2005 AX_TEXT_AFFINITY_DOWNSTREAM); |
| 2006 AXRange<AXPosition<AXNodePosition, AXNode>> forward_range(start->Clone(), | 2006 AXRange<AXPosition<AXNodePosition, AXNode>> forward_range(start->Clone(), |
| 2007 end->Clone()); | 2007 end->Clone()); |
| 2008 EXPECT_EQ(most_text, forward_range.GetText()); | 2008 EXPECT_EQ(most_text, forward_range.GetText()); |
| 2009 AXRange<AXPosition<AXNodePosition, AXNode>> backward_range(std::move(end), | 2009 AXRange<AXPosition<AXNodePosition, AXNode>> backward_range(std::move(end), |
| 2010 std::move(start)); | 2010 std::move(start)); |
| 2011 EXPECT_EQ(most_text, backward_range.GetText()); | 2011 EXPECT_EQ(most_text, backward_range.GetText()); |
| 2012 } | 2012 } |
| 2013 | 2013 |
| 2014 } // namespace ui | 2014 } // namespace ui |
| OLD | NEW |