haikuwebkit/LayoutTests/accessibility/mac/isolated-tree-mode-on-off-e...

26 lines
945 B
Plaintext
Raw Permalink Normal View History

Add the ability of comparing the accessibility tree with isolated tree mode on and off. https://bugs.webkit.org/show_bug.cgi?id=215000 Reviewed by Chris Fleizach. Source/WebCore: Test: accessibility/mac/isolated-tree-mode-on-off.html Added [WebAccessibilityObjectWrapper isIsolatedObject] for testing purposes, so that layout tests can determine whether an object is isolated or not. It should not be used by real clients since there should be no difference in behavior of a WebAccessibilityObjectWrapper from a client point of view, regardless the underlying object being isolated or not. * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (-[WebAccessibilityObjectWrapperBase isIsolatedObject]): Tools: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::setIsolatedTreeMode): (WTR::AccessibilityController::setAccessibilityIsolatedTreeMode): Renamed setIsolatedTreeMode. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: Exposes setIsolatedTreeMode to JavaScript code so that it can be turned on and off in a layout tests. * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: Exposes isIsolatedObject to JavaScript code so that layout tests can check whether the underlying accessibility object is an AXIsolatedObject or an AXObject. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): Rename. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::isIsolatedObject const): LayoutTests: * accessibility/mac/isolated-tree-mode-on-off-expected.txt: Added. * accessibility/mac/isolated-tree-mode-on-off.html: Added. * resources/accessibility-helper.js: (dumpAccessibilityTree): In addition to dumping the accessibility tree into an element with id="tree", it returns a string representation of the accessibility tree. Canonical link: https://commits.webkit.org/227932@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-04 16:56:34 +00:00
Hello World!
First paragraph.
AXRole: AXGroup AXSubrole: AXApplicationGroup AXValue:
AXRole: AXGroup AXSubrole: AXValue:
AXRole: AXStaticText AXSubrole: AXValue: Hello World!
AXRole: AXGroup AXSubrole: AXValue:
AXRole: AXStaticText AXSubrole: AXValue: First paragraph.
AXRole: AXGroup AXSubrole: AXApplicationGroup AXValue:
AXRole: AXGroup AXSubrole: AXValue:
AXRole: AXStaticText AXSubrole: AXValue: Hello World!
AXRole: AXGroup AXSubrole: AXValue:
AXRole: AXStaticText AXSubrole: AXValue: First paragraph.
This tests that for the given HTML content, the accessibility trees in isolated tree mode on and off are identical.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS content.isIsolatedObject is false
PASS content.isIsolatedObject is true
PASS isolatedTreeOff[1] == isolatedTreeOn[1] is true
PASS successfullyParsed is true
TEST COMPLETE