Index: content/shell/renderer/test_runner/web_ax_object_proxy.cc |
diff --git a/content/shell/renderer/test_runner/web_ax_object_proxy.cc b/content/shell/renderer/test_runner/web_ax_object_proxy.cc |
index a915490a6d422ee7f2f092d28718f68260f51eec..2f12d70fd9ffeb6ff41432f45e2ca35248095cf5 100644 |
--- a/content/shell/renderer/test_runner/web_ax_object_proxy.cc |
+++ b/content/shell/renderer/test_runner/web_ax_object_proxy.cc |
@@ -515,6 +515,12 @@ WebAXObjectProxy::GetObjectTemplateBuilder(v8::Isolate* isolate) { |
.SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes) |
.SetMethod("attributesOfChildren", |
&WebAXObjectProxy::AttributesOfChildren) |
+ .SetMethod("ariaControlsElementAtIndex", |
+ &WebAXObjectProxy::AriaControlsElementAtIndex) |
+ .SetMethod("ariaFlowToElementAtIndex", |
+ &WebAXObjectProxy::AriaFlowToElementAtIndex) |
+ .SetMethod("ariaOwnsElementAtIndex", |
+ &WebAXObjectProxy::AriaOwnsElementAtIndex) |
.SetMethod("lineForIndex", &WebAXObjectProxy::LineForIndex) |
.SetMethod("boundsForRange", &WebAXObjectProxy::BoundsForRange) |
.SetMethod("childAtIndex", &WebAXObjectProxy::ChildAtIndex) |
@@ -818,6 +824,44 @@ bool WebAXObjectProxy::IsButtonStateMixed() { |
return accessibility_object_.isButtonStateMixed(); |
} |
+v8::Handle<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex( |
+ unsigned index) |
+{ |
+ accessibility_object_.updateLayoutAndCheckValidity(); |
+ blink::WebVector<blink::WebAXObject> elements; |
+ accessibility_object_.ariaControls(elements); |
+ size_t elementCount = elements.size(); |
+ if (index >= elementCount) |
+ return v8::Handle<v8::Object>(); |
+ |
+ return factory_->GetOrCreate(elements[index]); |
+} |
+ |
+v8::Handle<v8::Object> WebAXObjectProxy::AriaFlowToElementAtIndex( |
+ unsigned index) |
+{ |
+ accessibility_object_.updateLayoutAndCheckValidity(); |
+ blink::WebVector<blink::WebAXObject> elements; |
+ accessibility_object_.ariaFlowTo(elements); |
+ size_t elementCount = elements.size(); |
+ if (index >= elementCount) |
+ return v8::Handle<v8::Object>(); |
+ |
+ return factory_->GetOrCreate(elements[index]); |
+} |
+ |
+v8::Handle<v8::Object> WebAXObjectProxy::AriaOwnsElementAtIndex(unsigned index) |
+{ |
+ accessibility_object_.updateLayoutAndCheckValidity(); |
+ blink::WebVector<blink::WebAXObject> elements; |
+ accessibility_object_.ariaOwns(elements); |
+ size_t elementCount = elements.size(); |
+ if (index >= elementCount) |
+ return v8::Handle<v8::Object>(); |
+ |
+ return factory_->GetOrCreate(elements[index]); |
+} |
+ |
std::string WebAXObjectProxy::AllAttributes() { |
accessibility_object_.updateLayoutAndCheckValidity(); |
return GetAttributes(accessibility_object_); |