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

Side by Side Diff: components/test_runner/web_ax_object_proxy.cc

Issue 2666873005: Implement aria-modal (Closed)
Patch Set: Created 3 years, 10 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 "components/test_runner/web_ax_object_proxy.h" 5 #include "components/test_runner/web_ax_object_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 .SetProperty("selectionStartLineNumber", 592 .SetProperty("selectionStartLineNumber",
593 &WebAXObjectProxy::SelectionStartLineNumber) 593 &WebAXObjectProxy::SelectionStartLineNumber)
594 .SetProperty("selectionEndLineNumber", 594 .SetProperty("selectionEndLineNumber",
595 &WebAXObjectProxy::SelectionEndLineNumber) 595 &WebAXObjectProxy::SelectionEndLineNumber)
596 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) 596 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled)
597 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) 597 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired)
598 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable) 598 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable)
599 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) 599 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable)
600 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) 600 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused)
601 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) 601 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable)
602 .SetProperty("isModal", &WebAXObjectProxy::IsModal)
602 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) 603 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected)
603 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) 604 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable)
604 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) 605 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable)
605 .SetProperty("isSelectedOptionActive", 606 .SetProperty("isSelectedOptionActive",
606 &WebAXObjectProxy::IsSelectedOptionActive) 607 &WebAXObjectProxy::IsSelectedOptionActive)
607 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) 608 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded)
608 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) 609 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked)
609 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible) 610 .SetProperty("isVisible", &WebAXObjectProxy::IsVisible)
610 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen) 611 .SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen)
611 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed) 612 .SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed)
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 bool WebAXObjectProxy::IsFocused() { 971 bool WebAXObjectProxy::IsFocused() {
971 accessibility_object_.updateLayoutAndCheckValidity(); 972 accessibility_object_.updateLayoutAndCheckValidity();
972 return accessibility_object_.isFocused(); 973 return accessibility_object_.isFocused();
973 } 974 }
974 975
975 bool WebAXObjectProxy::IsFocusable() { 976 bool WebAXObjectProxy::IsFocusable() {
976 accessibility_object_.updateLayoutAndCheckValidity(); 977 accessibility_object_.updateLayoutAndCheckValidity();
977 return accessibility_object_.canSetFocusAttribute(); 978 return accessibility_object_.canSetFocusAttribute();
978 } 979 }
979 980
981 bool WebAXObjectProxy::IsModal() {
982 accessibility_object_.updateLayoutAndCheckValidity();
983 return accessibility_object_.isModal();
984 }
985
980 bool WebAXObjectProxy::IsSelected() { 986 bool WebAXObjectProxy::IsSelected() {
981 accessibility_object_.updateLayoutAndCheckValidity(); 987 accessibility_object_.updateLayoutAndCheckValidity();
982 return accessibility_object_.isSelected(); 988 return accessibility_object_.isSelected();
983 } 989 }
984 990
985 bool WebAXObjectProxy::IsSelectable() { 991 bool WebAXObjectProxy::IsSelectable() {
986 accessibility_object_.updateLayoutAndCheckValidity(); 992 accessibility_object_.updateLayoutAndCheckValidity();
987 return accessibility_object_.canSetSelectedAttribute(); 993 return accessibility_object_.canSetSelectedAttribute();
988 } 994 }
989 995
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 v8::Local<v8::Value> value_handle = gin::CreateHandle( 1758 v8::Local<v8::Value> value_handle = gin::CreateHandle(
1753 isolate, new WebAXObjectProxy(object, this)).ToV8(); 1759 isolate, new WebAXObjectProxy(object, this)).ToV8();
1754 if (value_handle.IsEmpty()) 1760 if (value_handle.IsEmpty())
1755 return v8::Local<v8::Object>(); 1761 return v8::Local<v8::Object>();
1756 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); 1762 v8::Local<v8::Object> handle = value_handle->ToObject(isolate);
1757 elements_.Append(handle); 1763 elements_.Append(handle);
1758 return handle; 1764 return handle;
1759 } 1765 }
1760 1766
1761 } // namespace test_runner 1767 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_ax_object_proxy.h ('k') | third_party/WebKit/LayoutTests/accessibility/aria-modal.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698