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

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

Issue 1308153012: Uses isEditable and isRichlyEditable to determine which attributes to expose on Mac and how to repr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test by adding EDITABLE role manually. Created 5 years, 3 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 "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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 .SetProperty("selectionFocusOffset", 501 .SetProperty("selectionFocusOffset",
502 &WebAXObjectProxy::SelectionFocusOffset) 502 &WebAXObjectProxy::SelectionFocusOffset)
503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart) 503 .SetProperty("selectionStart", &WebAXObjectProxy::SelectionStart)
504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd) 504 .SetProperty("selectionEnd", &WebAXObjectProxy::SelectionEnd)
505 .SetProperty("selectionStartLineNumber", 505 .SetProperty("selectionStartLineNumber",
506 &WebAXObjectProxy::SelectionStartLineNumber) 506 &WebAXObjectProxy::SelectionStartLineNumber)
507 .SetProperty("selectionEndLineNumber", 507 .SetProperty("selectionEndLineNumber",
508 &WebAXObjectProxy::SelectionEndLineNumber) 508 &WebAXObjectProxy::SelectionEndLineNumber)
509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled) 509 .SetProperty("isEnabled", &WebAXObjectProxy::IsEnabled)
510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired) 510 .SetProperty("isRequired", &WebAXObjectProxy::IsRequired)
511 .SetProperty("isEditable", &WebAXObjectProxy::IsEditable)
511 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable) 512 .SetProperty("isRichlyEditable", &WebAXObjectProxy::IsRichlyEditable)
512 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused) 513 .SetProperty("isFocused", &WebAXObjectProxy::IsFocused)
513 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable) 514 .SetProperty("isFocusable", &WebAXObjectProxy::IsFocusable)
514 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected) 515 .SetProperty("isSelected", &WebAXObjectProxy::IsSelected)
515 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable) 516 .SetProperty("isSelectable", &WebAXObjectProxy::IsSelectable)
516 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable) 517 .SetProperty("isMultiSelectable", &WebAXObjectProxy::IsMultiSelectable)
517 .SetProperty("isSelectedOptionActive", 518 .SetProperty("isSelectedOptionActive",
518 &WebAXObjectProxy::IsSelectedOptionActive) 519 &WebAXObjectProxy::IsSelectedOptionActive)
519 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded) 520 .SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded)
520 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked) 521 .SetProperty("isChecked", &WebAXObjectProxy::IsChecked)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 bool WebAXObjectProxy::IsEnabled() { 828 bool WebAXObjectProxy::IsEnabled() {
828 accessibility_object_.updateLayoutAndCheckValidity(); 829 accessibility_object_.updateLayoutAndCheckValidity();
829 return accessibility_object_.isEnabled(); 830 return accessibility_object_.isEnabled();
830 } 831 }
831 832
832 bool WebAXObjectProxy::IsRequired() { 833 bool WebAXObjectProxy::IsRequired() {
833 accessibility_object_.updateLayoutAndCheckValidity(); 834 accessibility_object_.updateLayoutAndCheckValidity();
834 return accessibility_object_.isRequired(); 835 return accessibility_object_.isRequired();
835 } 836 }
836 837
838 bool WebAXObjectProxy::IsEditable() {
839 accessibility_object_.updateLayoutAndCheckValidity();
840 return accessibility_object_.isEditable();
841 }
842
837 bool WebAXObjectProxy::IsRichlyEditable() { 843 bool WebAXObjectProxy::IsRichlyEditable() {
838 accessibility_object_.updateLayoutAndCheckValidity(); 844 accessibility_object_.updateLayoutAndCheckValidity();
839 return accessibility_object_.isRichlyEditable(); 845 return accessibility_object_.isRichlyEditable();
840 } 846 }
841 847
842 bool WebAXObjectProxy::IsFocused() { 848 bool WebAXObjectProxy::IsFocused() {
843 accessibility_object_.updateLayoutAndCheckValidity(); 849 accessibility_object_.updateLayoutAndCheckValidity();
844 return accessibility_object_.isFocused(); 850 return accessibility_object_.isFocused();
845 } 851 }
846 852
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 v8::Local<v8::Value> value_handle = gin::CreateHandle( 1452 v8::Local<v8::Value> value_handle = gin::CreateHandle(
1447 isolate, new WebAXObjectProxy(object, this)).ToV8(); 1453 isolate, new WebAXObjectProxy(object, this)).ToV8();
1448 if (value_handle.IsEmpty()) 1454 if (value_handle.IsEmpty())
1449 return v8::Local<v8::Object>(); 1455 return v8::Local<v8::Object>();
1450 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); 1456 v8::Local<v8::Object> handle = value_handle->ToObject(isolate);
1451 elements_.Append(handle); 1457 elements_.Append(handle);
1452 return handle; 1458 return handle;
1453 } 1459 }
1454 1460
1455 } // namespace test_runner 1461 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_ax_object_proxy.h ('k') | content/browser/accessibility/accessibility_win_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698