haikuwebkit/LayoutTests/accessibility/mac/selection-element-tabbing-t...

76 lines
2.4 KiB
HTML
Raw Permalink Normal View History

Reduce Preference Override Methods: TabsToLinks/SpatialNavigation https://bugs.webkit.org/show_bug.cgi?id=218288 Reviewed by Tim Horton. Source/WebKit: Removes WKPreferencesGet/SetTabToLinksEnabled preference as it duplicates functionality of WKPreferencesGet/SetTabsToLinks. The former was added for https://bugs.webkit.org/show_bug.cgi?id=95329 but was redundant even at the time. We can now use test header commands for all of its use cases. Also removes testing only bundle SPI for enabling spatial navigation which also can be set via test headers instead. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetTabToLinksEnabled): Deleted. (WKPreferencesGetTabToLinksEnabled): Deleted. * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetSpatialNavigationEnabled): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): (WebKit::InjectedBundle::setSpatialNavigationEnabled): Deleted. * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::setTabToLinksEnabled): Deleted. (WebKit::WebPage::tabToLinksEnabled const): Deleted. Source/WTF: * Scripts/Preferences/WebPreferences.yaml: Unify TabToLinksEnabled and TabsToLinks. TabToLinksEnabled was added for https://bugs.webkit.org/show_bug.cgi?id=95329 and has never actually been needed. Tools: Replace uses of testRunner.overridePreference("WebKitTabToLinksPreferenceKey", ...) and testRunner.setSpatialNavigationEnabled(...) with test header commands, helping to reduce the number of different ways we have to override preferences in LayoutTests. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): * DumpRenderTree/TestRunner.cpp: (TestRunner::staticFunctions): (setSpatialNavigationEnabledCallback): Deleted. * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setSpatialNavigationEnabled): Deleted. * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): (setWebPreferencesForTestOptions): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setSpatialNavigationEnabled): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: Replace uses of testRunner.overridePreference("WebKitTabToLinksPreferenceKey", ...) and testRunner.setSpatialNavigationEnabled(...) with test header commands, helping to reduce the number of different ways we have to override preferences in LayoutTests. * accessibility/mac/caret-browsing-tab-selection.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-notification-focus-change.html: * accessibility/mac/tab-focus-post-notification.html: * fast/events/tab-focus-anchor.html: * fast/events/tab-focus-link-in-canvas.html: * fast/spatial-navigation/snav-1st-stop.html: * fast/spatial-navigation/snav-clipped-overflowed-content.html: * fast/spatial-navigation/snav-container-only-white-space.html: * fast/spatial-navigation/snav-container-white-space.html: * fast/spatial-navigation/snav-display-contents-crash.html: * fast/spatial-navigation/snav-div-overflow-scrol-hidden.html: * fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html: * fast/spatial-navigation/snav-fully-aligned-horizontally.html: * fast/spatial-navigation/snav-fully-aligned-vertically.html: * fast/spatial-navigation/snav-hidden-focusable-element.html: * fast/spatial-navigation/snav-hidden-iframe-zero-size.html: * fast/spatial-navigation/snav-hidden-iframe.html: * fast/spatial-navigation/snav-iframe-flattening-simple.html: * fast/spatial-navigation/snav-iframe-nested.html: * fast/spatial-navigation/snav-iframe-no-focusable-content.html: * fast/spatial-navigation/snav-iframe-no-scrollable-content.html: * fast/spatial-navigation/snav-iframe-recursive-offset-parent.html: * fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html: * fast/spatial-navigation/snav-imagemap-area-not-focusable.html: * fast/spatial-navigation/snav-imagemap-area-without-image.html: * fast/spatial-navigation/snav-imagemap-overlapped-areas.html: * fast/spatial-navigation/snav-imagemap-simple.html: * fast/spatial-navigation/snav-input.html: * fast/spatial-navigation/snav-media-elements.html: * fast/spatial-navigation/snav-multiple-select-focusring.html: * fast/spatial-navigation/snav-multiple-select-optgroup.html: * fast/spatial-navigation/snav-multiple-select.html: * fast/spatial-navigation/snav-offscreen-content.html: * fast/spatial-navigation/snav-only-clipped-overflow-content.html: * fast/spatial-navigation/snav-radio-group.html: * fast/spatial-navigation/snav-radio.html: * fast/spatial-navigation/snav-search-optimization.html: * fast/spatial-navigation/snav-simple-content-overflow.html: * fast/spatial-navigation/snav-single-select-list.html: * fast/spatial-navigation/snav-single-select.html: * fast/spatial-navigation/snav-table-traversal.html: * fast/spatial-navigation/snav-textarea.html: * fast/spatial-navigation/snav-tiny-table-traversal.html: * fast/spatial-navigation/snav-two-elements-one-line.html: * fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html: * fast/spatial-navigation/snav-z-index.html: * fast/spatial-navigation/snav-zero-margin-content.html: * media/media-controls-accessibility.html: * media/tab-focus-inside-media-elements.html: Canonical link: https://commits.webkit.org/230992@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-28 18:33:08 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ TabsToLinks=true ] -->
Source/JavaScriptCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add an adopt() function to simplify JSRetainPtr<JSStringRef> { Adopt, string } to adopt(string). Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * API/JSRetainPtr.h: (adopt): Source/WebCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for position to be passed for selection changes to allow checking. for boundaries in the case of ignored elements. Add support for searching for unignored siblings of AccessibilityObjects. Include AccessibilityObject wrappers in notifications for tests. Test: platform/mac/accessibility/selection-element-tabbing-to-link.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postTextStateChangeNotification): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::previousSiblingUnignored): (WebCore::AccessibilityObject::nextSiblingUnignored): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (isValueTypeSupported): (arrayRemovingNonSupportedTypes): (dictionaryRemovingNonSupportedTypes): (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Tools: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for mapping WebCore Accessibility types into JSValueRef types so they can be used in tests. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): LayoutTests: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add test for forward and backward tabbing between links and corresponding notifications change element Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * platform/mac/accessibility/selection-element-tabbing-to-link-expected.txt: Added. * platform/mac/accessibility/selection-element-tabbing-to-link.html: Added. Canonical link: https://commits.webkit.org/164363@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-24 20:51:13 +00:00
<html>
<head>
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>
Source/JavaScriptCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add an adopt() function to simplify JSRetainPtr<JSStringRef> { Adopt, string } to adopt(string). Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * API/JSRetainPtr.h: (adopt): Source/WebCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for position to be passed for selection changes to allow checking. for boundaries in the case of ignored elements. Add support for searching for unignored siblings of AccessibilityObjects. Include AccessibilityObject wrappers in notifications for tests. Test: platform/mac/accessibility/selection-element-tabbing-to-link.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postTextStateChangeNotification): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::previousSiblingUnignored): (WebCore::AccessibilityObject::nextSiblingUnignored): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (isValueTypeSupported): (arrayRemovingNonSupportedTypes): (dictionaryRemovingNonSupportedTypes): (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Tools: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for mapping WebCore Accessibility types into JSValueRef types so they can be used in tests. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): LayoutTests: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add test for forward and backward tabbing between links and corresponding notifications change element Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * platform/mac/accessibility/selection-element-tabbing-to-link-expected.txt: Added. * platform/mac/accessibility/selection-element-tabbing-to-link.html: Added. Canonical link: https://commits.webkit.org/164363@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-24 20:51:13 +00:00
</head>
<body id="body">
<div>
<a href="" id="one">one</a>
<a href="" id="two">two</a>
</div>
<p id="description"></p>
<div id="console"></div>
<div id="notifications"></div>
<script>
description("This tests that tabbing between links includes a relevant accessibilityObject in the userInfo when on the boundary between an ignored accessibilityObject and an unignored accessibilityObject.");
var axTextChangeElement = 0;
var webArea = 0;
var changeElementOne = 0;
var changeElementTwo = 0;
var linkTwo = 0;
var linkOne = 0;
var count = 0;
function ancestorWithRole(axElement, role) {
var ancestor = axElement;
while (ancestor) {
if (ancestor.role == role)
break;
ancestor = ancestor.parentElement();
}
return ancestor;
}
function notificationCallback(notification, userInfo) {
if (notification == "AXSelectedTextChanged") {
count++;
if (count == 1) {
changeElementOne = userInfo["AXTextChangeElement"];
linkTwo = accessibilityController.accessibleElementById("two");
shouldBe("ancestorWithRole(changeElementOne, \"AXRole: AXLink\").isEqual(linkTwo)", "true");
} else if (count == 2) {
changeElementTwo = userInfo["AXTextChangeElement"];
linkOne = accessibilityController.accessibleElementById("one");
shouldBe("ancestorWithRole(changeElementTwo, \"AXRole: AXLink\").isEqual(linkOne)", "true");
webArea.removeNotificationListener();
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
finishJSTest();
Source/JavaScriptCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add an adopt() function to simplify JSRetainPtr<JSStringRef> { Adopt, string } to adopt(string). Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * API/JSRetainPtr.h: (adopt): Source/WebCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for position to be passed for selection changes to allow checking. for boundaries in the case of ignored elements. Add support for searching for unignored siblings of AccessibilityObjects. Include AccessibilityObject wrappers in notifications for tests. Test: platform/mac/accessibility/selection-element-tabbing-to-link.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postTextStateChangeNotification): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::previousSiblingUnignored): (WebCore::AccessibilityObject::nextSiblingUnignored): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (isValueTypeSupported): (arrayRemovingNonSupportedTypes): (dictionaryRemovingNonSupportedTypes): (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Tools: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for mapping WebCore Accessibility types into JSValueRef types so they can be used in tests. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): LayoutTests: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add test for forward and backward tabbing between links and corresponding notifications change element Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * platform/mac/accessibility/selection-element-tabbing-to-link-expected.txt: Added. * platform/mac/accessibility/selection-element-tabbing-to-link.html: Added. Canonical link: https://commits.webkit.org/164363@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-24 20:51:13 +00:00
}
}
}
if (window.accessibilityController) {
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
jsTestIsAsync = true;
Source/JavaScriptCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add an adopt() function to simplify JSRetainPtr<JSStringRef> { Adopt, string } to adopt(string). Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * API/JSRetainPtr.h: (adopt): Source/WebCore: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for position to be passed for selection changes to allow checking. for boundaries in the case of ignored elements. Add support for searching for unignored siblings of AccessibilityObjects. Include AccessibilityObject wrappers in notifications for tests. Test: platform/mac/accessibility/selection-element-tabbing-to-link.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postTextStateChangeNotification): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::previousSiblingUnignored): (WebCore::AccessibilityObject::nextSiblingUnignored): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (isValueTypeSupported): (arrayRemovingNonSupportedTypes): (dictionaryRemovingNonSupportedTypes): (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Tools: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. Add support for mapping WebCore Accessibility types into JSValueRef types so they can be used in tests. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (webAccessibilityObjectWrapperClass): (-[AccessibilityNotificationHandler startObserving]): (makeValueRefForValue): (makeArrayRefForArray): (makeObjectRefForDictionary): (-[AccessibilityNotificationHandler _notificationReceived:]): LayoutTests: Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects https://bugs.webkit.org/show_bug.cgi?id=146177 Add test for forward and backward tabbing between links and corresponding notifications change element Patch by Doug Russell <d_russell@apple.com> on 2015-06-24 Reviewed by Darin Adler. * platform/mac/accessibility/selection-element-tabbing-to-link-expected.txt: Added. * platform/mac/accessibility/selection-element-tabbing-to-link.html: Added. Canonical link: https://commits.webkit.org/164363@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-24 20:51:13 +00:00
accessibilityController.enableEnhancedAccessibility(true);
webArea = accessibilityController.rootElement.childAtIndex(0);
webArea.setBoolAttributeValue("AXCaretBrowsingEnabled", true)
link = document.getElementById("one");
link.focus();
var addedNotification = webArea.addNotificationListener(notificationCallback);
shouldBe("addedNotification", "true");
eventSender.keyDown("\t");
eventSender.keyDown("\t", ["shiftKey"]);
}
</script>
</body>
</html>