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 ec01d82bb5fef41a2482cce82c1c62f95b008115..a11904c046a6c3e01e3c0e44422edabcf3251a96 100644 |
--- a/content/shell/renderer/test_runner/web_ax_object_proxy.cc |
+++ b/content/shell/renderer/test_runner/web_ax_object_proxy.cc |
@@ -518,6 +518,8 @@ WebAXObjectProxy::GetObjectTemplateBuilder(v8::Isolate* isolate) { |
.SetMethod("childAtIndex", &WebAXObjectProxy::ChildAtIndex) |
.SetMethod("elementAtPoint", &WebAXObjectProxy::ElementAtPoint) |
.SetMethod("tableHeader", &WebAXObjectProxy::TableHeader) |
+ .SetMethod("rowHeaderAtIndex", &WebAXObjectProxy::RowHeaderAtIndex) |
+ .SetMethod("columnHeaderAtIndex", &WebAXObjectProxy::ColumnHeaderAtIndex) |
.SetMethod("rowIndexRange", &WebAXObjectProxy::RowIndexRange) |
.SetMethod("columnIndexRange", &WebAXObjectProxy::ColumnIndexRange) |
.SetMethod("cellForColumnAndRow", &WebAXObjectProxy::CellForColumnAndRow) |
@@ -890,6 +892,28 @@ v8::Handle<v8::Object> WebAXObjectProxy::TableHeader() { |
return factory_->GetOrCreate(obj); |
} |
+v8::Handle<v8::Object> WebAXObjectProxy::RowHeaderAtIndex(unsigned index) { |
+ accessibility_object_.updateLayoutAndCheckValidity(); |
+ blink::WebVector<blink::WebAXObject> headers; |
+ accessibility_object_.rowHeaders(headers); |
+ size_t headerCount = headers.size(); |
+ if (index >= headerCount) |
+ return v8::Handle<v8::Object>(); |
+ |
+ return factory_->GetOrCreate(headers[index]); |
+} |
+ |
+v8::Handle<v8::Object> WebAXObjectProxy::ColumnHeaderAtIndex(unsigned index) { |
+ accessibility_object_.updateLayoutAndCheckValidity(); |
+ blink::WebVector<blink::WebAXObject> headers; |
+ accessibility_object_.columnHeaders(headers); |
+ size_t headerCount = headers.size(); |
+ if (index >= headerCount) |
+ return v8::Handle<v8::Object>(); |
+ |
+ return factory_->GetOrCreate(headers[index]); |
+} |
+ |
std::string WebAXObjectProxy::RowIndexRange() { |
accessibility_object_.updateLayoutAndCheckValidity(); |
unsigned row_index = accessibility_object_.cellRowIndex(); |