-
mario.prada@samsung.com authored
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). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e6f6a133