Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: content/shell/renderer/test_runner/web_ax_object_proxy.cc

Issue 805793006: Provides API for testing number of table headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/renderer/test_runner/web_ax_object_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer/test_runner/web_ax_object_proxy.h" 5 #include "content/shell/renderer/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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible) 502 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible)
503 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen) 503 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen)
504 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) 504 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed)
505 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) 505 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup)
506 .SetProperty("isValid", &WebAXObjectProxy::IsValid) 506 .SetProperty("isValid", &WebAXObjectProxy::IsValid)
507 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly) 507 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly)
508 .SetProperty("orientation", &WebAXObjectProxy::Orientation) 508 .SetProperty("orientation", &WebAXObjectProxy::Orientation)
509 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX) 509 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX)
510 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY) 510 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY)
511 .SetProperty("rowCount", &WebAXObjectProxy::RowCount) 511 .SetProperty("rowCount", &WebAXObjectProxy::RowCount)
512 .SetProperty("rowHeadersCount", &WebAXObjectProxy::RowHeadersCount)
512 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount) 513 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount)
514 .SetProperty("columnHeadersCount", &WebAXObjectProxy::ColumnHeadersCount)
513 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable) 515 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable)
514 .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed) 516 .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed)
515 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes) 517 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes)
516 .SetMethod("attributesOfChildren", 518 .SetMethod("attributesOfChildren",
517 &WebAXObjectProxy::AttributesOfChildren) 519 &WebAXObjectProxy::AttributesOfChildren)
518 .SetMethod("ariaControlsElementAtIndex", 520 .SetMethod("ariaControlsElementAtIndex",
519 &WebAXObjectProxy::AriaControlsElementAtIndex) 521 &WebAXObjectProxy::AriaControlsElementAtIndex)
520 .SetMethod("ariaFlowToElementAtIndex", 522 .SetMethod("ariaFlowToElementAtIndex",
521 &WebAXObjectProxy::AriaFlowToElementAtIndex) 523 &WebAXObjectProxy::AriaFlowToElementAtIndex)
522 .SetMethod("ariaOwnsElementAtIndex", 524 .SetMethod("ariaOwnsElementAtIndex",
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 int WebAXObjectProxy::ClickPointY() { 804 int WebAXObjectProxy::ClickPointY() {
803 accessibility_object_.updateLayoutAndCheckValidity(); 805 accessibility_object_.updateLayoutAndCheckValidity();
804 return accessibility_object_.clickPoint().y; 806 return accessibility_object_.clickPoint().y;
805 } 807 }
806 808
807 int32_t WebAXObjectProxy::RowCount() { 809 int32_t WebAXObjectProxy::RowCount() {
808 accessibility_object_.updateLayoutAndCheckValidity(); 810 accessibility_object_.updateLayoutAndCheckValidity();
809 return static_cast<int32_t>(accessibility_object_.rowCount()); 811 return static_cast<int32_t>(accessibility_object_.rowCount());
810 } 812 }
811 813
814 int32_t WebAXObjectProxy::RowHeadersCount() {
815 accessibility_object_.updateLayoutAndCheckValidity();
816 blink::WebVector<blink::WebAXObject> headers;
817 accessibility_object_.rowHeaders(headers);
818 return static_cast<int32_t>(headers.size());
819 }
820
812 int32_t WebAXObjectProxy::ColumnCount() { 821 int32_t WebAXObjectProxy::ColumnCount() {
813 accessibility_object_.updateLayoutAndCheckValidity(); 822 accessibility_object_.updateLayoutAndCheckValidity();
814 return static_cast<int32_t>(accessibility_object_.columnCount()); 823 return static_cast<int32_t>(accessibility_object_.columnCount());
815 } 824 }
816 825
826 int32_t WebAXObjectProxy::ColumnHeadersCount()
827 {
828 accessibility_object_.updateLayoutAndCheckValidity();
829 blink::WebVector<blink::WebAXObject> headers;
830 accessibility_object_.columnHeaders(headers);
831 return static_cast<int32_t>(headers.size());
832 }
833
817 bool WebAXObjectProxy::IsClickable() { 834 bool WebAXObjectProxy::IsClickable() {
818 accessibility_object_.updateLayoutAndCheckValidity(); 835 accessibility_object_.updateLayoutAndCheckValidity();
819 return accessibility_object_.isClickable(); 836 return accessibility_object_.isClickable();
820 } 837 }
821 838
822 bool WebAXObjectProxy::IsButtonStateMixed() { 839 bool WebAXObjectProxy::IsButtonStateMixed() {
823 accessibility_object_.updateLayoutAndCheckValidity(); 840 accessibility_object_.updateLayoutAndCheckValidity();
824 return accessibility_object_.isButtonStateMixed(); 841 return accessibility_object_.isButtonStateMixed();
825 } 842 }
826 843
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 v8::Handle<v8::Value> value_handle = gin::CreateHandle( 1200 v8::Handle<v8::Value> value_handle = gin::CreateHandle(
1184 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); 1201 isolate, new RootWebAXObjectProxy(object, this)).ToV8();
1185 if (value_handle.IsEmpty()) 1202 if (value_handle.IsEmpty())
1186 return v8::Handle<v8::Object>(); 1203 return v8::Handle<v8::Object>();
1187 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); 1204 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate);
1188 elements_.Append(handle); 1205 elements_.Append(handle);
1189 return handle; 1206 return handle;
1190 } 1207 }
1191 1208
1192 } // namespace content 1209 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/web_ax_object_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698