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 "components/test_runner/web_ax_object_proxy.h" | 5 #include "components/test_runner/web_ax_object_proxy.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "gin/handle.h" | 8 #include "gin/handle.h" |
9 #include "third_party/WebKit/public/platform/WebPoint.h" | 9 #include "third_party/WebKit/public/platform/WebPoint.h" |
10 #include "third_party/WebKit/public/platform/WebRect.h" | 10 #include "third_party/WebKit/public/platform/WebRect.h" |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 .SetProperty("selectionFocusOffset", | 501 .SetProperty("selectionFocusOffset", |
502 &WebAXObjectProxy::SelectionFocusOffset) | 502 &WebAXObjectProxy::SelectionFocusOffset) |
503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) | 503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) |
504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) | 504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) |
505 .SetProperty("selectionStartLineNumber", | 505 .SetProperty("selectionStartLineNumber", |
506 &WebAXObjectProxy::SelectionStartLineNumber) | 506 &WebAXObjectProxy::SelectionStartLineNumber) |
507 .SetProperty("selectionEndLineNumber", | 507 .SetProperty("selectionEndLineNumber", |
508 &WebAXObjectProxy::SelectionEndLineNumber) | 508 &WebAXObjectProxy::SelectionEndLineNumber) |
509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) | 509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) |
510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) | 510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) |
| 511 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable) |
511 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) | 512 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) |
512 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) | 513 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) |
513 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) | 514 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) |
514 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) | 515 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) |
515 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) | 516 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) |
516 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) | 517 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) |
517 .SetProperty("isSelectedOptionActive", | 518 .SetProperty("isSelectedOptionActive", |
518 &WebAXObjectProxy::IsSelectedOptionActive) | 519 &WebAXObjectProxy::IsSelectedOptionActive) |
519 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) | 520 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) |
520 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) | 521 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 bool WebAXObjectProxy::IsEnabled() { | 828 bool WebAXObjectProxy::IsEnabled() { |
828 accessibility_object_.updateLayoutAndCheckValidity(); | 829 accessibility_object_.updateLayoutAndCheckValidity(); |
829 return accessibility_object_.isEnabled(); | 830 return accessibility_object_.isEnabled(); |
830 } | 831 } |
831 | 832 |
832 bool WebAXObjectProxy::IsRequired() { | 833 bool WebAXObjectProxy::IsRequired() { |
833 accessibility_object_.updateLayoutAndCheckValidity(); | 834 accessibility_object_.updateLayoutAndCheckValidity(); |
834 return accessibility_object_.isRequired(); | 835 return accessibility_object_.isRequired(); |
835 } | 836 } |
836 | 837 |
| 838 bool WebAXObjectProxy::IsEditable() { |
| 839 accessibility_object_.updateLayoutAndCheckValidity(); |
| 840 return accessibility_object_.isEditable(); |
| 841 } |
| 842 |
837 bool WebAXObjectProxy::IsRichlyEditable() { | 843 bool WebAXObjectProxy::IsRichlyEditable() { |
838 accessibility_object_.updateLayoutAndCheckValidity(); | 844 accessibility_object_.updateLayoutAndCheckValidity(); |
839 return accessibility_object_.isRichlyEditable(); | 845 return accessibility_object_.isRichlyEditable(); |
840 } | 846 } |
841 | 847 |
842 bool WebAXObjectProxy::IsFocused() { | 848 bool WebAXObjectProxy::IsFocused() { |
843 accessibility_object_.updateLayoutAndCheckValidity(); | 849 accessibility_object_.updateLayoutAndCheckValidity(); |
844 return accessibility_object_.isFocused(); | 850 return accessibility_object_.isFocused(); |
845 } | 851 } |
846 | 852 |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 v8::Local<v8::Value> value_handle = gin::CreateHandle( | 1452 v8::Local<v8::Value> value_handle = gin::CreateHandle( |
1447 isolate, new WebAXObjectProxy(object, this)).ToV8(); | 1453 isolate, new WebAXObjectProxy(object, this)).ToV8(); |
1448 if (value_handle.IsEmpty()) | 1454 if (value_handle.IsEmpty()) |
1449 return v8::Local<v8::Object>(); | 1455 return v8::Local<v8::Object>(); |
1450 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); | 1456 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); |
1451 elements_.Append(handle); | 1457 elements_.Append(handle); |
1452 return handle; | 1458 return handle; |
1453 } | 1459 } |
1454 | 1460 |
1455 } // namespace test_runner | 1461 } // namespace test_runner |
OLD | NEW |