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

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

Issue 2833843005: Handling of different types of empty alt (Closed)
Patch Set: Ready to land Created 3 years, 7 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/test_runner/web_ax_object_proxy.h" 5 #include "content/shell/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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 std::string WebAXObjectProxy::NameFrom() { 1621 std::string WebAXObjectProxy::NameFrom() {
1622 accessibility_object_.UpdateLayoutAndCheckValidity(); 1622 accessibility_object_.UpdateLayoutAndCheckValidity();
1623 blink::WebAXNameFrom nameFrom = blink::kWebAXNameFromUninitialized; 1623 blink::WebAXNameFrom nameFrom = blink::kWebAXNameFromUninitialized;
1624 blink::WebVector<blink::WebAXObject> nameObjects; 1624 blink::WebVector<blink::WebAXObject> nameObjects;
1625 accessibility_object_.GetName(nameFrom, nameObjects); 1625 accessibility_object_.GetName(nameFrom, nameObjects);
1626 switch (nameFrom) { 1626 switch (nameFrom) {
1627 case blink::kWebAXNameFromUninitialized: 1627 case blink::kWebAXNameFromUninitialized:
1628 return ""; 1628 return "";
1629 case blink::kWebAXNameFromAttribute: 1629 case blink::kWebAXNameFromAttribute:
1630 return "attribute"; 1630 return "attribute";
1631 case blink::kWebAXNameFromAttributeExplicitlyEmpty:
1632 return "attributeExplicitlyEmpty";
1631 case blink::kWebAXNameFromCaption: 1633 case blink::kWebAXNameFromCaption:
1632 return "caption"; 1634 return "caption";
1633 case blink::kWebAXNameFromContents: 1635 case blink::kWebAXNameFromContents:
1634 return "contents"; 1636 return "contents";
1635 case blink::kWebAXNameFromPlaceholder: 1637 case blink::kWebAXNameFromPlaceholder:
1636 return "placeholder"; 1638 return "placeholder";
1637 case blink::kWebAXNameFromRelatedElement: 1639 case blink::kWebAXNameFromRelatedElement:
1638 return "relatedElement"; 1640 return "relatedElement";
1639 case blink::kWebAXNameFromValue: 1641 case blink::kWebAXNameFromValue:
1640 return "value"; 1642 return "value";
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 v8::Local<v8::Value> value_handle = 1856 v8::Local<v8::Value> value_handle =
1855 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8(); 1857 gin::CreateHandle(isolate, new WebAXObjectProxy(object, this)).ToV8();
1856 if (value_handle.IsEmpty()) 1858 if (value_handle.IsEmpty())
1857 return v8::Local<v8::Object>(); 1859 return v8::Local<v8::Object>();
1858 v8::Local<v8::Object> handle = value_handle->ToObject(isolate); 1860 v8::Local<v8::Object> handle = value_handle->ToObject(isolate);
1859 elements_.Append(handle); 1861 elements_.Append(handle);
1860 return handle; 1862 return handle;
1861 } 1863 }
1862 1864
1863 } // namespace test_runner 1865 } // namespace test_runner
OLDNEW
« no previous file with comments | « content/renderer/accessibility/blink_ax_tree_source.cc ('k') | content/test/data/accessibility/html/img-empty-alt.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698