Switch all LayoutTests to use new AX name calculation

BUG=473220,550663

Review URL: https://codereview.chromium.org/1417213006

Cr-Commit-Position: refs/heads/master@{#358900}
diff --git a/components/test_runner/web_ax_object_proxy.cc b/components/test_runner/web_ax_object_proxy.cc
index 8c91d97..1c3b8d7 100644
--- a/components/test_runner/web_ax_object_proxy.cc
+++ b/components/test_runner/web_ax_object_proxy.cc
@@ -259,16 +259,6 @@
   }
 }
 
-std::string DeprecatedGetDescription(const blink::WebAXObject& object) {
-  std::string description = object.deprecatedAccessibilityDescription().utf8();
-  return description.insert(0, "AXDescription: ");
-}
-
-std::string DeprecatedGetHelpText(const blink::WebAXObject& object) {
-  std::string help_text = object.deprecatedHelpText().utf8();
-  return help_text.insert(0, "AXHelp: ");
-}
-
 std::string GetStringValue(const blink::WebAXObject& object) {
   std::string value;
   if (object.role() == blink::WebAXRoleColorWell) {
@@ -298,11 +288,6 @@
   return role_string;
 }
 
-std::string DeprecatedGetTitle(const blink::WebAXObject& object) {
-  std::string title = object.deprecatedTitle().utf8();
-  return title.insert(0, "AXTitle: ");
-}
-
 std::string GetValueDescription(const blink::WebAXObject& object) {
   std::string value_description = object.valueDescription().utf8();
   return value_description.insert(0, "AXValueDescription: ");
@@ -314,12 +299,11 @@
 }
 
 std::string GetAttributes(const blink::WebAXObject& object) {
-  // FIXME: Concatenate all attributes of the AXObject.
-  std::string attributes(DeprecatedGetTitle(object));
+  blink::WebAXNameFrom nameFrom;
+  blink::WebVector<blink::WebAXObject> nameObjects;
+  std::string attributes(object.name(nameFrom, nameObjects).utf8());
   attributes.append("\n");
   attributes.append(GetRole(object));
-  attributes.append("\n");
-  attributes.append(DeprecatedGetDescription(object));
   return attributes;
 }
 
@@ -596,17 +580,6 @@
       .SetMethod("removeNotificationListener",
                  &WebAXObjectProxy::UnsetNotificationListener)
       //
-      // DEPRECATED accessible name and description accessors
-      //
-      .SetProperty("deprecatedTitle",
-                   &WebAXObjectProxy::DeprecatedTitle)
-      .SetProperty("deprecatedDescription",
-                   &WebAXObjectProxy::DeprecatedDescription)
-      .SetProperty("deprecatedHelpText",
-                   &WebAXObjectProxy::DeprecatedHelpText)
-      .SetMethod("deprecatedTitleUIElement",
-                 &WebAXObjectProxy::DeprecatedTitleUIElement)
-      //
       // NEW accessible name and description accessors
       //
       .SetProperty("name", &WebAXObjectProxy::Name)
@@ -667,21 +640,6 @@
   return GetRole(accessibility_object_);
 }
 
-std::string WebAXObjectProxy::DeprecatedTitle() {
-  accessibility_object_.updateLayoutAndCheckValidity();
-  return DeprecatedGetTitle(accessibility_object_);
-}
-
-std::string WebAXObjectProxy::DeprecatedDescription() {
-  accessibility_object_.updateLayoutAndCheckValidity();
-  return DeprecatedGetDescription(accessibility_object_);
-}
-
-std::string WebAXObjectProxy::DeprecatedHelpText() {
-  accessibility_object_.updateLayoutAndCheckValidity();
-  return DeprecatedGetHelpText(accessibility_object_);
-}
-
 std::string WebAXObjectProxy::StringValue() {
   accessibility_object_.updateLayoutAndCheckValidity();
   return GetStringValue(accessibility_object_);
@@ -1165,15 +1123,6 @@
   return factory_->GetOrCreate(obj);
 }
 
-v8::Local<v8::Object> WebAXObjectProxy::DeprecatedTitleUIElement() {
-  accessibility_object_.updateLayoutAndCheckValidity();
-  blink::WebAXObject obj = accessibility_object_.deprecatedTitleUIElement();
-  if (obj.isNull())
-    return v8::Local<v8::Object>();
-
-  return factory_->GetOrCreate(obj);
-}
-
 void WebAXObjectProxy::SetSelectedTextRange(int selection_start,
                                             int length) {
   accessibility_object_.updateLayoutAndCheckValidity();