haikuwebkit/LayoutTests/accessibility/mac/primary-screen-height-expec...

13 lines
308 B
Plaintext
Raw Permalink Normal View History

Click
This tests the primary screen height is exposed to AX API from web process.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Add WTR::AccessibilityUIElement::attributeValueAsync to retrieve attribute values in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=211341 Reviewed by Chris Fleizach. Tools: To simulate running WebAccessibilityObjectWrapper methods on the secondary thread, WTR::AccessibilityUIElement dispatches those calls to the AX thread. But some WebAccessibilityObjectWrapper calls cannot be fulfilled on the secondary thread and in turn have to be dispatched to the main thread. This was causing a thread lock during LayoutTests in isolated tree mode since the initial dispatch to the secondary thread blocks the main thread. The solution in this patch is to add an asynchronous mechanism to retrieve attribute values. - Added WTR::AccessibilityUIElement::attributeValueAsync. - Made several fixes consisting of retaining variables in the main thread whose values are computed on the secondary thread. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::executeOnAXThreadAndWait): (WTR::AccessibilityController::executeOnAXThread): (WTR::AccessibilityController::executeOnMainThread): (WTR::AXThread::dispatchBarrier): (WTR::AccessibilityController::executeOnAXThreadIfPossible): Renamed executeOnAXThreadAndWait. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::webAccessibilityObjectWrapperClass): (WTR::makeArrayRefForArray): (WTR::makeObjectRefForDictionary): (WTR::makeValueRefForValue): (WTR::searchPredicateParameterizedAttributeForSearchCriteria): * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::accessibleElementById): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[AccessibilityNotificationHandler startObserving]): (-[AccessibilityNotificationHandler _notificationReceived:]): (webAccessibilityObjectWrapperClass): Moved to AccessibilityCommonMac. (makeValueRefForValue): Moved to AccessibilityCommonMac. (makeArrayRefForArray): Moved to AccessibilityCommonMac. (makeObjectRefForDictionary): Moved to AccessibilityCommonMac. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::supportedAttributes): (WTR::attributeValue): (WTR::setAttributeValue): (WTR::attributesOfElement): (WTR::AccessibilityUIElement::getChildrenWithRange): (WTR::AccessibilityUIElement::elementAtPoint): (WTR::AccessibilityUIElement::indexOfChild): (WTR::AccessibilityUIElement::selectedChildrenCount const): (WTR::AccessibilityUIElement::attributeValueAsync): (WTR::AccessibilityUIElement::selectTextWithCriteria): LayoutTests: This test exercises the new WTR::AccessibilityUIElement::atributeValueAsync method. Instead of using shouldBeTrue that does not work with local variables, uses debug to log results. * accessibility/mac/primary-screen-height-expected.txt: * accessibility/mac/primary-screen-height.html: Canonical link: https://commits.webkit.org/224256@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-04 14:35:10 +00:00
The screen height from the root element is > 0.
The screen height from the web area is > 0.
PASS successfullyParsed is true
TEST COMPLETE