haikuwebkit/LayoutTests/accessibility/svg-bounds.html

95 lines
3.5 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML>
<html>
<body>
Many accessibility js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172372 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-invalid.html: * accessibility/aria-switch-sends-notification.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/gtk/aria-listbox-crash.html: * accessibility/heading-title-includes-links-expected.txt: * accessibility/heading-title-includes-links.html: * accessibility/image-map-update-parent-crash-expected.txt: * accessibility/image-map-update-parent-crash.html: * accessibility/insert-children-assert-expected.txt: * accessibility/insert-children-assert.html: * accessibility/ios-simulator/focus-change-notifications.html: * accessibility/label-element-press.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/mac/aria-expanded-notifications.html: * accessibility/mac/aria-listbox-selectedchildren-change.html: * accessibility/mac/aria-liveregion-on-image.html: * accessibility/mac/aria-liveregions-addedelement.html: * accessibility/mac/aria-liveregions-changedalt.html: * accessibility/mac/aria-liveregions-changedtext.html: * accessibility/mac/aria-liveregions-removedelement.html: * accessibility/mac/combobox-activedescendant-notifications-expected.txt: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/html-slider-indicator.html: * accessibility/mac/input-replacevalue-userinfo-expected.txt: * accessibility/mac/input-replacevalue-userinfo.html: * accessibility/mac/ordered-textmarker-crash-expected.txt: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/search-with-frames-expected.txt: * accessibility/mac/search-with-frames.html: * accessibility/mac/selection-boundary-userinfo.html: * accessibility/mac/selection-change-userinfo.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-value-changes-for-aria-textbox.html: * accessibility/mac/stale-textmarker-crash-expected.txt: * accessibility/mac/stale-textmarker-crash.html: * accessibility/mac/textbox-role-reports-notifications-expected.txt: * accessibility/mac/textbox-role-reports-notifications.html: * accessibility/mac/value-change/value-change-user-info-contenteditable.html: * accessibility/mac/value-change/value-change-user-info-textarea.html: * accessibility/mac/value-change/value-change-user-info-textfield.html: * accessibility/media-element.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/paragraph-with-linebreaks.html: * accessibility/platform-name.html: * accessibility/radio-button-group-members.html: * accessibility/radio-button-title-label.html: * accessibility/selection-states-expected.txt: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-cells-roles.html: * accessibility/table-roles-hierarchy.html: * accessibility/table-with-aria-role.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/unknown-roles-not-exposed-expected.txt: * accessibility/unknown-roles-not-exposed.html: * accessibility/win/bstr-elements-role.html: * accessibility/win/detached-object-notification-crash.html: * accessibility/win/heading-elements.html: * accessibility/win/img-alt-attribute.html: * accessibility/win/linked-elements.html: * accessibility/win/list-item-role.html: * accessibility/win/list-marker-role.html: * accessibility/win/list-role.html: * accessibility/win/multiple-select-element-role.html: * accessibility/win/option-element-position-and-size.html: * accessibility/win/parent-element.html: * accessibility/win/select-element-role.html: * accessibility/win/selection-and-focus.html: * accessibility/win/single-select-children-changed.html: * accessibility/win/single-select-children.html: * accessibility/win/text-role.html: * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/table-cells-roles-expected.txt: * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Canonical link: https://commits.webkit.org/189300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 23:37:59 +00:00
<script src="../resources/js-test.js"></script>
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
<script src="../resources/accessibility-helper.js"></script>
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
<div id="container" style="position: relative; top: 100px; left: 600px; width:400px; height: 400px;" role="group" tabindex="0">
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
<svg role="group" id="svgroot">
<circle role="button" aria-label="face" id="face" r="200" cx="200" cy="200" stroke="red" stroke-width="1" fill="yellow" />
<ellipse role="button" aria-label="left-eye" id="left-eye" cx="120" cy="180" rx="18" ry="33" fill="black"/>
<ellipse role="button" aria-label="right-eye" id="right-eye" cx="280" cy="120" rx="18" ry="33" fill="black"/>
<ellipse role="button" aria-label="nose" id="nose" cx="200" cy="220" rx="8" ry="15" fill="black"/>
<path role="button" aria-label="smile" id="smile" stroke-width="10" stroke="black" fill="none" stroke-linecap="round" d="M120,280 Q200,330 290,280"/>
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
<text x="150" y="130" fill="red">Test</text>
<image x="20" y="20" width="300" height="80" aria-label="Test Image" xlink:href="resources/cake.png" />
</svg>
</div>
<div id="console"></div>
<script>
description("This test ensures the accessibility bounds of embedded SVG objects are correct.")
// Return the page's relative coordinates. If we rely on the x() or y() of the accessibility object, then
// accessibility transforms are applied that fail because there is no window available
function pageX(element) {
return element.clickPointX - element.width/2;
}
function pageY(element) {
return element.clickPointY - element.height/2;
}
if (window.testRunner && window.accessibilityController) {
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
var container = accessibilityController.accessibleElementById("svgroot");
var x = pageX(container) - 1;
var y = pageY(container) - 1;
debug("container location: (" + x + ", " + y + ")");
var face = container.childAtIndex(0);
debug('Face role: ' + face.role);
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
debug('Face label: ' + platformValueForW3CName(face, true));
debug('FaceX: ' + (pageX(face) - x));
debug('FaceY: ' + Math.abs(pageY(face) - y));
debug('<br>');
var eye = container.childAtIndex(1);
debug('Eye role: ' + eye.role);
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
debug('Eye label: ' + platformValueForW3CName(eye, true));
debug('EyeX: ' + (pageX(eye) - x));
debug('EyeY: ' + Math.abs(pageY(eye) - y));
debug('<br>');
var nose = container.childAtIndex(3);
debug('Nose role: ' + nose.role);
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
debug('Nose label: ' + platformValueForW3CName(nose, true));
debug('NoseX: ' + (pageX(nose) - x));
debug('NoseY: ' + Math.abs(pageY(nose) - y));
debug('<br>');
var mouth = container.childAtIndex(4);
debug('Mouth role: ' + mouth.role);
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
debug('Mouth label: ' + platformValueForW3CName(mouth, true));
debug('MouthX: ' + (pageX(mouth) - x));
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y)));
debug('<br>');
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
// Text varies by about 1 - 2 pixels depending on the platform,
// so just print the text coordinates divided by 10.
AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description https://bugs.webkit.org/show_bug.cgi?id=157822 Reviewed by Chris Fleizach. Source/WebCore: Remove the old code which was overriding WebCore Accessibility and always use AccessibilityText. If the AccessibilityText's textSource is HelpText or SummaryText, it should be exposed as the AtkObject description. If the textSource is TitleTagText and there is no other text alternative, the value should also be exposed in this fashion. Note that AtkObject's description property is equivalent to AXAPI's AXHelp property. If the AccessibilityText's textSource is anything other than the above, the first non-empty value should be exposed as the AtkObject name. Depending on the source of the name content, AtkObject's name property can be the equivalent of AXAPI's AXTitle. However, most of the time, AtkObject's name property is equivalent to AXAPI's AXDescription property. By making these changes, what WebKit exposes for ATK is now extremely similar to what WebKit exposes on the Mac (modulo the property names) and also with what is defined in the HTML Accessibility and Accessible Name and Description Computation API mappings specs. Now that the exposure is correct, the Layout Tests needed to be adjusted accordingly because asking for the "AXDescription" gives you the AXDescription on the Mac and the AtkObject description in GNU/Linux. But as indicated above, what ATK calls a "description" is what the Mac calls "help." Ultimately our Layout Tests and/or our platform TestRunner API should be modified to deal with these differences more gracefully. (Bug https://bugs.webkit.org/show_bug.cgi?id=157187 has been opened for that task.) In the meantime, the existing tests have been given platform checks to ask for the right property on each platform. This was done in such a way as to not require other (non-ATK) platforms change their current expectations files. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetName): (webkitAccessibleGetDescription): Tools: Fix AccessibilityUIElement::helpText() so that it returns an empty string rather than nullptr upon failure. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::helpText): LayoutTests: Now that the exposure is correct, the Layout Tests needed to be adjusted accordingly because asking for the "AXDescription" gives you the AXDescription on the Mac and the AtkObject description in GNU/Linux. But what the Mac calls a "description" is what ATK calls a "name." What ATK calls a "description" is what the Mac calls "help." Ultimately our Layout Tests and/or our platform TestRunner API should be modified to deal with with these differences more gracefully. (Bug https://bugs.webkit.org/show_bug.cgi?id=157187 has been opened for that task.) In the meantime, the existing tests have been given platform checks to ask for the right property on each platform. This was done in such a way as to not require other (non-ATK) platforms change their current expectations files. In addition to the above, three previously-failing tests were corrected and are now passing. * accessibility/alt-tag-on-image-with-nonimage-role.html: * accessibility/aria-help.html: * accessibility/aria-label.html: * accessibility/aria-labeled-with-hidden-node.html: * accessibility/aria-labelledby-on-input.html: * accessibility/aria-labelledby-overrides-aria-labeledby.html: * accessibility/aria-labelledby-overrides-label.html: * accessibility/aria-labelledby-stay-within.html: * accessibility/aria-labelledby-with-descendants.html: * accessibility/aria-namefrom-author.html: * accessibility/aria-option-role.html: * accessibility/canvas-description-and-role.html: * accessibility/empty-image-with-title.html: * accessibility/fieldset-element.html: * accessibility/focusable-div.html: * accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt: * accessibility/gtk/no-notification-for-unrendered-iframe-children.html: * accessibility/gtk/title-and-alt-expected.txt: * accessibility/gtk/title-and-alt.html: * accessibility/help-text.html: * accessibility/img-alt-tag-only-whitespace-expected.txt: * accessibility/img-alt-tag-only-whitespace.html: * accessibility/img-aria-button-alt-tag.html: * accessibility/img-fallsback-to-title.html: * accessibility/input-image-alt.html: * accessibility/loading-iframe-sends-notification.html: * accessibility/media-element.html: * accessibility/radio-button-title-label.html: * accessibility/self-referencing-aria-labelledby.html: * accessibility/svg-bounds.html: * platform/gtk/TestExpectations: * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Added. * platform/gtk/accessibility/aria-help-expected.txt: * platform/gtk/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Added. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Added. * platform/gtk/accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Added. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Added. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Added. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Added. * platform/gtk/accessibility/aria-option-role-expected.txt: Added. * platform/gtk/accessibility/aria-switch-text-expected.txt: * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Added. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Added. * platform/gtk/accessibility/fieldset-element-expected.txt: Added. * platform/gtk/accessibility/focusable-div-expected.txt: Added. * platform/gtk/accessibility/help-text-expected.txt: Added. * platform/gtk/accessibility/image-link-expected.txt: * platform/gtk/accessibility/image-map1-expected.txt: * platform/gtk/accessibility/image-map2-expected.txt: * platform/gtk/accessibility/image-with-alt-and-map-expected.txt: * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Added. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Added. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: * platform/gtk/accessibility/input-image-alt-expected.txt: Added. * platform/gtk/accessibility/media-element-expected.txt: * platform/gtk/accessibility/radio-button-title-label-expected.txt: * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Added. * platform/gtk/accessibility/svg-bounds-expected.txt: Added. Canonical link: https://commits.webkit.org/175953@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-18 07:12:09 +00:00
var text = container.childAtIndex(5);
if (accessibilityController.platformName != "atk")
text = text.childAtIndex(0);
debug('Text role: ' + text.role);
AX: support clickPoint in DRT for chromium https://bugs.webkit.org/show_bug.cgi?id=97359 Reviewed by Chris Fleizach. Source/WebCore: When computing the accessible bounding box of an SVG root, be sure to call a method that uses transforms, otherwise an assertion fails. Newly unskipped tests: accessibility/svg-bounds.html and accessibility/svg-remote-element.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): Source/WebKit/chromium: Exposes the clickPoint accessibility method in WebAccessibilityObject. * public/WebAccessibilityObject.h: (WebAccessibilityObject): * src/WebAccessibilityObject.cpp: (WebKit::WebAccessibilityObject::clickPoint): (WebKit): Tools: Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that several more tests can pass. * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement): (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback): (WebTestRunner): (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback): (WebTestRunner::AccessibilityUIElement::elementAtPointCallback): * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: (AccessibilityUIElement): LayoutTests: Enable four more tests now that clickPointX, clickPointY, and elementAtPoint are implemented for Chromium. Minor fixes to two tests to make them more robust across platfoms and when run in parallel. * accessibility/svg-bounds.html: Updated * accessibility/svg-bounds-expected.txt: Added (made cross-platform * accessibility/svg-remote-element.html: Updated * accessibility/svg-remote-element-expected.txt: Added (made cross-platform) * platform/mac/accessibility/svg-bounds-expected.txt: Deleted * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted * platform/chromium/TestExpectations: Updated Canonical link: https://commits.webkit.org/123750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 17:29:34 +00:00
debug('TextX/10: ' + Math.floor((pageX(text) - x) / 10));
debug('TextY/10: ' + Math.floor(Math.abs(pageY(text) - y) / 10));
debug('<br>');
var image = container.childAtIndex(6);
debug('Image role: ' + image.role);
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
debug('Image label: ' + platformValueForW3CName(image, true));
debug('ImageX: ' + (pageX(image) - x));
debug('ImageY: ' + Math.abs(pageY(image) - y));
}
</script>
</body>
</html>