| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/test_runner/web_ax_object_proxy.h" | 5 #include "content/shell/test_runner/web_ax_object_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 .SetProperty("selectionFocusOffset", | 582 .SetProperty("selectionFocusOffset", |
| 583 &WebAXObjectProxy::SelectionFocusOffset) | 583 &WebAXObjectProxy::SelectionFocusOffset) |
| 584 .SetProperty("selectionFocusAffinity", | 584 .SetProperty("selectionFocusAffinity", |
| 585 &WebAXObjectProxy::SelectionFocusAffinity) | 585 &WebAXObjectProxy::SelectionFocusAffinity) |
| 586 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) | 586 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) |
| 587 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) | 587 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) |
| 588 .SetProperty("selectionStartLineNumber", | 588 .SetProperty("selectionStartLineNumber", |
| 589 &WebAXObjectProxy::SelectionStartLineNumber) | 589 &WebAXObjectProxy::SelectionStartLineNumber) |
| 590 .SetProperty("selectionEndLineNumber", | 590 .SetProperty("selectionEndLineNumber", |
| 591 &WebAXObjectProxy::SelectionEndLineNumber) | 591 &WebAXObjectProxy::SelectionEndLineNumber) |
| 592 .SetProperty("isAtomic", &WebAXObjectProxy::IsAtomic) |
| 593 .SetProperty("isBusy", &WebAXObjectProxy::IsBusy) |
| 592 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) | 594 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) |
| 593 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) | 595 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) |
| 594 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable) | 596 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable) |
| 595 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) | 597 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) |
| 596 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) | 598 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) |
| 597 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) | 599 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) |
| 598 .SetProperty("isModal", &WebAXObjectProxy::IsModal) | 600 .SetProperty("isModal", &WebAXObjectProxy::IsModal) |
| 599 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) | 601 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) |
| 600 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) | 602 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) |
| 603 .SetProperty("isMultiLine", &WebAXObjectProxy::IsMultiLine) |
| 601 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) | 604 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) |
| 602 .SetProperty("isSelectedOptionActive", | 605 .SetProperty("isSelectedOptionActive", |
| 603 &WebAXObjectProxy::IsSelectedOptionActive) | 606 &WebAXObjectProxy::IsSelectedOptionActive) |
| 604 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) | 607 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) |
| 605 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) | 608 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) |
| 606 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible) | 609 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible) |
| 607 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen) | 610 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen) |
| 608 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) | 611 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) |
| 609 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) | 612 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) |
| 610 .SetProperty("isValid", &WebAXObjectProxy::IsValid) | 613 .SetProperty("isValid", &WebAXObjectProxy::IsValid) |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 int WebAXObjectProxy::SelectionStartLineNumber() { | 954 int WebAXObjectProxy::SelectionStartLineNumber() { |
| 952 accessibility_object_.UpdateLayoutAndCheckValidity(); | 955 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 953 return accessibility_object_.SelectionStartLineNumber(); | 956 return accessibility_object_.SelectionStartLineNumber(); |
| 954 } | 957 } |
| 955 | 958 |
| 956 int WebAXObjectProxy::SelectionEndLineNumber() { | 959 int WebAXObjectProxy::SelectionEndLineNumber() { |
| 957 accessibility_object_.UpdateLayoutAndCheckValidity(); | 960 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 958 return accessibility_object_.SelectionEndLineNumber(); | 961 return accessibility_object_.SelectionEndLineNumber(); |
| 959 } | 962 } |
| 960 | 963 |
| 964 bool WebAXObjectProxy::IsAtomic() { |
| 965 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 966 return accessibility_object_.LiveRegionAtomic(); |
| 967 } |
| 968 |
| 969 bool WebAXObjectProxy::IsBusy() { |
| 970 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 971 return accessibility_object_.LiveRegionBusy(); |
| 972 } |
| 973 |
| 961 bool WebAXObjectProxy::IsEnabled() { | 974 bool WebAXObjectProxy::IsEnabled() { |
| 962 accessibility_object_.UpdateLayoutAndCheckValidity(); | 975 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 963 return accessibility_object_.IsEnabled(); | 976 return accessibility_object_.IsEnabled(); |
| 964 } | 977 } |
| 965 | 978 |
| 966 bool WebAXObjectProxy::IsRequired() { | 979 bool WebAXObjectProxy::IsRequired() { |
| 967 accessibility_object_.UpdateLayoutAndCheckValidity(); | 980 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 968 return accessibility_object_.IsRequired(); | 981 return accessibility_object_.IsRequired(); |
| 969 } | 982 } |
| 970 | 983 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 996 bool WebAXObjectProxy::IsSelected() { | 1009 bool WebAXObjectProxy::IsSelected() { |
| 997 accessibility_object_.UpdateLayoutAndCheckValidity(); | 1010 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 998 return accessibility_object_.IsSelected(); | 1011 return accessibility_object_.IsSelected(); |
| 999 } | 1012 } |
| 1000 | 1013 |
| 1001 bool WebAXObjectProxy::IsSelectable() { | 1014 bool WebAXObjectProxy::IsSelectable() { |
| 1002 accessibility_object_.UpdateLayoutAndCheckValidity(); | 1015 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 1003 return accessibility_object_.CanSetSelectedAttribute(); | 1016 return accessibility_object_.CanSetSelectedAttribute(); |
| 1004 } | 1017 } |
| 1005 | 1018 |
| 1019 bool WebAXObjectProxy::IsMultiLine() { |
| 1020 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 1021 return accessibility_object_.IsMultiline(); |
| 1022 } |
| 1023 |
| 1006 bool WebAXObjectProxy::IsMultiSelectable() { | 1024 bool WebAXObjectProxy::IsMultiSelectable() { |
| 1007 accessibility_object_.UpdateLayoutAndCheckValidity(); | 1025 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 1008 return accessibility_object_.IsMultiSelectable(); | 1026 return accessibility_object_.IsMultiSelectable(); |
| 1009 } | 1027 } |
| 1010 | 1028 |
| 1011 bool WebAXObjectProxy::IsSelectedOptionActive() { | 1029 bool WebAXObjectProxy::IsSelectedOptionActive() { |
| 1012 accessibility_object_.UpdateLayoutAndCheckValidity(); | 1030 accessibility_object_.UpdateLayoutAndCheckValidity(); |
| 1013 return accessibility_object_.IsSelectedOptionActive(); | 1031 return accessibility_object_.IsSelectedOptionActive(); |
| 1014 } | 1032 } |
| 1015 | 1033 |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 v8::Local<v8::Value> value_handle = | 1874 v8::Local<v8::Value> value_handle = |
| 1857 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8(); | 1875 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8(); |
| 1858 if (value_handle.IsEmpty()) | 1876 if (value_handle.IsEmpty()) |
| 1859 return v8::Local<v8::Object>(); | 1877 return v8::Local<v8::Object>(); |
| 1860 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); | 1878 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); |
| 1861 elements_.Append(handle); | 1879 elements_.Append(handle); |
| 1862 return handle; | 1880 return handle; |
| 1863 } | 1881 } |
| 1864 | 1882 |
| 1865 } // namespace test_runner | 1883 } // namespace test_runner |
| OLD | NEW |