Title: [159067] trunk
Revision
159067
Author
[email protected]
Date
2013-11-11 13:09:16 -0800 (Mon, 11 Nov 2013)

Log Message

AX: support helpText() in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=40194

Reviewed by Chris Fleizach.

Tools:

Implemented stubbed helpText methods so we can move aria-help.html back to LayoutTests/accessibility.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::helpText):

LayoutTests:

Moving layout test back to its original location. Shouldn't be platform specific.

* accessibility/aria-help.html: Renamed from LayoutTests/platform/mac/accessibility/aria-help.html.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (159066 => 159067)


--- trunk/LayoutTests/ChangeLog	2013-11-11 21:05:15 UTC (rev 159066)
+++ trunk/LayoutTests/ChangeLog	2013-11-11 21:09:16 UTC (rev 159067)
@@ -1,3 +1,14 @@
+2013-11-11  Samuel White  <[email protected]>
+
+        AX: support helpText() in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=40194
+
+        Reviewed by Chris Fleizach.
+
+        Moving layout test back to its original location. Shouldn't be platform specific.
+
+        * accessibility/aria-help.html: Renamed from LayoutTests/platform/mac/accessibility/aria-help.html.
+
 2013-11-11  Michał Pakuła vel Rutka  <[email protected]>
 
         Unreviewed EFL gardening

Copied: trunk/LayoutTests/accessibility/aria-help.html (from rev 159066, trunk/LayoutTests/platform/mac/accessibility/aria-help.html) (0 => 159067)


--- trunk/LayoutTests/accessibility/aria-help.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-help.html	2013-11-11 21:09:16 UTC (rev 159067)
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="button" tabindex=0 role="button" aria-label="title" aria-help="click here">
+button
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that aria-help attribute works as expected.");
+
+    if (window.accessibilityController) {
+
+        document.getElementById("button").focus();
+        var button = accessibilityController.focusedElement;
+        shouldBe("button.helpText", "'AXHelp: click here'");
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Deleted: trunk/LayoutTests/platform/mac/accessibility/aria-help.html (159066 => 159067)


--- trunk/LayoutTests/platform/mac/accessibility/aria-help.html	2013-11-11 21:05:15 UTC (rev 159066)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-help.html	2013-11-11 21:09:16 UTC (rev 159067)
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body id="body">
-
-<div id="button" tabindex=0 role="button" aria-label="title" aria-help="click here">
-button
-</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-    description("This tests that aria-help attribute works as expected.");
-
-    if (window.accessibilityController) {
-
-        document.getElementById("button").focus();
-        var button = accessibilityController.focusedElement;
-        shouldBe("button.helpText", "'AXHelp: click here'");
-    }
-
-</script>
-
-<script src=""
-</body>
-</html>

Modified: trunk/Tools/ChangeLog (159066 => 159067)


--- trunk/Tools/ChangeLog	2013-11-11 21:05:15 UTC (rev 159066)
+++ trunk/Tools/ChangeLog	2013-11-11 21:09:16 UTC (rev 159067)
@@ -1,3 +1,15 @@
+2013-11-11  Samuel White  <[email protected]>
+
+        AX: support helpText() in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=40194
+
+        Reviewed by Chris Fleizach.
+
+        Implemented stubbed helpText methods so we can move aria-help.html back to LayoutTests/accessibility.
+
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        (AccessibilityUIElement::helpText):
+
 2013-11-11  Anders Carlsson  <[email protected]>
 
         Remove block based APIs from the WebKit2 C API

Modified: trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (159066 => 159067)


--- trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp	2013-11-11 21:05:15 UTC (rev 159066)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp	2013-11-11 21:09:16 UTC (rev 159067)
@@ -324,7 +324,15 @@
 
 JSStringRef AccessibilityUIElement::helpText() const
 {
-    return 0;
+    if (!m_element)
+        return JSStringCreateWithCharacters(0, 0);
+
+    BSTR helpTextBSTR;
+    if (FAILED(m_element->get_accHelp(self(), &helpTextBSTR)) || !helpTextBSTR)
+        return JSStringCreateWithCharacters(0, 0);
+    wstring helpText(helpTextBSTR, SysStringLen(helpTextBSTR));
+    ::SysFreeString(helpTextBSTR);
+    return JSStringCreateWithCharacters(helpText.data(), helpText.length());
 }
 
 double AccessibilityUIElement::x()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to