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

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

Issue 1063383005: Chromium side Implementation to expose aria properties - setsize & posinset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updating expectations on android Created 5 years, 8 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
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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 &WebAXObjectProxy::IsSelectedOptionActive) 506 &WebAXObjectProxy::IsSelectedOptionActive)
507 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) 507 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded)
508 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) 508 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked)
509 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible) 509 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible)
510 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen) 510 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen)
511 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) 511 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed)
512 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup) 512 .SetProperty("hasPopup", &WebAXObjectProxy::HasPopup)
513 .SetProperty("isValid", &WebAXObjectProxy::IsValid) 513 .SetProperty("isValid", &WebAXObjectProxy::IsValid)
514 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly) 514 .SetProperty("isReadOnly", &WebAXObjectProxy::IsReadOnly)
515 .SetProperty("orientation", &WebAXObjectProxy::Orientation) 515 .SetProperty("orientation", &WebAXObjectProxy::Orientation)
516 .SetProperty("posInSet", &WebAXObjectProxy::PosInSet)
517 .SetProperty("setSize", &WebAXObjectProxy::SetSize)
516 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX) 518 .SetProperty("clickPointX", &WebAXObjectProxy::ClickPointX)
517 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY) 519 .SetProperty("clickPointY", &WebAXObjectProxy::ClickPointY)
518 .SetProperty("rowCount", &WebAXObjectProxy::RowCount) 520 .SetProperty("rowCount", &WebAXObjectProxy::RowCount)
519 .SetProperty("rowHeadersCount", &WebAXObjectProxy::RowHeadersCount) 521 .SetProperty("rowHeadersCount", &WebAXObjectProxy::RowHeadersCount)
520 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount) 522 .SetProperty("columnCount", &WebAXObjectProxy::ColumnCount)
521 .SetProperty("columnHeadersCount", &WebAXObjectProxy::ColumnHeadersCount) 523 .SetProperty("columnHeadersCount", &WebAXObjectProxy::ColumnHeadersCount)
522 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable) 524 .SetProperty("isClickable", &WebAXObjectProxy::IsClickable)
523 .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed) 525 .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed)
524 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes) 526 .SetMethod("allAttributes", &WebAXObjectProxy::AllAttributes)
525 .SetMethod("attributesOfChildren", 527 .SetMethod("attributesOfChildren",
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 accessibility_object_.updateLayoutAndCheckValidity(); 848 accessibility_object_.updateLayoutAndCheckValidity();
847 if (accessibility_object_.orientation() == blink::WebAXOrientationVertical) 849 if (accessibility_object_.orientation() == blink::WebAXOrientationVertical)
848 return "AXOrientation: AXVerticalOrientation"; 850 return "AXOrientation: AXVerticalOrientation";
849 else if (accessibility_object_.orientation() 851 else if (accessibility_object_.orientation()
850 == blink::WebAXOrientationHorizontal) 852 == blink::WebAXOrientationHorizontal)
851 return "AXOrientation: AXHorizontalOrientation"; 853 return "AXOrientation: AXHorizontalOrientation";
852 854
853 return std::string(); 855 return std::string();
854 } 856 }
855 857
858 int WebAXObjectProxy::PosInSet() {
859 accessibility_object_.updateLayoutAndCheckValidity();
860 return accessibility_object_.posInSet();
861 }
862
863 int WebAXObjectProxy::SetSize() {
864 accessibility_object_.updateLayoutAndCheckValidity();
865 return accessibility_object_.setSize();
866 }
867
856 int WebAXObjectProxy::ClickPointX() { 868 int WebAXObjectProxy::ClickPointX() {
857 accessibility_object_.updateLayoutAndCheckValidity(); 869 accessibility_object_.updateLayoutAndCheckValidity();
858 return accessibility_object_.clickPoint().x; 870 return accessibility_object_.clickPoint().x;
859 } 871 }
860 872
861 int WebAXObjectProxy::ClickPointY() { 873 int WebAXObjectProxy::ClickPointY() {
862 accessibility_object_.updateLayoutAndCheckValidity(); 874 accessibility_object_.updateLayoutAndCheckValidity();
863 return accessibility_object_.clickPoint().y; 875 return accessibility_object_.clickPoint().y;
864 } 876 }
865 877
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 v8::Handle<v8::Value> value_handle = gin::CreateHandle( 1301 v8::Handle<v8::Value> value_handle = gin::CreateHandle(
1290 isolate, new WebAXObjectProxy(object, this)).ToV8(); 1302 isolate, new WebAXObjectProxy(object, this)).ToV8();
1291 if (value_handle.IsEmpty()) 1303 if (value_handle.IsEmpty())
1292 return v8::Handle<v8::Object>(); 1304 return v8::Handle<v8::Object>();
1293 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); 1305 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate);
1294 elements_.Append(handle); 1306 elements_.Append(handle);
1295 return handle; 1307 return handle;
1296 } 1308 }
1297 1309
1298 } // namespace content 1310 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/web_ax_object_proxy.h ('k') | content/test/data/accessibility/aria/aria-posinset.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698