haikuwebkit/LayoutTests/accessibility/deleting-iframe-destroys-ax...

82 lines
2.8 KiB
HTML
Raw Permalink Normal View History

<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>
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
<script src="../resources/accessibility-helper.js"></script>
<script>
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;
function runTest()
{
description("This tests that deleting an iframe doesn't cause the accessibility cache to be destroyed and recreated.");
if (window.accessibilityController) {
window.root = accessibilityController.rootElement;
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
window.stopElement = accessibilityController.accessibleElementById("stopElement");
window.body = root.childAtIndex(0);
[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing https://bugs.webkit.org/show_bug.cgi?id=125854 Reviewed by Chris Fleizach. Tools: Ensure we don't ever create instances of AccessibilityUIElement wrapping invalid platform-specific accessibility objects in DRT, both for consistency with what WKTR does (so we avoid situations where some tests fail in WK2 and not in WK1) and also to avoid overlooking tests that might not be checking the right thing. * DumpRenderTree/AccessibilityUIElement.cpp: (AccessibilityUIElement::makeJSAccessibilityUIElement): Return a nullPtr if the platformUIElement() is not a valid one. * DumpRenderTree/AccessibilityUIElement.h: (AccessibilityUIElement::platformUIElement): Added const modifier. LayoutTests: Updated tests and expectations to keep them passing after the change done in DRT, without changing their actual purpose. * platform/gtk/accessibility/roles-exposed.html: Make sure we print "AXRole: (no element)" when accessibilityElementByID() does not return a valid object, not to confuse it with cases where the returned string for the role is an empty string. * platform/gtk/accessibility/roles-exposed-expected.txt: Update test expectations to reflect the "AXRole: (no element)" string that is now being exposed. Also, replace the (wrongly added) PASS expectations with FAIL for rowgroups, which are currently not being exposed for ATK either. * accessibility/deleting-iframe-destroys-axcache.html: Just consider the first and third sons of the accessibility object for the body (instead of the grandsons), so the test can run both in Mac, where sons and grandsons are exposed, and ATK, where only sons are exposed (no StaticText objects exposed there). * accessibility/non-data-table-cell-title-ui-element.html: Use accessibilityElementById() to get the accessibility object for the "skip" table header instead of navigating with childAtIndex(), since the hierarchy is not the same for Mac and ATK based ports. * platform/mac/accessibility/search-predicate.html: Do not rely on shouldBe() together with the string "AXRole: " when asking for the role of objects that should no longer be in the accessibility tree, and use shouldBeUndefined() instead. * platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto. * platform/mac/accessibility/search-predicate-expected.txt: Update expectations according to the usage of shouldBeUndefined(). * platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto. * platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html here, since it seems not to be returning the expected values for either the scrollarea and the webarea in the iframe (see bug 126066). * platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html here, since it does not return an undefined object in WebKit2 when the search query should return no results (see bug 125996). Canonical link: https://commits.webkit.org/144032@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-20 14:12:04 +00:00
window.before = body.childAtIndex(0);
window.iframe = body.childAtIndex(1).childAtIndex(0);
[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing https://bugs.webkit.org/show_bug.cgi?id=125854 Reviewed by Chris Fleizach. Tools: Ensure we don't ever create instances of AccessibilityUIElement wrapping invalid platform-specific accessibility objects in DRT, both for consistency with what WKTR does (so we avoid situations where some tests fail in WK2 and not in WK1) and also to avoid overlooking tests that might not be checking the right thing. * DumpRenderTree/AccessibilityUIElement.cpp: (AccessibilityUIElement::makeJSAccessibilityUIElement): Return a nullPtr if the platformUIElement() is not a valid one. * DumpRenderTree/AccessibilityUIElement.h: (AccessibilityUIElement::platformUIElement): Added const modifier. LayoutTests: Updated tests and expectations to keep them passing after the change done in DRT, without changing their actual purpose. * platform/gtk/accessibility/roles-exposed.html: Make sure we print "AXRole: (no element)" when accessibilityElementByID() does not return a valid object, not to confuse it with cases where the returned string for the role is an empty string. * platform/gtk/accessibility/roles-exposed-expected.txt: Update test expectations to reflect the "AXRole: (no element)" string that is now being exposed. Also, replace the (wrongly added) PASS expectations with FAIL for rowgroups, which are currently not being exposed for ATK either. * accessibility/deleting-iframe-destroys-axcache.html: Just consider the first and third sons of the accessibility object for the body (instead of the grandsons), so the test can run both in Mac, where sons and grandsons are exposed, and ATK, where only sons are exposed (no StaticText objects exposed there). * accessibility/non-data-table-cell-title-ui-element.html: Use accessibilityElementById() to get the accessibility object for the "skip" table header instead of navigating with childAtIndex(), since the hierarchy is not the same for Mac and ATK based ports. * platform/mac/accessibility/search-predicate.html: Do not rely on shouldBe() together with the string "AXRole: " when asking for the role of objects that should no longer be in the accessibility tree, and use shouldBeUndefined() instead. * platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto. * platform/mac/accessibility/search-predicate-expected.txt: Update expectations according to the usage of shouldBeUndefined(). * platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto. * platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html here, since it seems not to be returning the expected values for either the scrollarea and the webarea in the iframe (see bug 126066). * platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html here, since it does not return an undefined object in WebKit2 when the search query should return no results (see bug 125996). Canonical link: https://commits.webkit.org/144032@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-20 14:12:04 +00:00
window.after = body.childAtIndex(2);
window.frameBody = window.iframe.childAtIndex(0);
window.frameBodyRole = window.frameBody.role;
window.frameGroup = window.frameBody.childAtIndex(0);
window.frameGroupRole = window.frameGroup.role;
window.frameButton = window.frameGroup.childAtIndex(0);
window.frameButtonRole = window.frameButton.role;
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
document.getElementById("tree").innerText += "\nBefore:\n";
dumpAccessibilityTree(root, stopElement, 0, true);
// Remove the iframe.
document.body.removeChild(document.getElementById("iframe"));
window.newRoot = accessibilityController.rootElement;
window.newBody = newRoot.childAtIndex(0);
[ATK] [WK2] platform/gtk/accessibility/roles-exposed.html is failing https://bugs.webkit.org/show_bug.cgi?id=125854 Reviewed by Chris Fleizach. Tools: Ensure we don't ever create instances of AccessibilityUIElement wrapping invalid platform-specific accessibility objects in DRT, both for consistency with what WKTR does (so we avoid situations where some tests fail in WK2 and not in WK1) and also to avoid overlooking tests that might not be checking the right thing. * DumpRenderTree/AccessibilityUIElement.cpp: (AccessibilityUIElement::makeJSAccessibilityUIElement): Return a nullPtr if the platformUIElement() is not a valid one. * DumpRenderTree/AccessibilityUIElement.h: (AccessibilityUIElement::platformUIElement): Added const modifier. LayoutTests: Updated tests and expectations to keep them passing after the change done in DRT, without changing their actual purpose. * platform/gtk/accessibility/roles-exposed.html: Make sure we print "AXRole: (no element)" when accessibilityElementByID() does not return a valid object, not to confuse it with cases where the returned string for the role is an empty string. * platform/gtk/accessibility/roles-exposed-expected.txt: Update test expectations to reflect the "AXRole: (no element)" string that is now being exposed. Also, replace the (wrongly added) PASS expectations with FAIL for rowgroups, which are currently not being exposed for ATK either. * accessibility/deleting-iframe-destroys-axcache.html: Just consider the first and third sons of the accessibility object for the body (instead of the grandsons), so the test can run both in Mac, where sons and grandsons are exposed, and ATK, where only sons are exposed (no StaticText objects exposed there). * accessibility/non-data-table-cell-title-ui-element.html: Use accessibilityElementById() to get the accessibility object for the "skip" table header instead of navigating with childAtIndex(), since the hierarchy is not the same for Mac and ATK based ports. * platform/mac/accessibility/search-predicate.html: Do not rely on shouldBe() together with the string "AXRole: " when asking for the role of objects that should no longer be in the accessibility tree, and use shouldBeUndefined() instead. * platform/mac/accessibility/search-when-element-starts-in-table.html: Ditto. * platform/mac/accessibility/search-predicate-expected.txt: Update expectations according to the usage of shouldBeUndefined(). * platform/mac/accessibility/search-when-element-starts-in-table-expected.txt: Ditto. * platform/mac/TestExpectations: Add loading-iframe-updates-axtree.html here, since it seems not to be returning the expected values for either the scrollarea and the webarea in the iframe (see bug 126066). * platform/mac-wk2/TestExpectations: Add search-when-element-starts-in-table.html here, since it does not return an undefined object in WebKit2 when the search query should return no results (see bug 125996). Canonical link: https://commits.webkit.org/144032@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-20 14:12:04 +00:00
window.newBefore = newBody.childAtIndex(0);
window.newAfter = newBody.childAtIndex(1);
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
document.getElementById("tree").innerText += "\nAfter:\n";
dumpAccessibilityTree(newRoot, stopElement, 0, true);
document.getElementById("tree").innerText += "\n";
// Make sure that the accessibility objects from the iframe's nodes
// are now invalid by checking that their role is changed - this
// is because they've been deleted.
shouldBeFalse("frameBodyRole == frameBody.role");
shouldBeFalse("frameGroupRole == frameGroup.role");
shouldBeFalse("frameButtonRole == frameButton.role");
// Make sure that the other nodes are unchanged.
shouldBeTrue("root.isEqual(newRoot)");
shouldBeTrue("body.isEqual(newBody)");
shouldBeTrue("before.isEqual(newBefore)");
shouldBeTrue("after.isEqual(newAfter)");
}
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();
}
window.addEventListener('load', function() {
setTimeout(runTest, 10);
}, false);
</script>
</head>
<body>
<p>Before</p>
<iframe id="iframe" src="data:text/html,<body><button>Click me</button></body>"></iframe>
<p>After</p>
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
<p id="stopElement">End of test</p>
<p id="description"></p>
buildAccessibilityTree() needs to be removed from individual layout tests https://bugs.webkit.org/show_bug.cgi?id=95286 Reviewed by Chris Fleizach. Extracted two functions to 'dump' and 'touch' the accessibility hierarchies out of different layout tests and into a single file, living in LayoutTests/resources/accessibility-helper.js * resources/accessibility-helper.js: Added. (dumpAccessibilityTree): New, based on buildAccessibilityTree() for the cases where it was used to actually 'dump' it into the output. (touchAccessibilityTree): Same, but for the cases where we don't want to dump the accessibility tree, just to make sure is generated. Updated affected layout tests to use the newly added helper functions. * accessibility/adjacent-continuations-cause-assertion-failure.html: Updated. * accessibility/children-changed-sends-notification.html: Ditto. * accessibility/deleting-iframe-destroys-axcache.html: Ditto. * accessibility/div-within-anchors-causes-crash.html: Ditto. * accessibility/first-letter-text-transform-causes-crash.html: Ditto. * accessibility/image-map-update-parent-crash.html: Ditto. * accessibility/table-with-empty-thead-causes-crash.html: Ditto. * platform/efl/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/entry-and-password.html: Ditto. * platform/gtk/accessibility/media-emits-object-replacement.html: Ditto. * platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html: Ditto. Updated Mac specific expectations not to print the "End of test" element. * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated. * platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Ditto. * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: Ditto. * platform/mac/accessibility/div-within-anchors-causes-crash-expected.txt: Ditto. Canonical link: https://commits.webkit.org/152610@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-04 15:31:57 +00:00
<pre id="tree"></pre>
<div id="console"></div>
</body>
</html>