Reviewed by Gustavo Noronha Silva.
https://bugs.webkit.org/show_bug.cgi?id=30997
[Gtk] Implemment AtkDocument
Added testing support for AtkDocument implementation.
* accessibility/document-attributes.html: Added.
* accessibility/document-attributes-expected.txt: Added.
* platform/mac/Skipped:
* platform/win/Skipped:
2009-11-12 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Gustavo Noronha Silva.
https://bugs.webkit.org/show_bug.cgi?id=30997
[Gtk] Implemment AtkDocument
Added testing support.
* DumpRenderTree/AccessibilityUIElement.cpp:
* DumpRenderTree/AccessibilityUIElement.h:
(getDocumentEncodingCallback):
(getDocumentURICallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::documentEncoding):
(AccessibilityUIElement::documentURI):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50921
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-11-12 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30997
+ [Gtk] Implemment AtkDocument
+
+ Added testing support for AtkDocument implementation.
+
+ * accessibility/document-attributes.html: Added.
+ * accessibility/document-attributes-expected.txt: Added.
+ * platform/mac/Skipped:
+ * platform/win/Skipped:
+
2009-11-11 Dirk Schulze <krit@webkit.org>
Reviewed by Simon Fraser.
--- /dev/null
+<html>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<body id="body">
+ <!-- This tests the exposure of a document's encoding and URI to assistive technologies -->
+ <div id="result"></div>
+ <script>
+ if (window.accessibilityController) {
+ var body = document.getElementById("body");
+ body.focus();
+ var webArea = accessibilityController.focusedElement;
+ var result = document.getElementById("result");
+
+ var documentEncoding = webArea.documentEncoding;
+ var documentURI = webArea.documentURI;
+
+ if (documentEncoding == "UTF-8" && documentURI == location.href) {
+ result.innerText = "Passed";
+ }
+ else {
+ result.innerText = "Failed:\nExpected: UTF-8 and " + location.href + ".\nActual: " + documentEncoding + " and " + documentURI + ".";
+ }
+ }
+ </script>
+</body>
+</html>
# Missing SocketStreamHandle implementation
websocket/tests
+
+# Accessibility tests without results
+accessibility/document-attributes.html
accessibility/aria-tab-roles.html
accessibility/button-press-action.html
accessibility/canvas.html
+accessibility/document-attributes.html
accessibility/editable-webarea-context-menu-point.html
accessibility/iframe-bastardization.html
accessibility/ignore-spacer-elements.html
+2009-11-12 Joanmarie Diggs <joanmarie.diggs@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30997
+ [Gtk] Implemment AtkDocument
+
+ Added testing support.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (getDocumentEncodingCallback):
+ (getDocumentURICallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::documentEncoding):
+ (AccessibilityUIElement::documentURI):
+
2009-11-12 Adam Roben <aroben@apple.com>
Replace worldIDs with world objects
return JSValueMakeString(context, accessibilityValue.get());
}
+static JSValueRef getDocumentEncodingCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> documentEncoding(Adopt, toAXElement(thisObject)->documentEncoding());
+ return JSValueMakeString(context, documentEncoding.get());
+}
+
+static JSValueRef getDocumentURICallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> documentURI(Adopt, toAXElement(thisObject)->documentURI());
+ return JSValueMakeString(context, documentURI.get());
+}
+
// Destruction
static void finalize(JSObjectRef thisObject)
{ "isExpanded", getIsExpandedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "documentEncoding", getDocumentEncodingCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "documentURI", getDocumentURICallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0, 0 }
};
int hierarchicalLevel() const;
double clickPointX();
double clickPointY();
+ JSStringRef documentEncoding();
+ JSStringRef documentURI();
// Table-specific attributes
JSStringRef attributesOfColumnHeaders();
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
}
+
+JSStringRef AccessibilityUIElement::documentEncoding()
+{
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (role != ATK_ROLE_DOCUMENT_FRAME)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "Encoding"));
+}
+
+JSStringRef AccessibilityUIElement::documentURI()
+{
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (role != ATK_ROLE_DOCUMENT_FRAME)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
+}
// FIXME: implement
return JSStringCreateWithCharacters(0, 0);
}
+
+JSStringRef AccessibilityUIElement::documentEncoding()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::documentURI()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
return JSStringCreateWithCharacters(value.data(), value.length());
}
+
+
+JSStringRef AccessibilityUIElement::documentEncoding()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::documentURI()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}